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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 30 May 2014 01:37:55 +0200
From:	Kai <wildex999@...il.com>
To:	Al Viro <viro@...iv.linux.org.uk>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: BUG?: super.c:sget spin_lock not released?

On Fri, May 30, 2014 at 1:19 AM, Al Viro <viro@...iv.linux.org.uk> wrote:
> On Fri, May 30, 2014 at 12:49:56AM +0200, Kai wrote:
>> Hello,
>>
>> I have recently been playing around with writing a custom filesystem
>> for Linux, and have been reading the source of other filesystems, and
>> the functions they call into the linux kernel.
>> While looking at the function sget in super.c I found something strange.
>>
>> before if(test) it takes a spinlock, however there seems to be two
>> cases where it does not unlock it.
>> (Kernel 3.14, super.c line 441)
>>
>> One:
>> if(!grab_super(old)) goto retry;
>> Will jump to before spin_lock(), without releasing it first.
>
> Er...  So either grab_super() releases that spinlock, or that thing
> is screwed.  The next obvious step would be to look into grab_super()...
>
>> Two:
>> And if it finds an old sb, it will return without releasing the lock.
>
> ... unless something it calls does just that.

AH, I knew I was missing something. And so obvious too =(

Thank you for pointing it out to me.
Seems I need to spend more time reading the source code and figuring
out how it all connects.
--
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