]> git.baikalelectronics.ru Git - kernel.git/commit
net: korina: Fix NAPI versus resources freeing
authorFlorian Fainelli <f.fainelli@gmail.com>
Sat, 24 Dec 2016 03:56:56 +0000 (19:56 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Dec 2016 16:26:16 +0000 (11:26 -0500)
commitc332e3bfd8ea17dc0362a5d1f6669145d9009a21
tree798d9bc9325e7c42befe995e6ab55ebf8cc4759a
parent2650f8cccee9ada2dbf3a9d220ee359bb0a8df91
net: korina: Fix NAPI versus resources freeing

Commit 29c318d3bde7 ("korina: disable napi on close and restart")
introduced calls to napi_disable() that were missing before,
unfortunately this leaves a small window during which NAPI has a chance
to run, yet we just freed resources since korina_free_ring() has been
called:

Fix this by disabling NAPI first then freeing resource, and make sure
that we also cancel the restart task before doing the resource freeing.

Fixes: 29c318d3bde7 ("korina: disable napi on close and restart")
Reported-by: Alexandros C. Couloumbis <alex@ozo.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/korina.c