]> git.baikalelectronics.ru Git - kernel.git/commit
mISDN: fix misdn_add_timer()/misdn_del_timer() race
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 15 Apr 2013 21:04:04 +0000 (17:04 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 29 Apr 2013 19:41:48 +0000 (15:41 -0400)
commit0181c72cfacff62fe5e6e757f0ab1b20eeca2eef
tree2e693539d928e501e91ddfedf90ea780e9e2bea2
parenta2f8cc242a9a524a0a23ac50568b00769e235d9c
mISDN: fix misdn_add_timer()/misdn_del_timer() race

do add_timer() *before* unlocking dev->lock, or unpleasant things can
happen if misdn_del_timer() on another CPU finds the sucker, calls
del_timer_sync() (which does nothing, since we hadn't started the
timer yet) and frees it, just as we get around to add_timer()...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/isdn/mISDN/timerdev.c