BUG: might_sleep in /proc/swaps code

From: Tim Hockin
Date: Wed Apr 28 2004 - 19:30:07 EST


Testing some othe rwork, totally unrelated, we added a might_sleep() to
mntput(). It turned up this:

Debug: sleeping function called from invalid context at
include/linux/mount.h:82
in_atomic():1, irqs_disabled():0
Call Trace:
[<c012378f>] __might_sleep+0xab/0xcb
[<c018787c>] d_path+0x171/0x272
[<c018ff50>] seq_path+0x4b/0xf4
[<c0165b12>] swap_show+0x3d/0x110
[<c018f87d>] seq_read+0xa8/0x31b
[<c015aa83>] do_brk+0x14f/0x21c
[<c0168fae>] vfs_read+0xaf/0x119
[<c0169224>] sys_read+0x3f/0x5d
[<c010b4e1>] sysenter_past_esp+0x52/0x71


* /proc/swaps uses seq_file code, calling seq_path() with swaplock held
* seq_path() calls d_path()
* d_path() calls mntput() which might_sleep()

Is this worth trying to solve?

--
Tim Hockin
Sun Microsystems, Linux Software Engineering
thockin@xxxxxxx
All opinions are my own, not Sun's
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/