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: <9f74395f-55f6-46f3-8a84-bbf033e0f2d9@linux.dev>
Date: Thu, 5 Sep 2024 10:27:41 -0400
From: Sean Anderson <sean.anderson@...ux.dev>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski
 <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Radhey Shyam Pandey <radhey.shyam.pandey@....com>, netdev@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
 Michal Simek <michal.simek@....com>, Heng Qi <hengqi@...ux.alibaba.com>
Subject: Re: [PATCH net-next 2/2] net: xilinx: axienet: Enable adaptive IRQ
 coalescing with DIM

On 9/4/24 13:04, Eric Dumazet wrote:
> On Tue, Sep 3, 2024 at 9:25 PM Sean Anderson <sean.anderson@...ux.dev> wrote:
>>
> 
>> +
>> +/**
>> + * axienet_rx_dim_work() - Adjust RX DIM settings
>> + * @work: The work struct
>> + */
>> +static void axienet_rx_dim_work(struct work_struct *work)
>> +{
>> +       struct axienet_local *lp =
>> +               container_of(work, struct axienet_local, rx_dim.work);
>> +
>> +       rtnl_lock();
> 
> Why do you need rtnl ?

To protect against concurrent modification in axienet_ethtools_set_coalesce.

> This is very dangerous, because cancel_work_sync(&lp->rx_dim.work)
> might deadlock.

Ah, you're right. So maybe I should add a separate mutex for this.

--Sean

>> +       axienet_dim_coalesce_rx(lp);
>> +       axienet_update_coalesce_rx(lp);
>> +       rtnl_unlock();
>> +
>> +       lp->rx_dim.state = DIM_START_MEASURE;
>> +}
>>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ