Re: [PATCH stable 5.10 1/3] block: look up holders by bdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Christoph

在 2022/08/02 13:11, Greg KH 写道:
On Mon, Aug 01, 2022 at 08:04:58PM +0200, Christoph Hellwig wrote:
On Mon, Aug 01, 2022 at 01:19:09PM +0200, Greg KH wrote:
This is very different from the upstream version, and forces the change
onto everyone, not just those who had CONFIG_BLOCK_HOLDER_DEPRECATED
enabled like was done in the main kernel tree.

Why force this on all and not just use the same option?

I'm really worried about backports that are significantly different
from the original commit.  To the point where if they are so different
and we don't have a grave security or data integrity bug I'm really not
very much in favor of backporting them at all.


I do understand that backporting these patches is not good, thanks for
taking time on this patchset.

I decided to push following patch in our version:

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 588e8b43efab..c047d5fcb325 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2149,12 +2149,16 @@ int dm_setup_md_queue(struct mapped_device *md, struct dm_table *t)

        switch (type) {
        case DM_TYPE_REQUEST_BASED:
-               md->disk->fops = &dm_rq_blk_dops;
                r = dm_mq_init_request_queue(md, t);
                if (r) {
DMERR("Cannot initialize queue for request-based dm mapped device");
                        return r;
                }
+               /*
+ * Change the fops after queue is initialized, so that bio won't
+                * issued by rq-based path until that.
+                */
+               md->disk->fops = &dm_rq_blk_dops;
                break;
        case DM_TYPE_BIO_BASED:
        case DM_TYPE_DAX_BIO_BASED:


This way only modify dm, and the problem can be fixed. If you guys think
this is OK, I can send a patch for LTS. Otherwise, if you guys still
think the null-ptr-def problem is uncommon and doesn't worth to fix,
please ignore this mail.

Thanks,
Kuai

I agree, I'll drop this from my review queue now, thanks.

greg k-h
.


--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux