lkml.org 
[lkml]   [2010]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject2.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


\
 
 \ /
  Last update: 2010-06-07 07:33    [W:0.066 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site