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] [day] [month] [year] [list]
Message-ID: <025c01a1-457a-40cc-804b-cb4c3c6e3502@raritan.com>
Date: Thu, 4 Jul 2024 22:18:51 +0200
From: Ronald Wahl <ronald.wahl@...itan.com>
To: Jakub Kicinski <kuba@...nel.org>, Ronald Wahl <rwahl@....de>
Cc: "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
 Simon Horman <horms@...nel.org>, netdev@...r.kernel.org,
 stable@...r.kernel.org
Subject: Re: [PATCH] ks8851: Fix deadlock with the SPI chip variant

Thanks, I made a v2.

I now also found another potential TX stall issue caused by improper
locking. In ks8851_tx_work we need to move

   last = skb_queue_empty(&ks->txq);

under the lock or otherwise risk a TX stall because in case the queue
was empty and has meanwhile being completely filled while we were
waiting for the lock. I need to double check this scenario first. If it
is indeed an issue then I will provide a separate patch later.

On 04.07.24 16:44, Jakub Kicinski wrote:
> On Wed,  3 Jul 2024 18:00:53 +0200 Ronald Wahl wrote:
>> +            bool need_wake_queue;
>>
>>              netif_dbg(ks, intr, ks->netdev,
>>                        "%s: txspace %d\n", __func__, tx_space);
>>
>>              spin_lock(&ks->statelock);
>>              ks->tx_space = tx_space;
>> -            if (netif_queue_stopped(ks->netdev))
>> -                    netif_wake_queue(ks->netdev);
>> +            need_wake_queue = netif_queue_stopped(ks->netdev);
>>              spin_unlock(&ks->statelock);
>> +            if (need_wake_queue)
>> +                    netif_wake_queue(ks->netdev);
>
> xmit runs in BH, this is just one way you can hit this deadlock
> better fix would be to make sure statelock is always taken
> using spin_lock_bh()


________________________________

Ce message, ainsi que tous les fichiers joints à ce message, peuvent contenir des informations sensibles et/ ou confidentielles ne devant pas être divulguées. Si vous n'êtes pas le destinataire de ce message (ou que vous recevez ce message par erreur), nous vous remercions de le notifier immédiatement à son expéditeur, et de détruire ce message. Toute copie, divulgation, modification, utilisation ou diffusion, non autorisée, directe ou indirecte, de tout ou partie de ce message, est strictement interdite.


This e-mail, and any document attached hereby, may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized, direct or indirect, copying, disclosure, distribution or other use of the material or parts thereof is strictly forbidden.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ