IPoIB: Always initialize poll_timer to avoid crash on unload
authorRoland Dreier <rolandd@cisco.com>
Fri, 10 Oct 2008 22:58:52 +0000 (15:58 -0700)
committerRoland Dreier <rolandd@cisco.com>
Fri, 10 Oct 2008 22:58:52 +0000 (15:58 -0700)
commit2767840a5ca73fde62b25e0209aa9269ec4fa7c7
treeffa319b849854af05f1b8a0e46191386ab6cec4a
parentf6bccf695431da0e9bd773550ae91b8cb9ffb227
IPoIB: Always initialize poll_timer to avoid crash on unload

ipoib_ib_dev_stop() does del_timer_sync(&priv->poll_timer), but if a
P_key for an interface is not found, poll_timer is not initialized, so
this leads to a crash or hang.  Fix this by moving where poll_timer is
initialized to ipoib_ib_dev_init(), which is always called.

This fixes <https://bugs.openfabrics.org/show_bug.cgi?id=1172>.

Debugged-by: Yosef Etigin <yosefe@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_ib.c