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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPrAcgNR+=GS0RxH_UP1Hz3U-HJL3_ZdGoy=hqkdS=iXL8zF8w@mail.gmail.com>
Date: Tue, 6 Jan 2026 15:58:16 +0530
From: I Viswanath <viswanathiyyappan@...il.com>
To: edumazet@...gle.com, andrew+netdev@...n.ch, horms@...nel.org, 
	kuba@...nel.org, pabeni@...hat.com, mst@...hat.com, eperezma@...hat.com, 
	jasowang@...hat.com, xuanzhuo@...ux.alibaba.com
Cc: netdev@...r.kernel.org, virtualization@...ts.linux.dev, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v7 1/2] net: refactor set_rx_mode into snapshot
 and deferred I/O

> +static void netif_free_cleanup_work(struct net_device *dev)
> +{
> +       if (!dev->cleanup_work)
> +               return;
> +
> +       cancel_work_sync(&dev->cleanup_work->work);
> +       kfree(dev->cleanup_work);
> +       dev->cleanup_work = NULL;
> +}
> +
> @@ -1682,6 +1882,16 @@ static int __dev_open(struct net_device *dev, struct netlink_ext_ack *extack)
>         if (!ret && ops->ndo_open)
>                 ret = ops->ndo_open(dev);
>
> +       if (!ret && dev->needs_cleanup_work) {
> +               if (!dev->cleanup_work)
> +                       ret = netif_alloc_cleanup_work(dev);
> +               else
> +                       cancel_work_sync(&dev->cleanup_work->work);
> +       }
> +
> +       if (!ret && ops->ndo_write_rx_mode)
> +               ret = netif_alloc_rx_mode_ctx(dev);
> +
>         netpoll_poll_enable(dev);

This is the response to the AI review. Honestly impressed by how good
the AI review is

My bad, It should be flush_work() not cancel_work_sync() in
__dev_open() and also in
netif_free_cleanup_work(). These are the only places where execution
needs to wait
for completion of the cleanup work

It's ok to just cancel rx_mode work so this issue is only with the cleanup work

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ