From: Tomas Henzl <thenzl@redhat.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: James Bottomley <James.Bottomley@hansenpartnership.com>,
Bart Van Assche <bvanassche@acm.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
Stanislaw Gruszka <sgruszka@redhat.com>,
Mike Christie <mchristi@redhat.com>,
stefanr@s5r6.in-berlin.de
Subject: Re: [RFC] How to fix an async scan - 'rmmod --wait' race?
Date: Mon, 28 May 2012 13:58:15 +0200 [thread overview]
Message-ID: <4FC36857.2060101@redhat.com> (raw)
In-Reply-To: <CAA9_cmd1DF_SxJOjzZj9zFEzsbOQuq+7KQAJ56SvOuRLC-QwDQ@mail.gmail.com>
On 05/25/2012 08:46 PM, Dan Williams wrote:
> On Fri, May 25, 2012 at 8:13 AM, Tomas Henzl <thenzl@redhat.com> wrote:
>> May 25 04:25:54 localhost kernel: [ 461.525209] BUG: unable to handle kernel NULL pointer dereference at 0000000000000079
>> May 25 04:25:54 localhost kernel: [ 461.525242] IP: [<ffffffff811f0c45>] sysfs_create_dir+0x35/0xc0
> Have a look at:
>
> http://marc.info/?l=linux-scsi&m=133793175125892&w=2
>
> ...it addresses tearing down targets before they are added which
> appears to be the signature here.
Yes it helps, I can not reproduce this^ BUG any longer.
The problem I'm trying to fix can be seen when the lld is removed while
the scsi async scan is running. The reason is, that the pointers to the lld stored
in scsi_host_template are accesed even after the lld is removed.
Several possibilities how to fix this have evolved during the time the two main options
are -1) protect the scan process with try_modele_get/put, there is a problem
with 'rmmod --wait'. This seems now, with your patch, to be removed (the try_module-get-put
fix is still needed). I don't believe this is 100% safe because of the problems
in scsi_device_get.
2) the patch posted here http://marc.info/?l=linux-scsi&m=133527313522298&w=2
it cancels the async scan, when the driver calls scsi_remove_host.(it's faster :)
I hope it is safe -I haven't seen any problems, tested without your patch.
I think your use case differs, so this patch won't fix problems you see.
--------------
>From my point of view your patch is needed and one of the two patches referenced above is needed
too, I don't care which one will be used.
Tomas
>
> --
> Dan
> --
> 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
prev parent reply other threads:[~2012-05-28 11:58 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-05 13:58 [RFC] How to fix an async scan - rmmod race? Tomas Henzl
2012-04-05 15:57 ` Mike Christie
2012-04-05 16:05 ` Mike Christie
2012-04-05 18:00 ` Bart Van Assche
2012-04-05 21:29 ` Mike Christie
2012-04-06 9:24 ` Bart Van Assche
2012-04-06 17:22 ` Mike Christie
2012-04-06 18:37 ` Bart Van Assche
2012-04-11 21:46 ` Mike Christie
2012-04-06 9:54 ` Tomas Henzl
2012-04-06 15:20 ` James Bottomley
2012-04-06 16:15 ` Bart Van Assche
2012-04-06 16:35 ` James Bottomley
2012-04-06 17:01 ` Bart Van Assche
2012-04-06 17:15 ` James Bottomley
2012-04-06 17:59 ` Bart Van Assche
2012-04-08 17:38 ` Bart Van Assche
2012-04-11 18:17 ` Mike Christie
2012-04-11 18:30 ` Mike Christie
2012-04-11 19:47 ` Bart Van Assche
2012-04-11 22:28 ` Mike Christie
2012-04-12 10:48 ` Bart Van Assche
2012-04-06 9:39 ` Bart Van Assche
2012-04-06 10:14 ` Tomas Henzl
2012-04-06 13:13 ` Tomas Henzl
2012-04-06 14:38 ` Bart Van Assche
2012-04-06 15:32 ` Tomas Henzl
2012-04-12 12:48 ` [RFC] How to fix an async scan - rmmod race? try_module_get Tomas Henzl
2012-04-18 16:48 ` [RFC] How to fix an async scan - 'rmmod --wait' race? Tomas Henzl
2012-04-18 18:18 ` Bart Van Assche
2012-05-17 8:42 ` James Bottomley
2012-05-17 8:55 ` Bart Van Assche
2012-05-17 9:01 ` James Bottomley
2012-05-17 14:51 ` Tomas Henzl
2012-05-22 10:05 ` James Bottomley
2012-05-25 15:13 ` Tomas Henzl
2012-05-25 18:46 ` Dan Williams
2012-05-28 11:58 ` Tomas Henzl [this message]
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=4FC36857.2060101@redhat.com \
--to=thenzl@redhat.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=bvanassche@acm.org \
--cc=dan.j.williams@intel.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mchristi@redhat.com \
--cc=sgruszka@redhat.com \
--cc=stefanr@s5r6.in-berlin.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.