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 9EBC119CD0B; Tue, 25 Feb 2025 21:42:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740519721; cv=none; b=gukHi8C2dco3EeXR5qngfS9WmNzQgt+pYCD3hJVlUuB0fuay8bqy1/angzUTiHHKD1X5w15PgxFP5UaYSapmvAKW0CSnpoFrK4Jn3xWZcX+Ix3WNRaPeBuwdxBuTydllIEN2KfFDxnahx/rR80gmfX7Da6v2V4hYa6ZPaTrwYD0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740519721; c=relaxed/simple; bh=i/w3Ugg7iqwU7nyARwQaD4QgDzZhsyrM7w55zgo5bBQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UivohV2YKf7KtpD1EO52Lk5qZvqrTiU8Y2gfYBoRgPo9bsrX2m6nqOLJhFfZR3vjW7wt5h3xZQQ/gWSpVHQ1/vlDnfWrqVRxStsgtRxq7qlz46BkyGCPHu5WVRXlKqnL3+SLX4iy07pHbqMf/f4pmSEfIW7ldX7p2k7Q1d9ZGEE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KCp7wX/O; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KCp7wX/O" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAB3BC4CEDD; Tue, 25 Feb 2025 21:41:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740519721; bh=i/w3Ugg7iqwU7nyARwQaD4QgDzZhsyrM7w55zgo5bBQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=KCp7wX/OtqZL5zKviICbsptf27RtTUORLlU+8wi7qrpTYtmi4paqNdw8giRXxdzH2 qRDN59mwDbAhi1gpn2J4QLL3R4c6nn/8gzRI08SkeINmIA6YHlUSFXy99rbqwYyTtz igMz2SA5LeaeZNVBczSo4pQ6aPRzFF4zWzhima8bTgOD3EIZht/rCtW+lV+Sx66LNp xcQ2p0YZy3xINytivXjrEQnjcsUGR3ekL6OW3sFPOTDpMfmzpPqTCMpcj4cLm+Z/mx /DH5zi6P/ap13VRShX9SDXiOFbvEk9IwBsf3Bx6Y+ULq02crE0zclHynkVGWjmDeQt Mc45JT8xaBqXQ== Message-ID: <30663725-7078-4b8d-bc75-8a9cd15b0b02@kernel.org> Date: Tue, 25 Feb 2025 22:41:55 +0100 Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH v2 mptcp] mptcp: fix 'scheduling while atomic' in mptcp_pm_nl_append_new_local_addr Content-Language: en-GB To: Krister Johansen Cc: Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , netdev@vger.kernel.org, mptcp@lists.linux.dev References: <9ef28d50-dad0-4dc6-8a6d-b3f82521fba1@redhat.com> <20250224232012.GA7359@templeofstupid.com> <20250225192946.GA1867@templeofstupid.com> From: Matthieu Baerts Autocrypt: addr=matttbe@kernel.org; keydata= xsFNBFXj+ekBEADxVr99p2guPcqHFeI/JcFxls6KibzyZD5TQTyfuYlzEp7C7A9swoK5iCvf YBNdx5Xl74NLSgx6y/1NiMQGuKeu+2BmtnkiGxBNanfXcnl4L4Lzz+iXBvvb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PQmmgc5VnD/9YgbCr HR1FbMbm7td54UrYvZV/i7m3dIQNXK2e+Cbv5PXf19ce3XluaE+wA8D+vnIW5mbAAiojt3Mb 6p0WJS3QzbObzHNgAp3zy/L4lXwc6WW5vnpWAzqXFHP8D9PTpqvBALbXqL06smP47JqbyQxj Xf7D2rrPeIqbYmVY9da1KzMOVf3gReazYa89zZSdVkMojfWsbq05zwYU+SCWS3NiyF6QghbW voxbFwX1i/0xRwJiX9NNbRj1huVKQuS4W7rbWA87TrVQPXUAdkyd7FRYICNW+0gddysIwPoa KrLfx3Ba6Rpx0JznbrVOtXlihjl4KV8mtOPjYDY9u+8x412xXnlGl6AC4HLu2F3ECkamY4G6 UxejX+E6vW6Xe4n7H+rEX5UFgPRdYkS1TA/X3nMen9bouxNsvIJv7C6adZmMHqu/2azX7S7I vrxxySzOw9GxjoVTuzWMKWpDGP8n71IFeOot8JuPZtJ8omz+DZel+WCNZMVdVNLPOd5frqOv mpz0VhFAlNTjU1Vy0CnuxX3AM51J8dpdNyG0S8rADh6C8AKCDOfUstpq28/6oTaQv7QZdge0 JY6dglzGKnCi/zsmp2+1w559frz4+IC7j/igvJGX4KDDKUs0mlld8J2u2sBXv7CGxdzQoHaz lzVbFe7fduHbABmYz9cefQpO7wDE/Q== Organization: NGI0 Core In-Reply-To: <20250225192946.GA1867@templeofstupid.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Krister, On 25/02/2025 20:29, Krister Johansen wrote: > Hi Matt, > Thanks for the review! > > On Tue, Feb 25, 2025 at 06:52:45PM +0100, Matthieu Baerts wrote: >> On 25/02/2025 00:20, Krister Johansen wrote: >>> If multiple connection requests attempt to create an implicit mptcp >>> endpoint in parallel, more than one caller may end up in >>> mptcp_pm_nl_append_new_local_addr because none found the address in >>> local_addr_list during their call to mptcp_pm_nl_get_local_id. In this >>> case, the concurrent new_local_addr calls may delete the address entry >>> created by the previous caller. These deletes use synchronize_rcu, but >>> this is not permitted in some of the contexts where this function may be >>> called. During packet recv, the caller may be in a rcu read critical >>> section and have preemption disabled. >> >> Thank you for this patch, and for having taken the time to analyse the >> issue! >> >>> An example stack: (...) >> Detail: if possible, next time, do not hesitate to resolve the >> addresses, e.g. using: ./scripts/decode_stacktrace.sh > > My apologies for the oversight here. This is the decoded version of the > stack: No problem, thanks for the decoded version! (...) >> I'm going to apply it in our MPTCP tree, but this patch can also be >> directly applied in the net tree directly, not to delay it by one week >> if preferred. If not, I can re-send it later on. > > Thanks, I'd be happy to send it to net directly now that it has your > blessing. Would you like me to modify the call trace in the commit > message to match the decoded one that I included above before I send it > to net? Sorry, I forgot to mention that this bit was for the net maintainers. Typically, trivial patches and small fixes related to MPTCP can go directly to net. No need for you to re-send it. If the net maintainers prefer me to send it later with other patches (if any), I will update the call trace, no problem! Cheers, Matt -- Sponsored by the NGI0 Core fund.