]> git.baikalelectronics.ru Git - kernel.git/commit
xen-netback: release pending index before pushing Tx responses
authorDavid Vrabel <david.vrabel@citrix.com>
Tue, 24 Feb 2015 11:17:59 +0000 (11:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Feb 2015 21:24:22 +0000 (16:24 -0500)
commit2e836734ed0d251b0b8aaafaec7859cf00a80cb6
treede9e7b9db0b88366ca381c2c405d32ba75a7a454
parent770ec00b43c5023e505027c875688843922fad73
xen-netback: release pending index before pushing Tx responses

If the pending indexes are released /after/ pushing the Tx response
then a stale pending index may be used if a new Tx request is
immediately pushed by the frontend.  The may cause various WARNINGs or
BUGs if the stale pending index is actually still in use.

Fix this by releasing the pending index before pushing the Tx
response.

The full barrier for the pending ring update is not required since the
the Tx response push already has a suitable write barrier.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netback/netback.c