2.6.9-mm1 usb oopses
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 1 line · Andrew Morton
looks like a
ub.cproblem.
Yes. At least partially.
Quoted 12 lines
Date: Fri, 22 Oct 2004 21:59:20 +0200
From: Fabio Coatti <[email protected]>Oct 22 21:40:05 kefk kernel: ub 5-3:1.0: usb_probe_interface - got id Oct 22 21:40:05 kefk kernel: uba: device 6 capacity nsec 50 bsize 512 Oct 22 21:40:05 kefk kernel: uba: made changed Oct 22 21:40:05 kefk kernel: uba: device 6 capacity nsec 1024000 bsize 512 Oct 22 21:40:05 kefk kernel: uba: device 6 capacity nsec 1024000 bsize 512 Oct 22 21:40:05 kefk kernel: uba: uba1 Oct 22 21:40:05 kefk kernel: uba: uba1 Oct 22 21:40:05 kefk kernel: kobject_register failed for uba1 (-17) Oct 22 21:40:05 kefk kernel: [<c01f1f77>] kobject_register+0x51/0x5f
This looks like a race, but isn't. What actually happens is that the ub returns a device changed indication from check_media_changed when the device is connected. In such case, do_open will make another attempt to read partitions. I discussed it with Al and he opined that no block device should ever return a changed indication before the first open has completed. If it cannot, it should refuse the open.
This only happens to devices which refuse to come online easily. Therefore, I was going to fold a fix into a patch to add START STOP UNIT command. It is not written yet.
The other side of this, the oops, is something for Viro/James/Axboe to check out. It's entirely on their side. But of course, if ub quits tripping the double registration condition, the problem of buggy error paths in the block layer becomes moot. I'll work on it as soon as possible.
-- Pete