From: Bart Van Assche <bvanassche@acm.org>
To: John Garry <john.garry@huawei.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Ming Lei <ming.lei@redhat.com>, Hannes Reinecke <hare@suse.de>,
Mike Christie <michael.christie@oracle.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
"James E.J. Bottomley" <jejb@linux.ibm.com>
Subject: Re: [PATCH v4 4/4] scsi: core: Rework the code for dropping the LLD module reference
Date: Wed, 14 Sep 2022 10:54:42 -0700 [thread overview]
Message-ID: <b62a8571-b1cf-fc09-3dae-3c75c06bbb32@acm.org> (raw)
In-Reply-To: <011da034-b67a-c232-ebe0-d6d7d802247f@huawei.com>
On 9/14/22 02:52, John Garry wrote:
> On 13/09/2022 20:57, Bart Van Assche wrote:
>> - mod = sdev->host->hostt->module;
>> + mod = sdev->drop_module_ref ? sdev->host->hostt->module : NULL;
>
> I suppose that this works.
>
> My reservation is that there were some concerns of current module
> referencing solution, so may not be better to build directly on it:
>
> https://lore.kernel.org/linux-scsi/Ynt0aFMX+z%2FUhGJ2@infradead.org/
Hi John,
The above link points at a reply from Christoph Hellwig with the
suggestion to use __module_get(). Implementing that suggestion would
require to modify the kernel module implementation. My conclusion from
reading the code in kernel/module/main.c is that increasing the module
reference count after unloading has started currently has no effect. I
have not found any code in the delete_module() system call
implementation that waits for the reference count to drop to zero after
try_stop_module() succeeded. I will look into this.
Thanks,
Bart.
next prev parent reply other threads:[~2022-09-14 17:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-13 19:57 [PATCH v4 0/4] Prepare for constifying SCSI host templates Bart Van Assche
2022-09-13 19:57 ` [PATCH v4 1/4] scsi: esas2r: Initialize two host template members implicitly Bart Van Assche
2022-09-14 9:05 ` John Garry
2022-09-13 19:57 ` [PATCH v4 2/4] scsi: esas2r: Introduce scsi_template_proc_dir() Bart Van Assche
2022-09-14 9:06 ` John Garry
2022-09-14 16:43 ` Bart Van Assche
2022-09-14 16:53 ` John Garry
2022-09-13 19:57 ` [PATCH v4 3/4] scsi: core: Introduce a new list for SCSI proc directory entries Bart Van Assche
2022-09-14 9:43 ` John Garry
2022-09-14 16:52 ` Bart Van Assche
2022-09-13 19:57 ` [PATCH v4 4/4] scsi: core: Rework the code for dropping the LLD module reference Bart Van Assche
2022-09-14 9:52 ` John Garry
2022-09-14 17:54 ` Bart Van Assche [this message]
2022-09-14 9:21 ` [PATCH v4 0/4] Prepare for constifying SCSI host templates John Garry
2022-09-14 17:06 ` Bart Van Assche
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=b62a8571-b1cf-fc09-3dae-3c75c06bbb32@acm.org \
--to=bvanassche@acm.org \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jejb@linux.ibm.com \
--cc=john.garry@huawei.com \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michael.christie@oracle.com \
--cc=ming.lei@redhat.com \
/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.