]> git.baikalelectronics.ru Git - kernel.git/commit
gigaset: fix Oops on module unload regression
authorTilman Schmidt <tilman@imap.cc>
Fri, 7 Mar 2008 18:47:08 +0000 (19:47 +0100)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 7 Mar 2008 19:06:08 +0000 (11:06 -0800)
commitc978e69a9599e11e6d1fdf311d57bee070d9c90e
treeb227dbfadf35428ea0db7cb071f5e33e22702682
parent12cd77718f2e4a886423e9c521ece5b4b65bc09f
gigaset: fix Oops on module unload regression

The card state mutex was only initialized when a device was connected,
but used during unload unconditionally, leading to an Oops if a driver
was loaded and unloaded again without ever connecting a device.

Fix this by initializing the mutex as soon as the structure is allocated.
Also add a missing mutex unlock revealed in the same execution path.

This fixes a possible Oops in 2.6.25-rc that was introduced by commit
8a1387b8b4bef85b40aab564f1d0adf5fe7439ff ("Gigaset: permit module
unload").

Thanks to Roland Kletzing for reporting this problem.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Tested-by: Roland Kletzing <devzero@web.de>
Cc: Hansjoerg Lipp <hjlipp@web.de>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/isdn/gigaset/common.c