]> git.baikalelectronics.ru Git - kernel.git/commit
IPoIB: Fix crash in dev_open error flow
authorErez Shitrit <erezsh@mellanox.com>
Wed, 16 Oct 2013 14:37:47 +0000 (17:37 +0300)
committerRoland Dreier <roland@purestorage.com>
Fri, 8 Nov 2013 22:42:48 +0000 (14:42 -0800)
commite6557803d77b2e4a9440c794ead3ceba326dfd5a
treefa806db1ca48249da47b6f2c59f0b663d9279250
parent0e7fb4bc05a12a48fc03da20d018ff3786b7d5dc
IPoIB: Fix crash in dev_open error flow

If napi has never been enabled when calling ipoib_ib_dev_stop, a
kernel crash occurs, because the verbs layer completion handler
(ipoib_ib_completion) calls napi_schedule unconditionally.

If the napi structure passed in the napi_schedule call has not
been initialized, napi will crash.

The cleanest solution is to simply enable napi before calling
ipoib_ib_dev_stop in the dev_open error flow. (dev_stop then
immediately disables napi).

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/ipoib/ipoib_ib.c