elv_unregister: fix possible crash on module unload
authorOleg Nesterov <oleg@tv-sign.ru>
Tue, 22 Aug 2006 17:22:13 +0000 (21:22 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 22 Aug 2006 19:52:23 +0000 (12:52 -0700)
commit2d8f613160ed303f5fe310f21bba334a4b074fa5
tree7e6878d6391919019b4904714cfe8fc0ef4709be
parent00a2b0f6dd2372842df73de72d51621b539fea44
elv_unregister: fix possible crash on module unload

An exiting task or process which didn't do I/O yet have no io context,
elv_unregister() should check it is not NULL.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
block/elevator.c