linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: "Ewan D. Milne" <emilne@redhat.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH RFC 0/2] avoid crashing when reading /proc/scsi/scsi and simultaneously removing devices
Date: Fri, 18 Dec 2015 10:22:01 +0100	[thread overview]
Message-ID: <5673D039.6060805@suse.de> (raw)
In-Reply-To: <1449583704-32400-1-git-send-email-emilne@redhat.com>

On 12/08/2015 03:08 PM, Ewan D. Milne wrote:
> From: "Ewan D. Milne" <emilne@redhat.com>
>
> 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@redhat.com>
>
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@suse.de			               +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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-12-18  9:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-08 14:08 [PATCH RFC 0/2] avoid crashing when reading /proc/scsi/scsi and simultaneously removing devices Ewan D. Milne
2015-12-08 14:08 ` [PATCH RFC 1/2] drivers/base: add bus_device_iter_init, bus_device_iter_next, bus_device_iter_exit Ewan D. Milne
2015-12-18  9:22   ` Hannes Reinecke
2015-12-08 14:08 ` [PATCH RFC 2/2] scsi_proc: Change /proc/scsi/scsi to use bus device iterator Ewan D. Milne
2015-12-18  9:23   ` Hannes Reinecke
2015-12-18  9:22 ` Hannes Reinecke [this message]
2016-01-05  1:58 ` [PATCH RFC 0/2] avoid crashing when reading /proc/scsi/scsi and simultaneously removing devices Martin K. Petersen

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=5673D039.6060805@suse.de \
    --to=hare@suse.de \
    --cc=emilne@redhat.com \
    --cc=linux-scsi@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;
as well as URLs for NNTP newsgroup(s).