The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: syzbot <syzbot+3d602af7549af539274e@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [net?] WARNING in hsr_fill_frame_info
Date: Thu, 29 Aug 2024 18:51:37 -0700	[thread overview]
Message-ID: <000000000000e72e8a0620dcd4c8@google.com> (raw)
In-Reply-To: <000000000000be46510620da5362@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: Re: [syzbot] [net?] WARNING in hsr_fill_frame_info
Author: lizhi.xu@windriver.com

missing lock before call hsr_forward_skb

#syz test

diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c
index af6cf64a00e0..3971dbc0644a 100644
--- a/net/hsr/hsr_slave.c
+++ b/net/hsr/hsr_slave.c
@@ -67,7 +67,9 @@ static rx_handler_result_t hsr_handle_frame(struct sk_buff **pskb)
 		skb_set_network_header(skb, ETH_HLEN + HSR_HLEN);
 	skb_reset_mac_len(skb);
 
+	spin_lock_bh(&hsr->seqnr_lock);
 	hsr_forward_skb(skb, port);
+	spin_unlock_bh(&hsr->seqnr_lock);
 
 finish_consume:
 	return RX_HANDLER_CONSUMED;

  reply	other threads:[~2024-08-30  1:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-29 22:52 [syzbot] [net?] WARNING in hsr_fill_frame_info syzbot
2024-08-30  1:51 ` syzbot [this message]
2024-08-30  3:12 ` [syzbot] " syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=000000000000e72e8a0620dcd4c8@google.com \
    --to=syzbot+3d602af7549af539274e@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox