From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752173AbcACSFM (ORCPT ); Sun, 3 Jan 2016 13:05:12 -0500 Received: from tiger.mobileactivedefense.com ([217.174.251.109]:42536 "EHLO tiger.mobileactivedefense.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751543AbcACSFJ (ORCPT ); Sun, 3 Jan 2016 13:05:09 -0500 From: Rainer Weikusat To: David Miller Cc: , , , Subject: Re: [PATCH] af_unix: Fix splice-bind deadlock In-Reply-To: <87y4cftztp.fsf@doppelsaurus.mobileactivedefense.com> (Rainer Weikusat's message of "Sun, 27 Dec 2015 20:13:22 +0000") References: <87y4cftztp.fsf@doppelsaurus.mobileactivedefense.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Date: Sun, 03 Jan 2016 18:04:58 +0000 Message-ID: <87vb7ak08l.fsf@doppelsaurus.mobileactivedefense.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (tiger.mobileactivedefense.com [217.174.251.109]); Sun, 03 Jan 2016 18:05:05 +0000 (GMT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, &path, 0); > + > + err = PTR_ERR(dentry); > + if (IS_ERR(dentry)) > + goto out; > + } > + This is wrong because kern_path_create can return with -EEXIST which needs to be translated to -EADDRINUSE for this case. I'll fix that.