From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A202EC07E9D for ; Mon, 26 Sep 2022 17:25:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230355AbiIZRZU (ORCPT ); Mon, 26 Sep 2022 13:25:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230291AbiIZRYv (ORCPT ); Mon, 26 Sep 2022 13:24:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62CA5140F32 for ; Mon, 26 Sep 2022 09:40:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 22BA161022 for ; Mon, 26 Sep 2022 16:40:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53BEFC433C1; Mon, 26 Sep 2022 16:40:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664210451; bh=L1sC6caZUSqfyQY4AF3lbmkTNrXE5Nlwf4sqcu4J5N4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mYwrNBM4LTiJRxW5yyzzExkMx2YWGx0o/pVi7JNQsfuH+DjisIGNECPJnLyKHJTRi 9IlVfxgRifQLH6rBaR/F0OsQ1owMxems8vFN+/8mtQSukOT4oMdVPEjdjUlk5eulf5 v3dQH9tJFZakiWse02E8RTgU8QlsUS/lHiW+5ITWZ9u9DN9iJcB15WEtoDhSQQPCzs 4ep9hH9d6scpvygcdSO3eJdgVvc7bIrSHtHVyDzm3JTruC2FQYNZ7OozLtSWh6X426 a4UmoK1Afv07Amvz4urqHCaMFyhtnwTNrvtJLuyIHUQHSRtVEBdlQZrbSlvlMb+WyX RSkW6+Yr9UNAA== Date: Mon, 26 Sep 2022 09:40:50 -0700 From: Jakub Kicinski To: Raed Salem Cc: Sabrina Dubroca , "netdev@vger.kernel.org" , Lior Nahmanson , Saeed Mahameed Subject: Re: [PATCH net-next] macsec: don't free NULL metadata_dst Message-ID: <20220926094050.30a4fe59@kernel.org> In-Reply-To: References: <60f2a1965fe553e2cade9472407d0fafff8de8ce.1663923580.git.sd@queasysnail.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sun, 25 Sep 2022 07:29:36 +0000 Raed Salem wrote: > >Commit 0a28bfd4971f added a metadata_dst to each tx_sc, but that's only > >allocated when macsec_add_dev has run, which happens after device > >registration. If the requested or computed SCI already exists, or if linking to > >the lower device fails, we will panic because metadata_dst_free can't handle > >NULL. > > > >Reproducer: > > ip link add link $lower type macsec > > ip link add link $lower type macsec > > > >Fixes: 0a28bfd4971f ("net/macsec: Add MACsec skb_metadata_dst Tx Data > >path support") > >Signed-off-by: Sabrina Dubroca > > Acked by me Thanks a lot for the review! Please prefer the full: Acked-by: Raed Salem format in the future, this way it will be picked up by the automation.