From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751889AbcBKRzQ (ORCPT ); Thu, 11 Feb 2016 12:55:16 -0500 Received: from tiger.mobileactivedefense.com ([217.174.251.109]:43877 "EHLO tiger.mobileactivedefense.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751331AbcBKRy6 (ORCPT ); Thu, 11 Feb 2016 12:54:58 -0500 From: Rainer Weikusat To: Ben Hutchings Cc: Rainer Weikusat , Philipp Hahn , Hannes Frederic Sowa , Sasha Levin , "David S. Miller" , linux-kernel@vger.kernel.org, Karolin Seeger , Jason Baron , Greg Kroah-Hartman , Arvid Requate , Stefan Gohmann Subject: Re: Bug 4.1.16: self-detected stall in net/unix/? In-Reply-To: <87r3gjjgbu.fsf@doppelsaurus.mobileactivedefense.com> (Rainer Weikusat's message of "Thu, 11 Feb 2016 17:40:37 +0000") References: <56B4BF9D.9070609@pmhahn.de> <56BC90E7.7040007@pmhahn.de> <87fuwzkzr5.fsf@doppelsaurus.mobileactivedefense.com> <1455210224.2801.21.camel@decadent.org.uk> <87r3gjjgbu.fsf@doppelsaurus.mobileactivedefense.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Date: Thu, 11 Feb 2016 17:54:28 +0000 Message-ID: <87mvr7jfor.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]); Thu, 11 Feb 2016 17:54:36 +0000 (GMT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rainer Weikusat writes: [...] > This means it only gets locked if unix_peer(other) != sk and this cannot > happen if other == sk and unix_peer(sk) == other, however, the 2nd > condition isn't guaranteed: other might indeed be == sk and not the peer > of it because someone could be using _sendmsg to send a message via a > socket to an address bound to the same socket. In this case, other was > found via A second way to hits this (probably somewhat difficult to trigger in practice): sk happened to be connected to itself by the time the unix_peer_get(sk) was executed but was disconnected before the unix_state_lock(other) below.