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] [day] [month] [year] [list]
Date:	Mon, 09 Dec 2013 12:21:09 -0700
From:	Tim Gardner <timg@....com>
To:	Jeff Layton <jlayton@...hat.com>
CC:	linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org,
	linux-kernel@...r.kernel.org, Steve French <sfrench@...ba.org>,
	Dean Gehnert <deang@....com>
Subject: Re: [PATCH 4/5 linux-next V2] cifs: fix incorrect reference count
 check

On 12/09/2013 04:03 AM, Jeff Layton wrote:
> On Sun,  8 Dec 2013 14:08:43 -0700
> Tim Gardner <timg@....com> wrote:
> 
>> The reference count on tlink can only be decremented if
>> cifs_sb_tlink(cifs_sb) was used to acquire it. That only
>> happens if open_file==NULL.
>>
>> Cc: Steve French <sfrench@...ba.org>
>> Cc: Jeff Layton <jlayton@...hat.com>
>> Cc: Dean Gehnert <deang@....com>
>> Signed-off-by: Tim Gardner <timg@....com>
>> ---
>>
>> V2 - this is a new patch in the V2 series.
>>
>>  fs/cifs/inode.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
>> index 3f710c6..e332038 100644
>> --- a/fs/cifs/inode.c
>> +++ b/fs/cifs/inode.c
>> @@ -2007,7 +2007,7 @@ cifs_set_file_size(struct inode *inode, struct iattr *attrs,
>>  			CIFSSMBClose(xid, tcon, netfid);
>>  		}
>>  	}
>> -	if (tlink)
>> +	if (!open_file)
>>  		cifs_put_tlink(tlink);
>>  
>>  set_size_out:
> 
> 
> I don't see the bug here...
> 
> The only place tlink gets set to a non-NULL value is where
> cifs_sb_tlink gets called. Am I missing something?
> 

Nope - I think you're correct. For some reason I thought tlink was set
inside the 'if (openfile) {...}' clause. I'll drop this patch from the
V3 series.

rtg
-- 
Tim Gardner timg@....com www.tpi.com
OR 503-601-0234 x102 MT 406-443-5357
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ