Re: [PATCH net v1] net: defer __dev_set_promiscuity() to avoid sleeping in atomic context

From
Stanislav Fomichev <hidden>
Date
2026-02-21 06:23:33
Also in
lkml
Reply to
I Viswanath, 2026-02-21
On 02/21, I Viswanath wrote:
On Sat, 21 Feb 2026 at 06:45, Stanislav Fomichev [off-list ref] wrote:
quoted
quoted
Do you mean rtnl_lock when you say instance lock?
Search for the instance locks in Documentation/networking/netdevices.rst. We
essentially need to add netdev_ops_assert_locked to __dev_set_rx_mode
and make it work.
So, the handler should look something like this?

static void netif_write_rx_mode(struct work_struct *param) {
 rtnl_lock()
 netdev_lock()
 /* Processing */
netdev_unlock();
 rtnl_unlock();
}

v9 should be out by next week and fixes all the issues I could think
of so please wait for that
Let's handle instance locking separately, I don't think it's as simple
as adding netdev_ops_lock/unlock.
Thread (13 messages) 13 messages, 4 authors, last reply 2026-02-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help