On 12/08/2015 03:08 PM, Ewan D. Milne wrote:
From: "Ewan D. Milne" <emilne@xxxxxxxxxx>
The klist traversal used by the reading of /proc/scsi/scsi is not interlocked
against device removal. It takes a reference on the containing object, but
this does not prevent the device from being removed from the list. Thus, we
get errors and eventually panic, as shown in the traces below. Fix this by
keeping a klist iterator in the seq_file private data.
The problem can be easily reproduced by repeatedly increasing scsi_debug's
max_luns to 30 and then deleting the devices via sysfs, while simulatenously
accessing /proc/scsi/scsi.
From a patch originally developed by David Jeffery <djeffery@xxxxxxxxxx>
That's now, what, the third attempt on fixing this?
All previous attempts have been rejected on the grounds that
/proc/scsi/scsi is deprecated and we should allow any updates to it.
Maybe this time we get lucky ...
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@xxxxxxx +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html