[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170124.143139.2126878937432738946.davem@davemloft.net>
Date: Tue, 24 Jan 2017 14:31:39 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: xiyou.wangcong@...il.com
Cc: netdev@...r.kernel.org, dvyukov@...gle.com,
rweikusat@...ileactivedefense.com, viro@...iv.linux.org.uk
Subject: Re: [Patch net] af_unix: move unix_mknod() out of bindlock
From: Cong Wang <xiyou.wangcong@...il.com>
Date: Mon, 23 Jan 2017 11:17:35 -0800
> Dmitry reported a deadlock scenario:
>
> unix_bind() path:
> u->bindlock ==> sb_writer
>
> do_splice() path:
> sb_writer ==> pipe->mutex ==> u->bindlock
>
> In the unix_bind() code path, unix_mknod() does not have to
> be done with u->bindlock held, since it is a pure fs operation,
> so we can just move unix_mknod() out.
>
> Reported-by: Dmitry Vyukov <dvyukov@...gle.com>
> Tested-by: Dmitry Vyukov <dvyukov@...gle.com>
> Cc: Rainer Weikusat <rweikusat@...ileactivedefense.com>
> Cc: Al Viro <viro@...iv.linux.org.uk>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
Applied and queued up for -stable, thanks.
Powered by blists - more mailing lists