Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1603363pxb; Tue, 8 Feb 2022 23:47:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCFeeMfpiB/HzZuiTs1zg1Cq7eG26ugE8F5Y4jgmnXACYSXAKv/baiab2//CscBF1STeNn X-Received: by 2002:a62:5e47:: with SMTP id s68mr1078433pfb.10.1644392856372; Tue, 08 Feb 2022 23:47:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644392856; cv=none; d=google.com; s=arc-20160816; b=i2z+02QVCc0h0kzVIY8f5k7vZbeftJCsuFLX7kRQSlvCWc0CXQxM802gZ/TCN65rzQ hZ1/DHQLRaU7OU2/NkR9y3Yo/BvwMEjnTphJnc8Ve+YMr5fjHQ/PZPqRQTZyZfpQoGiq PDh71jBnGKuDpYgkaNkhc/ZK+ROOkAEsp5IDnVbZjDUin7AazcHA+9y/WyqMHg5D+/8v c9JJns76f83dTWV17yyfHoAo+gXX/ubBuwJSjSrB3r5UScfrOl3sEB2UeQUWJClr9pya HYJby9MqJcZSF6L2306FZ1mwsnUfpZ2ztwV7bZjhe7vx8oAeZx/Sq+9a+DGloEBMKBwZ i1sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Hy8TEMpdjbVprBHI6BSNXpqRjGgWQ1FkHnbAxDKXmgQ=; b=onJc1S/5BsC2C7hHZY/ONCXyHfjZ16mM6bzIU/HykCx/7RElHAGRVAvi34avCyyFGT a7MudzRmRTOlayhwmH1y50XKFHYy+h8JRIQW6VaPG545k5QPb+BC2UvMB6FJJEYvdEnm B9ATPEGFBretUQMcmEBpZQLtdXImfORpAdr+PbtprBTuvbLBdkFwK0f53zrjnV5Cwx4O SuFhqw2aUzdqVvhcEuh8aYjb+yEDTPdSNP5maJhzF+vJIdtOo5zj7RoP+YEYC9SdkKtA i8l5mEzYffo+rJk/vFKpTlvqXxLYRKwI/qQqFgnIZQzDjYSE3TsqZeM/y7e8qvRhIf1E nltQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=E1fTyPHC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b20si4597962pjp.15.2022.02.08.23.47.22; Tue, 08 Feb 2022 23:47:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=E1fTyPHC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388904AbiBGLps (ORCPT + 99 others); Mon, 7 Feb 2022 06:45:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386091AbiBGLde (ORCPT ); Mon, 7 Feb 2022 06:33:34 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 655C0C043181; Mon, 7 Feb 2022 03:33:33 -0800 (PST) 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 ECF2460B20; Mon, 7 Feb 2022 11:33:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD72FC004E1; Mon, 7 Feb 2022 11:33:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644233612; bh=0G4mg7JrTwEv++ARZxUJpNZ1oLOwrJ8UNREcb0ZZ/f8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E1fTyPHCa7ONPxbl19duLpzzj7yqyatT2z35ElYvoNxnwXrfYRZbeix9syhTFF/Tv 1AXJ77aLkCBAKZme5KqVKWXGsGPmVm7r7wb8wPFVH/u98GrR78Mav0FIhQzu/8lgLy Ka9n5JgvP6c+cqxL/eKBSJzB6pqE13nSRHDyKxMY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miquel Raynal , Alexander Aring , Stefan Schmidt Subject: [PATCH 5.16 067/126] net: ieee802154: ca8210: Stop leaking skbs Date: Mon, 7 Feb 2022 12:06:38 +0100 Message-Id: <20220207103806.426048917@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220207103804.053675072@linuxfoundation.org> References: <20220207103804.053675072@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miquel Raynal commit 621b24b09eb61c63f262da0c9c5f0e93348897e5 upstream. Upon error the ieee802154_xmit_complete() helper is not called. Only ieee802154_wake_queue() is called manually. We then leak the skb structure. Free the skb structure upon error before returning. Fixes: ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver") Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20220125121426.848337-5-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt Signed-off-by: Greg Kroah-Hartman --- drivers/net/ieee802154/ca8210.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ieee802154/ca8210.c +++ b/drivers/net/ieee802154/ca8210.c @@ -1771,6 +1771,7 @@ static int ca8210_async_xmit_complete( status ); if (status != MAC_TRANSACTION_OVERFLOW) { + dev_kfree_skb_any(priv->tx_skb); ieee802154_wake_queue(priv->hw); return 0; }