[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C0C819E.EA5D6A18@users.sourceforge.net>
Date: Mon, 07 Jun 2010 08:20:30 +0300
From: Jari Ruusu <jariruusu@...rs.sourceforge.net>
To: linux-kernel@...r.kernel.org
CC: Rusty Russell <rusty@...tcorp.com.au>,
Al Viro <viro@...iv.linux.org.uk>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: 2.6.35-rc2 module reference counting broken
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists