public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ian Collier <Ian.Collier@comlab.ox.ac.uk>
To: linux-kernel@vger.kernel.org
Subject: 2.6.13: loop ioctl crashes
Date: Fri, 9 Sep 2005 13:27:26 +0100	[thread overview]
Message-ID: <20050909132725.C23462@pixie.comlab> (raw)

I'm trying out PPDD from https://retiisi.dyndns.org/~sailus/ppdd/
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.

imc

             reply	other threads:[~2005-09-09 12:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-09 12:27 Ian Collier [this message]
2005-09-09 12:32 ` 2.6.13: loop ioctl crashes linux-os (Dick Johnson)
2005-09-09 13:38   ` Ian Collier
2005-09-09 14:41     ` linux-os (Dick Johnson)
2005-09-09 14:59       ` linux-os (Dick Johnson)
2005-09-09 15:42       ` Ian Collier
2005-09-14 12:51 ` 2.6.13: More on drivers/block/loop.c Ian Collier
2005-09-14 13:12   ` Anton Altaparmakov
2005-09-14 15:38 ` loop: auto-load crypto module [PATCH] Ian Collier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050909132725.C23462@pixie.comlab \
    --to=ian.collier@comlab.ox.ac.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox