Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1573466pxb; Tue, 8 Feb 2022 22:45:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6md98twWpHHc3rQ2R0nVFf0PabQ+nS7RIwCQsWKlgxH/10E1mYk7wY0/pZmz5GEQ0F3lw X-Received: by 2002:a17:90a:72c2:: with SMTP id l2mr981456pjk.14.1644389132673; Tue, 08 Feb 2022 22:45:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644389132; cv=none; d=google.com; s=arc-20160816; b=wPBk0AHjGN6KJcitha18m2uTS2a48WhZVkEBE9h47bS9UY3zFGIzb65DVU4QreSb9H KR9ZnFkPe0Hp6us7/zyR7Q8HYtqupVIGNOrWnaKljmTjEGBH6Y9F3BD4+LRXGhBERXdT t9RG4S/MMjqRYjkIBFaB0kSKxZcWTN5aY0T/RxCecIgVqZey/s/4iIKKRE3imXAM2fg7 GgGPQ7W7c2rT4iw9B4C65YADMN+wcU92IFJ3p1iBak5sev98/a+eKZpoi6Sh83ILJqT3 bKMyABBuk9ISSFltEMdwUW9lDuTkk4kmjfVZrV9V3Wa1oSwyKVPGisHhUkZNhDbvmyqs D3ww== 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=pdtCs0Ih5WIrUSAHx+intMHBH8LDCIfVfBKT5uzI0ZzIh/r/8ePnTYuU0tnogY1o6M mat4/WP7JegI+cyx4M+i71b1PfQ7U3M9BAadRhAJvfCCpyPlLWosz6q8TK/zMMIqSToj HnZ4MlEz2EQrOqngXjsOA0DixYsshp9l+tiIEwbQ/2sTxxpPXInSltS06ksX61jnwt+h JgNqGsFtOxEE4TqTXme1OVGlld63WfszqvEY5xFP894LjiwhKKndvo1d14oK5d9D22Cg lyQzwe1g0NEej1jUJgfeJ1iHLU2V4DSyEnsr7XBg3LBloJY1wD6JV9yx6FUsMlKKJl2f T5cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vl+ow5r6; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id q141si14543716pgq.557.2022.02.08.22.45.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 22:45:32 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vl+ow5r6; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5A67BE00FEC0; Tue, 8 Feb 2022 22:17:34 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387863AbiBGLll (ORCPT + 99 others); Mon, 7 Feb 2022 06:41:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382159AbiBGL3R (ORCPT ); Mon, 7 Feb 2022 06:29:17 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ECD4C02B667; Mon, 7 Feb 2022 03:27:22 -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 731C46006F; Mon, 7 Feb 2022 11:27:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F639C340EB; Mon, 7 Feb 2022 11:27:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644233227; bh=0G4mg7JrTwEv++ARZxUJpNZ1oLOwrJ8UNREcb0ZZ/f8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vl+ow5r63hLe8mibBlDKEtZ+gAEMCt4rq+cTwmL54S/4HdtU8CixprRmn63SE+1NQ piP/m2yasGdOCydmHBesT8QT7q873Y17W5nORwNN4wNKPd9a/auTWaBvyvkvXAgUbn ZtDYYuKTTvD2LF6sAripFtyeiVG2TasIkU1Ke+ok= 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.15 058/110] net: ieee802154: ca8210: Stop leaking skbs Date: Mon, 7 Feb 2022 12:06:31 +0100 Message-Id: <20220207103804.247225937@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220207103802.280120990@linuxfoundation.org> References: <20220207103802.280120990@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.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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; }