lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160921092330.GI3075@imgtec.com>
Date:   Wed, 21 Sep 2016 10:23:30 +0100
From:   Eric Engestrom <eric.engestrom@...tec.com>
To:     Nicolai Stange <nicstange@...il.com>
CC:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] debugfs: remove unused variable

On Wed, Sep 21, 2016 at 10:50:38AM +0200, Nicolai Stange wrote:
> Greg Kroah-Hartman <gregkh@...uxfoundation.org> writes:
> 
> > On Tue, Sep 20, 2016 at 05:17:15PM +0100, Eric Engestrom wrote:
> >> Signed-off-by: Eric Engestrom <eric.engestrom@...tec.com>
> >> ---
> >>  fs/debugfs/file.c | 3 +--
> >>  1 file changed, 1 insertion(+), 2 deletions(-)
> >> 
> >> diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
> >> index 592059f..04eca0b 100644
> >> --- a/fs/debugfs/file.c
> >> +++ b/fs/debugfs/file.c
> >> @@ -195,7 +195,6 @@ static int full_proxy_release(struct inode *inode, struct file *filp)
> >>  	const struct dentry *dentry = F_DENTRY(filp);
> >>  	const struct file_operations *real_fops = REAL_FOPS_DEREF(dentry);
> >>  	const struct file_operations *proxy_fops = filp->f_op;
> >> -	int r = 0;
> >>  
> >>  	/*
> >>  	 * We must not protect this against removal races here: the
> >> @@ -204,7 +203,7 @@ static int full_proxy_release(struct inode *inode, struct file *filp)
> >>  	 * ->i_private is still being meaningful here.
> >>  	 */
> >>  	if (real_fops->release)
> >> -		r = real_fops->release(inode, filp);
> >> +		real_fops->release(inode, filp);
> >
> > Hm, shouldn't we be propagating the result back up the call chain?
> 
> AFAICS, the VFS layer doesn't ever evaluate the return value of
> ->release(), c.f. __fput() in fs/file_table.c .
> 
> OTOH, propagating that value back to caller also wouldn't hurt. But this
> would be a matter of taste/coding style.

I actually sent an updated fix [1] about an hour ago, which propagates
the result instead (which is better IMO, I don't know why I didn't do
that the first time around).

[1] http://marc.info/?m=147444718118891  (lkml.org is down?)

> 
> I can't remember whether I left this unused int r there on purpose. I
> doubt not. Eric, did you run your patch through sparse and Coccinelle?

I didn't; how do I do that?  I know these tools, but not how to use them
in this context.

Cheers,
  Eric

> 
> If so,
> 
>   Reviewed-by: Nicolai Stange <nicstange@...il.com>
> 
> for the diff. (This patch lacks a description though.)
> 
> 
> Thanks,
> 
> Nicolai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ