From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-176.mta1.migadu.com (out-176.mta1.migadu.com [95.215.58.176]) (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 688FC233723 for ; Sun, 5 Jul 2026 02:58:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783220295; cv=none; b=NWhoLV3pxk8JdBRJGB4eeHrBC4UTNgtJcSgVXE9b3su6kaRjfeo5dneyG7bcAg2DDYrrgqHTpQ4tFGnQRRPP8i7XC6TsWhULS/IhejO90AizIpOQhQ5Fzzkl0/AwQgkHgxBXjLtb21PcXm96jgxSY/ayY4D5DHG9gtqN8yjss0c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783220295; c=relaxed/simple; bh=bMbaDl5MhEmbOcJtxvdENGZ6fVJB3hJnkuNHcCFTXts=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MP3AREI8eDIdriv/7TAJYPTS0ChMB+fLQ/UMcBCUvx8c6/c9nw660ghxH4LfnE9uZVAP4IkUhZu8QLB6jU5EGFzwWtwo/4BuY7/XeFXpZw0vCFqiSQuQ2p7TTQEziTvQ7omNbLdk272s3/EgWYkbNnkSRrNSb0UM7flAMsT5VTk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=IPDE47EK; arc=none smtp.client-ip=95.215.58.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="IPDE47EK" Message-ID: <87111f02-5b7a-4185-8364-2faba650578b@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1783220280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w57z/uu0fzBBMUOs8WK2tGZ+yvPyqJzpYHF98GM3FAM=; b=IPDE47EKxlvC8tiyTXUs4mrgufGfq2/VjqG9Dix65qbxcCHonC5tIwPQDJYMFRWHT2ftLU w82DXz9rRQDKHC6cRk+DWzFjtq41V1aYUhxg4bduoVXFPSluq0n5Etrp9qFfbmUSF0XLwt 2EQZgINYHiGBCdv5Pmj+yvdSYQiFgOQ= Date: Sun, 5 Jul 2026 10:57:44 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH net v2] ppp: defer channel free to an RCU grace period to fix pppol2tp RX UAF To: Breno Leitao Cc: Norbert Szetei , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Sebastian Andrzej Siewior , Taegu Ha , Kees Cook , linux-ppp@vger.kernel.org, linux-kernel@vger.kernel.org, Guillaume Nault , netdev@vger.kernel.org References: Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Qingfang Deng In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 7/4/2026 at 12:32 AM, Breno Leitao wrote: > On Fri, Jul 03, 2026 at 03:27:00PM +0800, Qingfang Deng wrote: >> AI-review found an issue: https://sashiko.dev/#/patchset/D9C0245B-608B-4884-8A09-F55BA4A9F948%40doyensec.com >> >> An rcu_barrier() call is needed at the end of ppp_cleanup(). > > I was initially unclear why rcu_barrier() would be necessary on a kfree path, > but it appears to be required during module unload to ensure that > ppp_release_channel_free() completes before the module's struct rcu_head is > destroyed. Is that the correct understanding? It's required to ensure that all ppp_release_channel_free() callback complete before the text segment of the module is unloaded.