From: Herbert Xu Subject: Re: [PATCH] crypto: AF_ALG - remove locking in async callback Date: Fri, 3 Nov 2017 21:20:16 +0800 Message-ID: <20171103132016.GB8330@gondor.apana.org.au> References: <5260911.ZuXsrgFD2R@positron.chronox.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Romain Izard , linux-crypto@vger.kernel.org, Cyrille Pitchen , Tudor Ambarus , Nicolas Ferre , linux-arm-kernel To: Stephan =?iso-8859-1?Q?M=FCller?= Return-path: Received: from orcrist.hmeau.com ([104.223.48.154]:37932 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755999AbdKCNUr (ORCPT ); Fri, 3 Nov 2017 09:20:47 -0400 Content-Disposition: inline In-Reply-To: <5260911.ZuXsrgFD2R@positron.chronox.de> Sender: linux-crypto-owner@vger.kernel.org List-ID: On Sun, Oct 29, 2017 at 09:39:30PM +0100, Stephan M?ller wrote: > Am Mittwoch, 25. Oktober 2017, 17:26:31 CET schrieb Romain Izard: > > Hi Romain, > > the patch below should cover the issue you see. Would you mind testing it? > > Thanks > Stephan > > ---8<--- > > The code paths protected by the socket-lock do not use or modify the > socket in a non-atomic fashion. The actions pertaining the socket do not > even need to be handled as an atomic operation. Thus, the socket-lock > can be safely ignored. Are you sure about that? In particular is the callback function still sane without the socket lock if a concurrent recvmsg/sendmsg call is made? Your fixes header is wrong too as the locks weren't introduced in that commit, they just got moved around. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt