From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796351411; b=sEUEnb+JSrHgQUDF1p6WGy5ndCF/eJ/s/rEhw/o82JMsVTeuf+9hP3lFjMLFEbd6UUjA WEpG8BBKPUhpk54NkFUDtUMJibWxC+G6blPAgFFLEgbJJhiESljy5TFBqE4qfvtOYKagJ WCoJTWo3AkBp1fxFQWf+WqRkQvhIehwgyOug8SjaukB02ehoorZrPlmW1RYBqwMRrH1xI egEhiISqhGwXTT7LQMkwQdtrLsgjVTb31jSAy9SmWRDCHYGdq+Z2tM5bhWQfaSVoFSwsu S/Vajulp9FPaTNhEPR8Y0DQB3MmI2jObg24FY+1W+5kywQciypJczz/ftPjIeBQ5jHg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796351411; h=Received:DKIM-Signature:Received:Content-Type:MIME-Version: Content-Transfer-Encoding:Subject:From:Message-Id:Date:References: In-Reply-To:To:Cc; bh=CbE/PBwzFWY/lMypmzQCu0IJlZ3L5nF7XwYbAoYAWuk=; b=XzVx/Auv3+QICZDAsm3g8TOx9/yHq2zITYraaVvMgpFkw++Xq9j0mtiy0Ee2rr2T72qG Gwbp4WKOrxwtzG5FCGxcVy7ZIFC/ltZlihYohSGOfqeA+WuId/fI7NH2neeH5yYlmOfgx wdr54fSZwDI1o7LsaMZYo2NIZd2tRstO0WeXIsThyS3k9Yi7VtebzEojfntWn9CJpaMai wdkuaIukRP9uOl9o8XmhcKn7kEcmnyTFCDOVCTsqh7IzxlmGA1CmuirCKKMJB3hxYXDCw xC78X5/W3c/6wgJTVUnsHbh7Bid7jHDr9/d8Kvt04TiYf/ec5tL0S88lBhpriozt/0w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VgVxIpUD; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC0B8606A338 for ; Fri, 4 Dec 2026 02:30:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VgVxIpUD Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C4B71F000CE; Fri, 4 Dec 2026 02:30:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796351411; bh=CbE/PBwzFWY/lMypmzQCu0IJlZ3L5nF7XwYbAoYAWuk=; h=Subject:From:Date:References:In-Reply-To:To:Cc; b=VgVxIpUD7r/D2a+zKLU4s//46Y4Orfo07jn3b7IuP55UEK3NuMTy2yoKTmfKQWgIH oyznbbHbz65Cj4uqi15nXG882UqTHmbGegi8Y+DRtnGHY3/PrWV475g2mjK8hIuSh1 oK5yp3Pu5K1EvMUGIMWMEuzlO0VzQInUbXJuq9AQpt25NI6pPefluHMuV6ERT5A8V+ B2mY/8iEXlXsa1ujFUboimKT/FAdmUNuDenICYue6zf2+FCTnZGw3fXYmJ8TLe5QXW GEb/LLdiABw2I/lOn6r5OHuhKgpwhRWIIfTB1uCP3wXzB4L97ctfGMflaAQsIs3zfz F6KD86LbtTR/g== Received: from [10.30.226.235] (localhost [IPv6:::1]) by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id 4FC313924A6F; Fri, 4 Dec 2026 02:30:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH bpf] bpf: Read the pid ns once in bpf_task_from_vpid() From: patchwork-bot+netdevbpf@kernel.org Message-Id: <179635141002.775403.9951391981556170724.git-patchwork-notify@kernel.org> Date: Fri, 04 Dec 2026 02:30:10 +0000 References: <20261203201328.28379-1-mason@kernel.org> In-Reply-To: <20261203201328.28379-1-mason@kernel.org> To: Chris Mason Cc: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, eddyz87@gmail.com, memxor@gmail.com, martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev, jolsa@kernel.org, emil@etsalapatis.com, ihor.solodrai@linux.dev, juntong.deng@outlook.com, rhkrqnwk98@gmail.com Hello: This patch was applied to bpf/bpf.git (master) by Alexei Starovoitov : On Thu, 3 Dec 2026 15:13:28 -0500 you wrote: > bpf_task_from_vpid() dereferences a NULL pid namespace if another CPU > reaps current during the call. > > Commit 50dff0061552 ("bpf: Fix NULL pointer dereference in > bpf_task_from_vpid()") made the kfunc return early if current has no pid > namespace. But find_task_by_vpid() reads current's namespace again. A > program can run on a task that is between exit_notify() and its last > context switch, and release_task() does not wait for that switch: > > [...] Here is the summary with links: - [bpf] bpf: Read the pid ns once in bpf_task_from_vpid() https://git.kernel.org/bpf/bpf/c/22d31f270ef6 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html