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 B3345CA4E for ; Sun, 10 May 2026 16:59:38 +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=1778432378; cv=none; b=cyw34jykFnhmfBJ0zAReYsjwrMnRtSYWTPXQUZeet8m5rg66EdC/4+T9FDJYDHiQC+EsvJb9lu+VV1emPBb9eC2xmAHFxUH6YL3dx5Eobvq/GBzUDlO+72eK5YpilfjQ8kOO61774mBDEtFMcemG9RtZPs5OHYvlo9xnCC6XQik= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778432378; c=relaxed/simple; bh=fIQOVwyFDN/lNdqwQ2/bx2neU4BDjRNiQ+i1IEnnFow=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tXiTYdvHApWfn5sPvCoX0qab1j44d+7B0PcHH8bKWL+O8jnn/2B4qEmzrS1METYbOg+ZH7kGbNbpbYRS0uhbGMFzS8H+OArt+H27jRULv5O6xmzUUEThUI/980waxS3cw144KuGXLDjyRnz7kVAaYtKLwff5nTBL7aPITGJD7rc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=u7H5FKeT; 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="u7H5FKeT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06D21C2BCB8; Sun, 10 May 2026 16:59:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778432378; bh=fIQOVwyFDN/lNdqwQ2/bx2neU4BDjRNiQ+i1IEnnFow=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=u7H5FKeT7sXDD6t2Hdv7KwkhIq/pQjdZ2ko/s+z0oNX2baBEFQpsU3pi9w0XfYUqI S7CxiAuQTtWJKwskmQoDB1icFeYTLJwkVFmzEQQZo8fMDwxgeNohn4NkSO25GYvX6w Lb99zdUJEFcU82JUmrqLmZORSh7e19LZPK/Op2290orz8Bsle7nzg0N9cgzenn9PQt cD/qN/fWnWHhHPCAlFvUqlC8BK2yZ3Fmp2M4lrspAv3MpQJ1U/Tp+A1rl1nJuIvjgA KogansAf3HL9pXQbIaBHC82Cn5ItF/2+H6hPGvuKu0fa2LZF+8rYItq+h2PKTYIDYY MRzjYRSCGUWSg== Date: Sun, 10 May 2026 09:59:37 -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 v2] net: team: fix NULL pointer dereference in team_xmit during mode change Message-ID: <20260510095937.598c27a6@kernel.org> In-Reply-To: References: <20260509181825.1523951-2-bestswngs@gmail.com> <20260510082509.1530a1a3@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 Mon, 11 May 2026 00:06:50 +0800 Weiming Shi wrote: > > Barriers are between things. What are the release / acquire barriers > > synchronizing. > > The handler function pointer against the mode_priv state it operates > on. On setup, init() writes mode_priv, then smp_store_release() > publishes the real handler - the paired smp_load_acquire() in the > reader ensures the handler sees that state. On teardown, > smp_store_release() publishes the dummy before synchronize_net() > drains readers, so exit_op() won't tear down state under an > in-flight reader. Still does not make sense to me. You already add sync_net(). And if it's possible to switch from dummy to non-dummy mode the ordering is inverted. > > Why is AF_PACKET relevant here?? > > > > Not specific to the bug, just a reproducer detail. Dropped. > > Sending v3 with the updated changelog shortly. Please don't rush new versions out.