[lkml]   [2005]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject2.6.13: loop ioctl crashes
I'm trying out PPDD from
because I have some old stuff in that format. However, the crash
seems to occur in code that isn't touched by the PPDD patch. It
happens while I'm trying to set up the loop device - I haven't got
as far as actually using it yet.

If I'm lucky then when I issue the losetup command and successfully
type in the passphrase then losetup says something of the form
ioctl: LOOP_SET_STATUS: Bad address
and the kernel says:

Debug: sleeping function called from invalid context at arch/i386/lib/usercopy.c:634
in_atomic():1, irqs_disabled():0
[<c011f8eb>] __might_sleep+0xab/0xc0
[<c0211aa3>] copy_from_user+0x23/0x90
[<d0a9fe80>] loop_set_status_old+0x30/0x70 [loop]

However, it often seems to panic in a variety of horrible ways while
trying to print the above message.

Clearly I have CONFIG_DEBUG_SPINLOCK_SLEEP set (as my config is
based on Fedora's), and I suppose I could just try unsetting it to
make the message go away. That wouldn't make the underlying bug go
away, though. If it makes any difference, loop and all the crypto
algorithms are compiled as modules.

I don't understand why it's an invalid context. I also don't understand
why the traceback stops at loop_set_status_old given that it must have
been called from lo_ioctl. (But maybe the answer to the latter would
explain the former.)

I may try just moving the copy_from_user() out to the beginning of
lo_ioctl and see what happens. Any other suggestions? In case it's
not obvious by now, I'm not really a kernel hacker.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-09-09 14:31    [W:0.072 / U:1.164 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site