lkml.org 
[lkml]   [2016]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] ovl: avoid setting uninitialized creds
On Mon, Sep 19, 2016 at 2:38 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> If the call to ovl_copy_up() fails, we now call revert_creds on
> an uninitialized structure after a recent patch, as found
> by "gcc -Wmayby-uninitialized":
>
> fs/overlayfs/inode.c: In function 'ovl_open_maybe_copy_up':
> fs/overlayfs/inode.c:39:2: error: 'old_cred' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> fs/overlayfs/inode.c:22:21: note: 'old_cred' was declared here
>
> This changes the code back to not call revert_creds unless
> we have already called ovl_override_creds().

Thanks. Slightly reworked fix folded into original patch and pushed out.

Thanks,
Miklos

\
 
 \ /
  Last update: 2016-09-19 16:53    [W:0.052 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site