public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.35-rc2 module reference counting broken
@ 2010-06-07  5:20 Jari Ruusu
  2010-06-07  6:44 ` Al Viro
  0 siblings, 1 reply; 6+ messages in thread
From: Jari Ruusu @ 2010-06-07  5:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: Rusty Russell, Al Viro, Linus Torvalds

Someone broke block device module reference counting. Problem occours when a
modular block device is mounted and unmounted. Not when it is directly read.
2.6.34 kernel works OK, but 2.6.35-rc2 kernel seems to increase usage count
by one for each mount + umount pair.

# uname -s -r -m
Linux 2.6.35-rc2 i686
# grep CONFIG_SMP /usr/src/linux-2.6.35-rc2/.config
# CONFIG_SMP is not set
# grep CONFIG_MODULE_UNLOAD /usr/src/linux-2.6.35-rc2/.config
CONFIG_MODULE_UNLOAD=y
# grep CONFIG_BLK_DEV_FD /usr/src/linux-2.6.35-rc2/.config
CONFIG_BLK_DEV_FD=m
# lsmod
Module                  Size  Used by
# modprobe floppy
# lsmod
Module                  Size  Used by
floppy                 40029  0
# mount -t ext2 /dev/fd0 /mnt
# umount /mnt
# lsmod
Module                  Size  Used by
floppy                 40029  1
# rmmod floppy
ERROR: Module floppy is in use
# echo $?
1
# 

(reboot)

# uname -s -r -m
Linux 2.6.35-rc2 i686
# lsmod
Module                  Size  Used by
# modprobe floppy
# lsmod
Module                  Size  Used by
floppy                 40029  0
# dd if=/dev/fd0 of=/dev/null bs=4096 count=1 conv=notrunc 2>/dev/null
# lsmod
Module                  Size  Used by
floppy                 40029  0
# rmmod floppy
# echo $?
0
# lsmod
Module                  Size  Used by
# 

-- 
Jari Ruusu  1024R/3A220F51 5B 4B F9 BB D3 3F 52 E9  DB 1D EB E3 24 0E A9 DD

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-06-10 11:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-07  5:20 2.6.35-rc2 module reference counting broken Jari Ruusu
2010-06-07  6:44 ` Al Viro
2010-06-08 23:48   ` Al Viro
2010-06-09  7:01     ` Tejun Heo
2010-06-10  6:34       ` Jari Ruusu
2010-06-10 11:31         ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox