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 2A5A9E573 for ; Sat, 9 May 2026 01:13:47 +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=1778289228; cv=none; b=XpuK46XEz/m8imPcPvmPa8XoTYEFdbQs49jeG2pyNyGCITalFEBuRbRzSJS72OOdOUJawKp/5S0p2bmY+gJOyNOn+JE3EiPliLdVVOln5/G50E8+XcqJJrFzz8j/EIxXJUaSQGQalpRQUcFacH5sdXqqE+HD3kRh6On/BuCWJYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778289228; c=relaxed/simple; bh=HVAtBmoHiU4ExaGz8ypCjMiRtjwNgoDHdTGHLX9ZgNc=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Wf4XPUGSuhYUHrjbUt1RjKHlnb7unXW1htD9qhDgVieM3cCxj9yJ+e6FCbTeH74S14wGasMHCKnCmyieKmKva/ByQhdXKzeXbpDW6PdNDo0PfIU4gCiQBeKKb5ZOk6lFMu1PD9t8Haen3S0+/goYdiYI2LRm7EQc7lo+HUXlTjo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GvXiK3Qn; 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="GvXiK3Qn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F9DDC2BCB0; Sat, 9 May 2026 01:13:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778289227; bh=HVAtBmoHiU4ExaGz8ypCjMiRtjwNgoDHdTGHLX9ZgNc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GvXiK3QnjOVo7zWzcXaMuhRKqsNhz8EaMq5Y+zR5bLCmC0zzVJZPCSh34vYMz+UDh PDL621GQM8877eDScw/S1OTWTRr1ag3b2s+nmAfdEQ7kDVOAmtCAvaiElLCHWudcPR PGjwRJzMxUd8yqVrqsad1eNubQZRYHLcWhvg+L4L7GHAP11i4QkB282viHCuoBM5Bi DJi+9H6OHGTVZo0Vke/AJrFqQXT2/1JnCycXZW2p0ILUQX7LZnH9jmdKAOxLbuyyk+ PPRHmdZm/kE7DXXOwgd2vE9e6c5WDWcT9iAGoqG3cmBzRbbJGtC4QjXTo10oMFqVs2 we8NXRFA3d4ZA== Date: Fri, 8 May 2026 18:13:46 -0700 From: Jakub Kicinski To: Weiming Shi Cc: Jiri Pirko , Andrew Lunn , "David S . Miller" , Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org, Xiang Mei Subject: Re: [PATCH net] net: team: fix NULL pointer dereference in team_xmit during mode change Message-ID: <20260508181346.692554a3@kernel.org> In-Reply-To: <20260506101107.1174136-2-bestswngs@gmail.com> References: <20260506101107.1174136-2-bestswngs@gmail.com> 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 Wed, 6 May 2026 03:11:08 -0700 Weiming Shi wrote: > __team_change_mode() clears team->ops with memset() before restoring > safe dummy handlers via team_adjust_ops(). Can we make it not do that? Perhaps split the memset() into two and write team_dummy_transmit to transmit? We usually try to move the complexity from the fast path to configuration paths. > A concurrent team_xmit() > running under RCU on another CPU can read team->ops.transmit during > this window and call a NULL function pointer, crashing the kernel. -- pw-bot: cr