]> git.baikalelectronics.ru Git - kernel.git/commit
xen-netback: move netif_napi_add before binding interrupt
authorWei Liu <wei.liu2@citrix.com>
Mon, 25 Aug 2014 15:44:00 +0000 (16:44 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Aug 2014 00:31:42 +0000 (17:31 -0700)
commit66175f2981e5fd07c45e6b4c8e6496770a30647c
tree63977cacb2047745e2bb00e06446dfaae7ff3548
parent0ac66b8d732bc087beb20e24c30756fa750ff117
xen-netback: move netif_napi_add before binding interrupt

Interrupt is enabled when bind_interdomain_evtchn_to_irqhandler returns.
If there's interrupt pending interrupt handler is invoked.

NAPI needs to be initialised before binding interrupt otherwise the
interrupt handler will try to scheduling a NAPI instance that is not
initialised yet, resulting in kernel OOPS.

This fixes a regression introduced in 4a5b5b35 ("xen-netback: move NAPI
add/remove calls").

Ideally function calls to create kthreads should also be moved before
binding but I intent to fix this regression with minimal changes and
refactor the code with another patch.

Reported-by: Thomas Leonard <talex5@gmail.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netback/interface.c