[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140226.161422.431061479377150157.davem@davemloft.net>
Date: Wed, 26 Feb 2014 16:14:22 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: peppe.cavallaro@...com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH (net.git) 5/6] stmmac: remove useless check in the
stmmac_tx_clean
From: Giuseppe Cavallaro <peppe.cavallaro@...com>
Date: Wed, 26 Feb 2014 09:01:06 +0100
> There is an useless if condition that this patch is removing
> when the driver cleans the tx resources.
>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@...com>
It is not useless, the first check is optimistic and lock free.
You must retest the condition under the lock in order to avoid
spurious wakeups.
Such a spurious wakeup could overlap another asynchronous context
filling the TX queue and sleeping it, resulting in corruption.
Furthermore, that cleanup patch in this series is absolutely not
appropriate for 'net' which is for real bug fixes only. Specifically
I'm talking about patch #4.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists