lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221026125354.911575-1-yangyingliang@huawei.com>
Date:   Wed, 26 Oct 2022 20:53:54 +0800
From:   Yang Yingliang <yangyingliang@...wei.com>
To:     <linux-can@...r.kernel.org>, <netdev@...r.kernel.org>
CC:     <robin@...tonic.nl>, <linux@...pel-privat.de>,
        <kernel@...gutronix.de>, <socketcan@...tkopp.net>,
        <mkl@...gutronix.de>
Subject: [PATCH] can: j1939: transport: replace kfree_skb() with dev_kfree_skb_irq()

It is not allowed to call kfree_skb() from hardware interrupt
context or with interrupts being disabled. So replace kfree_skb()
with dev_kfree_skb_irq() under spin_lock_irqsave().

Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol")
Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
---
 net/can/j1939/transport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c
index d7d86c944d76..b95fb759c49d 100644
--- a/net/can/j1939/transport.c
+++ b/net/can/j1939/transport.c
@@ -343,7 +343,7 @@ static void j1939_session_skb_drop_old(struct j1939_session *session)
 		/* drop ref taken in j1939_session_skb_queue() */
 		skb_unref(do_skb);
 
-		kfree_skb(do_skb);
+		dev_kfree_skb_irq(do_skb);
 	}
 	spin_unlock_irqrestore(&session->skb_queue.lock, flags);
 }
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ