[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <93834519-c945-94a7-f1f8-7bf85bf86dd5@acm.org>
Date: Wed, 21 Jun 2023 08:47:10 -0700
From: Bart Van Assche <bvanassche@....org>
To: Yu Kuai <yukuai1@...weicloud.com>, hch@....de,
chaitanyak@...dia.com, shinichiro.kawasaki@....com,
dgilbert@...erlog.com, jejb@...ux.ibm.com,
martin.petersen@...cle.com, yukuai3@...wei.com, axboe@...nel.dk
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
yi.zhang@...wei.com, yangerkun@...wei.com
Subject: Re: [PATCH] scsi/sg: don't grab scsi host module reference
On 6/21/23 09:01, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@...wei.com>
>
> In order to prevent request_queue to be freed before cleaning up
> blktrace debugfs entries, commit db59133e9279 ("scsi: sg: fix blktrace
> debugfs entries leakage") use scsi_device_get(), however,
> scsi_device_get() will also grab scsi module reference and scsi module
> can't be removed.
>
> It's reported that blktests can't unload scsi_debug after block/001:
>
> blktests (master) # ./check block
> block/001 (stress device hotplugging) [failed]
> +++ /root/blktests/results/nodev/block/001.out.bad 2023-06-19
> Running block/001
> Stressing sd
> +modprobe: FATAL: Module scsi_debug is in use.
>
> Fix this problem by grabbing request_queue reference directly, so that
> scsi host module can still be unloaded while request_queue will be
> pinged by sg device.
pinged -> pinned
Otherwise this patch looks good to me.
Bart.
Powered by blists - more mailing lists