mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pete Zaitcev <zaitcev@redhat.com>
To: Clemens Schwaighofer <cs@tequila.co.jp>,
	zaitcev@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: oops in 2.6.8.1-mm4 and usb
Date: Tue, 31 Aug 2004 23:26:28 -0700	[thread overview]
Message-ID: <20040831232628.39dae8a3@lembas.zaitcev.lan> (raw)
In-Reply-To: <mailman.1093944725.30419.linux-kernel2news@redhat.com>

On Tue, 31 Aug 2004 18:26:51 +0900
Clemens Schwaighofer <cs@tequila.co.jp> wrote:

> So I could mount it and then copied some files there. But when I tried
> to unmount the disk light on the iriver never went of. So after ~1 hour
> I just pulled the usb cable. I got the oops (see below).

> end_request: I/O error, dev uba, sector 64
> FAT bread failed in fat_clusters_flush
> Unable to handle kernel NULL pointer dereference at virtual address 0000004c
> EFLAGS: 00010202   (2.6.8.1-mm4)
> EIP is at kobject_get+0xf/0x4e
> ~ [<c02b03ee>] get_device+0x18/0x21
> ~ [<c02b0209>] device_remove_file+0x1b/0x4e
> ~ [<e19d7e4c>] ub_disconnect+0x105/0x1b5 [ub]
> ~ [<c032d855>] usb_unbind_interface+0x7a/0x7c
> ~ [<c02b1271>] device_release_driver+0x64/0x66
> ~ [<c02b148a>] bus_remove_device+0x64/0xa5
> ~ [<c02b045e>] device_del+0x5d/0x9b
> ~ [<c0334ac1>] usb_disable_device+0xb9/0xf9

This oops is very mysterious, because it indicates that sc->intf was
NULL, which is not possible when device_remove_file was called.

I'll look at it. For the moment, just make sure you have this:

--- linux-2.6.8.1-mm3/drivers/block/ub.c	2004-08-20 21:37:29.000000000 -0700
+++ linux-2.6.8.1-mm3-ub/drivers/block/ub.c	2004-08-31 23:12:53.918679808 -0700
@@ -1185,9 +1217,17 @@
 		goto error;
 	}
 
+	/*
+	 * ``If the allocation length is eighteen or greater, and a device
+	 * server returns less than eithteen bytes of data, the application
+	 * client should assume that the bytes not transferred would have been
+	 * zeroes had the device server returned those bytes.''
+	 */
 	memset(&sc->top_sense, 0, UB_SENSE_SIZE);
+
 	scmd = &sc->top_rqs_cmd;
 	scmd->cdb[0] = REQUEST_SENSE;
+	scmd->cdb[4] = UB_SENSE_SIZE;
 	scmd->cdb_len = 6;
 	scmd->dir = UB_DIR_READ;
 	scmd->state = UB_CMDST_INIT;

It won't resolve your oops, but at least the I/O should succeed now,
so you would have a chance to unmount the thing before unplugging.

-- Pete

       reply	other threads:[~2004-09-01  6:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1093944725.30419.linux-kernel2news@redhat.com>
2004-09-01  6:26 ` Pete Zaitcev [this message]
2004-09-01 10:41   ` Clemens Schwaighofer
2004-08-31  9:26 Clemens Schwaighofer
2004-08-31 16:09 ` Clemens Schwaighofer

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=20040831232628.39dae8a3@lembas.zaitcev.lan \
    --to=zaitcev@redhat.com \
    --cc=cs@tequila.co.jp \
    --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

all inboxes | Powered by JetHome®