From: Jakub Kicinski <kuba@kernel.org>
To: Anastasia Kovaleva <a.kovaleva@yadro.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<stable@vger.kernel.org>, <linux@yadro.com>
Subject: Re: [PATCH v2 net] net: Fix an unsafe loop on the list
Date: Wed, 2 Oct 2024 06:02:40 -0700 [thread overview]
Message-ID: <20241002060240.3aca47cc@kernel.org> (raw)
In-Reply-To: <20241001115828.25362-1-a.kovaleva@yadro.com>
On Tue, 1 Oct 2024 14:58:28 +0300 Anastasia Kovaleva wrote:
> The kernel may crash when deleting a genetlink family if there are still
> listeners for that family:
Could you add a selftest? Should be fairly easy using YNL, ncdevmem is
the only user so far.
> Oops: Kernel access of bad area, sig: 11 [#1]
> ...
> NIP [c000000000c080bc] netlink_update_socket_mc+0x3c/0xc0
> LR [c000000000c0f764] __netlink_clear_multicast_users+0x74/0xc0
> Call Trace:
> __netlink_clear_multicast_users+0x74/0xc0
> genl_unregister_family+0xd4/0x2d0
>
> Change the unsafe loop on the list to a safe one, because inside the
> loop there is an element removal from this list.
>
> Fixes: b8273570f802 ("genetlink: fix netns vs. netlink table locking (2)")\
nit: trailing \ at the end of the line here
next prev parent reply other threads:[~2024-10-02 13:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-01 11:58 [PATCH v2 net] net: Fix an unsafe loop on the list Anastasia Kovaleva
2024-10-02 13:02 ` Jakub Kicinski [this message]
2024-10-02 17:53 ` Anastasia Kovaleva
2024-10-02 18:56 ` Jakub Kicinski
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=20241002060240.3aca47cc@kernel.org \
--to=kuba@kernel.org \
--cc=a.kovaleva@yadro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@yadro.com \
--cc=netdev@vger.kernel.org \
--cc=stable@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;
as well as URLs for NNTP newsgroup(s).