Re: [PATCH] ks8851: Fix deadlock with the SPI chip variant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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()
-- 
pw-bot: cr




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux