Re: [PATCH] af_unix: Fix splice-bind deadlock

2016-01-06 Thread Rainer Weikusat
Hannes Frederic Sowa writes: > On Sun, Jan 3, 2016, at 19:03, Rainer Weikusat wrote: [reorder i_mutex and readlock locking] > I was concerned because of the comment in skb_socket_splice: > > /* Drop the socket lock, otherwise we have reverse > * locking dependencies between

Re: [PATCH] af_unix: Fix splice-bind deadlock

2016-01-06 Thread Rainer Weikusat
Hannes Frederic Sowa writes: > On Sun, Jan 3, 2016, at 19:03, Rainer Weikusat wrote: [reorder i_mutex and readlock locking] > I was concerned because of the comment in skb_socket_splice: > > /* Drop the socket lock, otherwise we have reverse > *

Re: [PATCH] af_unix: Fix splice-bind deadlock

2016-01-04 Thread David Miller
From: Rainer Weikusat Date: Sun, 03 Jan 2016 18:56:38 + > On 2015/11/06, Dmitry Vyukov reported a deadlock involving the splice > system call and AF_UNIX sockets, > > http://lists.openwall.net/netdev/2015/11/06/24 > > The situation was analyzed as > > (a while ago) A: socketpair() > B:

Re: [PATCH] af_unix: Fix splice-bind deadlock

2016-01-04 Thread Hannes Frederic Sowa
Hello, On Sun, Jan 3, 2016, at 19:03, Rainer Weikusat wrote: > Rainer Weikusat writes: > > > Hannes Frederic Sowa writes: > >> On 27.12.2015 21:13, Rainer Weikusat wrote: > >>> -static int unix_mknod(const char *sun_path, umode_t mode, struct path > >>> *res) > >>> +static int

Re: [PATCH] af_unix: Fix splice-bind deadlock

2016-01-04 Thread Hannes Frederic Sowa
Hello, On Sun, Jan 3, 2016, at 19:03, Rainer Weikusat wrote: > Rainer Weikusat writes: > > > Hannes Frederic Sowa writes: > >> On 27.12.2015 21:13, Rainer Weikusat wrote: > >>> -static int unix_mknod(const char *sun_path,

Re: [PATCH] af_unix: Fix splice-bind deadlock

2016-01-04 Thread David Miller
From: Rainer Weikusat Date: Sun, 03 Jan 2016 18:56:38 + > On 2015/11/06, Dmitry Vyukov reported a deadlock involving the splice > system call and AF_UNIX sockets, > > http://lists.openwall.net/netdev/2015/11/06/24 > > The situation was analyzed as > >

Re: [PATCH] af_unix: Fix splice-bind deadlock

2016-01-03 Thread Rainer Weikusat
On 2015/11/06, Dmitry Vyukov reported a deadlock involving the splice system call and AF_UNIX sockets, http://lists.openwall.net/netdev/2015/11/06/24 The situation was analyzed as (a while ago) A: socketpair() B: splice() from a pipe to /mnt/regular_file does sb_start_write() on /mnt

Re: [PATCH] af_unix: Fix splice-bind deadlock

2016-01-03 Thread Rainer Weikusat
Rainer Weikusat writes: [...] > + dentry = NULL; > + if (sun_path[0]) { > + /* Get the parent directory, calculate the hash for last > + * component. > + */ > + dentry = kern_path_create(AT_FDCWD, sun_path, , 0); > + > + err

Re: [PATCH] af_unix: Fix splice-bind deadlock

2016-01-03 Thread Rainer Weikusat
Rainer Weikusat writes: > Hannes Frederic Sowa writes: >> On 27.12.2015 21:13, Rainer Weikusat wrote: >>> -static int unix_mknod(const char *sun_path, umode_t mode, struct path *res) >>> +static int unix_mknod(struct dentry *dentry, struct path *path, umode_t >>> mode, >>> +

Re: [PATCH] af_unix: Fix splice-bind deadlock

2016-01-03 Thread Rainer Weikusat
Rainer Weikusat writes: > Hannes Frederic Sowa writes: >> On 27.12.2015 21:13, Rainer Weikusat wrote: >>> -static int unix_mknod(const char *sun_path, umode_t mode, struct path *res) >>> +static int unix_mknod(struct dentry

Re: [PATCH] af_unix: Fix splice-bind deadlock

2016-01-03 Thread Rainer Weikusat
Rainer Weikusat writes: [...] > + dentry = NULL; > + if (sun_path[0]) { > + /* Get the parent directory, calculate the hash for last > + * component. > + */ > + dentry =

Re: [PATCH] af_unix: Fix splice-bind deadlock

2016-01-03 Thread Rainer Weikusat
On 2015/11/06, Dmitry Vyukov reported a deadlock involving the splice system call and AF_UNIX sockets, http://lists.openwall.net/netdev/2015/11/06/24 The situation was analyzed as (a while ago) A: socketpair() B: splice() from a pipe to /mnt/regular_file does sb_start_write() on /mnt

Re: [PATCH] af_unix: Fix splice-bind deadlock

2015-12-31 Thread Rainer Weikusat
Hannes Frederic Sowa writes: > On 27.12.2015 21:13, Rainer Weikusat wrote: >> -static int unix_mknod(const char *sun_path, umode_t mode, struct path *res) >> +static int unix_mknod(struct dentry *dentry, struct path *path, umode_t >> mode, >> + struct path *res) >> { >> -

Re: [PATCH] af_unix: Fix splice-bind deadlock

2015-12-31 Thread Rainer Weikusat
Hannes Frederic Sowa writes: > On 27.12.2015 21:13, Rainer Weikusat wrote: >> -static int unix_mknod(const char *sun_path, umode_t mode, struct path *res) >> +static int unix_mknod(struct dentry *dentry, struct path *path, umode_t >> mode, >> + struct

Re: [PATCH] af_unix: Fix splice-bind deadlock

2015-12-29 Thread Hannes Frederic Sowa
Hello Rainer, On 27.12.2015 21:13, Rainer Weikusat wrote: -static int unix_mknod(const char *sun_path, umode_t mode, struct path *res) +static int unix_mknod(struct dentry *dentry, struct path *path, umode_t mode, + struct path *res) { - struct dentry *dentry; -

Re: [PATCH] af_unix: Fix splice-bind deadlock

2015-12-29 Thread Hannes Frederic Sowa
Hello Rainer, On 27.12.2015 21:13, Rainer Weikusat wrote: -static int unix_mknod(const char *sun_path, umode_t mode, struct path *res) +static int unix_mknod(struct dentry *dentry, struct path *path, umode_t mode, + struct path *res) { - struct dentry *dentry; -

[PATCH] af_unix: Fix splice-bind deadlock

2015-12-27 Thread Rainer Weikusat
On 2015/11/06, Dmitry Vyukov reported a deadlock involving the splice system call and AF_UNIX sockets, http://lists.openwall.net/netdev/2015/11/06/24 The situation was analyzed as (a while ago) A: socketpair() B: splice() from a pipe to /mnt/regular_file does sb_start_write() on /mnt

[PATCH] af_unix: Fix splice-bind deadlock

2015-12-27 Thread Rainer Weikusat
On 2015/11/06, Dmitry Vyukov reported a deadlock involving the splice system call and AF_UNIX sockets, http://lists.openwall.net/netdev/2015/11/06/24 The situation was analyzed as (a while ago) A: socketpair() B: splice() from a pipe to /mnt/regular_file does sb_start_write() on /mnt