From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51A8736B09 for ; Mon, 9 Oct 2023 15:17:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QSbOy7ti" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D296C433B7; Mon, 9 Oct 2023 15:17:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696864671; bh=IxC3QSqPVebIUIRAWD+xhWprjzDHOIt3IBTBrp48heo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QSbOy7tie+ysnc34WLh7T8qM5g5Hep59jVakIVVg7b/MLulFFJE5pGb2GEvBqMXGP KnPwAWfAtpkN5ufKCIYccOCr0pHzqBOgPgWGVayiYQ3kTC8V8nhQEci7ZEfbkKpNr1 dWuP2ig4eXLIFQYtUdJrBCCYEzfViD6GeE8o21oy8YYoi1kUdDEe78p8H/dA684ILU iqpceVibFcCNj/hVcRFLegXJWz4fcAvOEN80JOMXa+CpkPMfLyiKIjst/IFXBx6ehk vqoKVr/tZVUXoOR+jWI7fUWXRUkJoPfK3ASN++C+Ec0RxBwr7+yPGQ5F8Wdllz93uT mTUCc57DJgP3g== Date: Mon, 9 Oct 2023 08:17:50 -0700 From: Jakub Kicinski To: Chengfeng Ye Cc: 3chas3@gmail.com, davem@davemloft.net, horms@kernel.org, linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] atm: solos-pci: Fix potential deadlock on &cli_queue_lock Message-ID: <20231009081750.2073013d@kernel.org> In-Reply-To: References: <20231005074858.65082-1-dg573847474@gmail.com> <20231006162835.79484017@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 7 Oct 2023 23:58:36 +0800 Chengfeng Ye wrote: > > and irqsave here. I think you're right that it's just softirq (== bh) > > that may deadlock, so no need to take the irqsave() version in process > > context. > > Yes, spin_lock_bh() is enough. > > I just found spin_lock_irqsave() is more frequently used in this file, so I > also used spin_lock_irqsave() here for uniformity consideration at that time. > > Should I send a new patch series to change this to spin_lock_bh()? That's > better for performance consideration. Yes, performance is one reason and another is that the code will be easier to understand if the locking matches the requirements.