]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Use dev_kfree_skb() in efx_end_loopback()
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 2 Jul 2012 22:03:02 +0000 (23:03 +0100)
committerBen Hutchings <bhutchings@solarflare.com>
Tue, 17 Jul 2012 15:12:32 +0000 (16:12 +0100)
commit476ab710aeb5a128c32d73558aa25eb7d55b95d3
tree8f13ed6c43d8e81911f451e9c6012ceb14e2d330
parentfdcb63978537ececba3f90743bb4fd659bd7539a
sfc: Use dev_kfree_skb() in efx_end_loopback()

Fix CID 102619 in the Coverity report on Linux.

efx_end_loopback() iterates over an array of skb pointers of which
some may be null (if efx_begin_loopback() failed).  It should not use
dev_kfree_skb_irq(), which requires non-null pointers.  In practice
this is safe because it does not run in interrupt context and
therefore always ends up calling dev_kfree_skb(), which does allow
null pointers.  But we should make that explicit.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/selftest.c