lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 27 Sep 2006 18:43:03 +0530
From:	Srinivasa Ds <srinivasa@...ibm.com>
To:	dm-devel@...hat.com, linux-lvm@...hat.com,
	linux-kernel@...r.kernel.org, mingo@...e.hu, agk@...hat.com
Subject: [RFC] Reverting "bd_mount_mutex" to "bd_mount_sem"

Hi all
  When I was executing "dmsetup resume <device-name>" command,I got the 
error shown below. Which basically tells that, "bd_mount_mutex"  in 
thaw_bdev() is not locked by "dmsetup resume" command and hence it is 
not allowing it to unlock also.
=========================================================
Badness in debug_mutex_unlock at kernel/mutex-debug.c:80

Call Trace:
[C0000000634DB260] [C000000000010948] .show_stack+0x68/0x1b0 (unreliable)
[C0000000634DB300] [C0000000003376C4] .program_check_exception+0x1cc/0x5b0
[C0000000634DB3D0] [C0000000000047EC] program_check_common+0xec/0x100
--- Exception: 700 at .debug_mutex_unlock+0x3c/0xc4
    LR = .debug_mutex_unlock+0x30/0xc4
[C0000000634DB6C0] [C0000000634DB750] 0xc0000000634db750 (unreliable)
[C0000000634DB740] [C000000000335950] .__mutex_unlock_slowpath+0xd8/0x144
[C0000000634DB7E0] [C0000000000E2370] .thaw_bdev+0x9c/0xb8
[C0000000634DB870] [D000000000480830] .unlock_fs+0x34/0x70 [dm_mod]
[C0000000634DB900] [D000000000481720] .dm_resume+0x110/0x1ac [dm_mod]
[C0000000634DB9A0] [D000000000485C54] .dev_suspend+0x1b0/0x204 [dm_mod]
[C0000000634DBA40] [D000000000486728] .ctl_ioctl+0x29c/0x318 [dm_mod]
[C0000000634DBC30] [C0000000000F8310] .do_ioctl+0xbc/0xf0
[C0000000634DBCD0] [C0000000000F879C] .vfs_ioctl+0x458/0x498
[C0000000634DBD80] [C0000000000F8874] .sys_ioctl+0x98/0xe0
[C0000000634DBE30] [C00000000000871C] syscall_exit+0x0/0x40
======================================================================

   On debugging I found out that,"dmsetup suspend <device name>" calls 
"freeze_bdev()",which locks "bd_mount_mutex" to make sure that no new 
mounts happen on bdev until thaw_bdev() is called.
   This "thaw_bdev()" is getting called when we resume the device through
"dmsetup resume <device-name>".
   Hence we have 2 processes,one of which locks "bd_mount_mutex"(dmsetup
suspend) and Another(dmsetup resume) unlocks it.

   Since this is not allowed in mutex,I reverted back to 
bd_mount_sem(semaphore),It worked for me.

  So  need your comments for changing "bd_mount_mutex" to "bd_mount_sem".
  
  This is the patch,which I have used.

Thanks
 Srinivasa Ds
 LTC-IBM
 Bangalore



View attachment "mutex_to_sem.fix" of type "text/plain" (2389 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ