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]
Message-ID: <CANq1E4QFj2PuMJkFcS+zs5U0kMD6Anm0Q4RXOuJyFQA9zrXSGw@mail.gmail.com>
Date:	Thu, 15 Nov 2012 17:02:42 +0100
From:	David Herrmann <dh.herrmann@...glemail.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	fuse-devel@...ts.sourceforge.net,
	Miklos Szeredi <miklos@...redi.hu>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] cuse: do not register multiple devices with the same name

Hi Tejun

On Thu, Nov 15, 2012 at 3:44 PM, Tejun Heo <tj@...nel.org> wrote:
> On Thu, Nov 15, 2012 at 01:23:17PM +0100, David Herrmann wrote:
>> We do not check whether we already registered a CUSE device with a given
>> name so we might end up with two devices with the same name. Sysfs will
>> then complain as it cannot create suitable directories.
>>
>> This patch makes the init-command fail if there is already a device with
>> the given name. To avoid race-conditions, we protect the whole
>> registration with a mutex now.
>>
>> Following the sysfs warnings when registering two devices with the same
>> name:
> ...
>> Signed-off-by: David Herrmann <dh.herrmann@...glemail.com>
>
> Acked-by: Tejun Heo <tj@...nel.org>
>
> But it probably would be better to separate out mutex conversion as a
> separate patch.

Thanks for reviewing it again. I noticed the for-loop doesn't check
all registered devices but only the devices in the same list-head.
Luckily in my test-cases this was true.

I will resend a v3 where I split this into two patches and correctly
traverse the array and every list.

Thanks
David
--
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