Al Viro 378ff1a53b fix deadlock in cifs_ioctl_clone()
It really needs to check that src is non-directory *and* use
{un,}lock_two_nodirectories().  As it is, it's trivial to cause
double-lock (ioctl(fd, CIFS_IOC_COPYCHUNK_FILE, fd)) and if the
last argument is an fd of directory, we are asking for trouble
by violating the locking order - all directories go before all
non-directories.  If the last argument is an fd of parent
directory, it has 50% odds of locking child before parent,
which will cause AB-BA deadlock if we race with unlink().

Cc: stable@vger.kernel.org @ 3.13+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-01-18 23:49:26 -05:00
..
2014-12-10 17:41:02 -08:00
2014-12-14 14:55:45 -06:00
2014-12-10 17:41:02 -08:00
2013-11-08 05:57:46 +09:00
2015-01-18 23:49:26 -05:00
2014-10-17 17:17:12 -05:00
2014-12-14 14:55:57 -06:00
2014-12-14 14:55:45 -06:00
2014-12-14 14:55:45 -06:00
2014-12-14 14:55:45 -06:00
2012-07-24 10:25:13 -05:00
2013-09-08 14:54:24 -05:00