Skip to contentSkip to conversation

ub: oops with preempt ("Sahara Workshop")

PATCH Applied Pete Zaitcev 3 participants 4 messages Nov 23, 2004 – Nov 28, 2004 Block layer

lore
Share & tools
lore
#0 lore raw

I admit that the code should be locked properly instead, but the global plan is to drop all P3 tagged printks anyway. So let it be guarded for the moment.

drivers/block/ub.c +5 -2
@@ -1535,8 +1535,11 @@
 
 	ub_revalidate(sc);
 	/* This is pretty much a long term P3 */
-	printk(KERN_INFO "%s: device %u capacity nsec %ld bsize %u\n",
-	    sc->name, sc->dev->devnum, sc->capacity.nsec, sc->capacity.bsize);
+	if (!atomic_read(&sc->poison)) {		/* Cover sc->dev */
+		printk(KERN_INFO "%s: device %u capacity nsec %ld bsize %u\n",
+		    sc->name, sc->dev->devnum,
+		    sc->capacity.nsec, sc->capacity.bsize);
+	}
 
 	/* XXX Support sector size switching like in sr.c */
 	blk_queue_hardsect_size(disk->queue, sc->capacity.bsize);
Applied
#1 lore raw
Quoted 4 lines · Pete Zaitcev

I admit that the code should be locked properly instead, but the global plan is to drop all P3 tagged printks anyway. So let it be guarded for the moment.

Applied, thanks.

greg k-h

#2 lore raw

Re: ub: oops with preempt ("Sahara Workshop") [u]

In reply to Pete Zaitcev

On Tue, 2004-11-23 at 10:02 -0800, Pete Zaitcev wrote:

Hi,

Quoted 3 lines

I admit that the code should be locked properly instead, but the global plan is to drop all P3 tagged printks anyway. So let it be guarded for the moment.

Sorry for the delay, but I have not had any time to really test this again. I did some minor testing, and only after really working it, I could get an oops, but not nearly the same (think it was deeper into the scsi layer or maybe kobject stuff).

Will see when I can get some time to try and generate some consistent traces if any.

Thanks,

Signature · 1 line
Martin Schlemmer
#3 lore raw

Re: ub: oops with preempt ("Sahara Workshop") [u]

Quoted 9 lines · Martin Schlemmer [c]
Quoted 2 lines · Pete Zaitcev

I admit that the code should be locked properly instead, but the global plan is to drop all P3 tagged printks anyway. So let it be guarded for the moment.

Sorry for the delay, but I have not had any time to really test this again. I did some minor testing, and only after really working it, I could get an oops, but not nearly the same (think it was deeper into the scsi layer or maybe kobject stuff).

This is strange, because ub hasn't got any connection with SCSI layer.

Without trying to deflect the blame for improper locking in ub, I have to ask, does it all work without the preempt for you?

-- Pete