]> git.baikalelectronics.ru Git - kernel.git/commit
cuse: do not register multiple devices with identical names
authorDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 17 Nov 2012 11:45:48 +0000 (12:45 +0100)
committerMiklos Szeredi <mszeredi@suse.cz>
Thu, 17 Jan 2013 12:04:57 +0000 (13:04 +0100)
commitc9b86214faa365324be7a14e0e3be64cb9470475
tree4aeaf43d76cda5cad2c968214c1efce047f53f71
parent760c867ca424b1d574878c45731b9160ccf81459
cuse: do not register multiple devices with identical names

Sysfs doesn't allow two devices with the same name, but we register a
sysfs entry for each cuse device without checking for name collisions.
This extends the registration to first check whether the name was already
registered.

To avoid race-conditions between the name-check and linking the device, we
need to protect the whole registration with a mutex.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/fuse/cuse.c