From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755739AbcKVIl6 (ORCPT ); Tue, 22 Nov 2016 03:41:58 -0500 Received: from mail-oi0-f66.google.com ([209.85.218.66]:33480 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755719AbcKVIl4 (ORCPT ); Tue, 22 Nov 2016 03:41:56 -0500 MIME-Version: 1.0 X-Originating-IP: [217.173.44.24] In-Reply-To: <20161122111939.0c0ea92a@canb.auug.org.au> References: <20161122111939.0c0ea92a@canb.auug.org.au> From: Miklos Szeredi Date: Tue, 22 Nov 2016 09:41:44 +0100 Message-ID: Subject: Re: linux-next: build warning after merge of the overlayfs tree To: Stephen Rothwell Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 22, 2016 at 1:19 AM, Stephen Rothwell wrote: > Hi Miklos, > > After merging the overlayfs tree, today's linux-next build (powerpc > ppc64_defconfig) produced this warning: > > In file included from fs/overlayfs/dir.c:20:0: > fs/overlayfs/dir.c: In function 'ovl_set_redirect': > fs/overlayfs/overlayfs.h:92:6: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] > int err = vfs_setxattr(dentry, name, value, size, flags); > ^ > fs/overlayfs/dir.c:788:14: note: 'ret' was declared here > char *buf, *ret; > ^ > > Introduced by commit > > 496654b0792e ("ovl: redirect on rename-dir") > > This is not necessarily a false positive (although is is a confusing > message): if the kmalloc of "buf" fails and samedir was not set in > ovl_get_redirect(), then "return ret" will be executed but "ret" has > not been set. Fixed. Thanks for reporting. Miklos