Patch "md/raid1-10: fix casting from randomized structure in raid1_submit_write()" has been added to the 6.3-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    md/raid1-10: fix casting from randomized structure in raid1_submit_write()

to the 6.3-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     md-raid1-10-fix-casting-from-randomized-structure-in-raid1_submit_write.patch
and it can be found in the queue-6.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From b5a99602b74bbfa655be509c615181dd95b0719e Mon Sep 17 00:00:00 2001
From: Yu Kuai <yukuai3@xxxxxxxxxx>
Date: Fri, 16 Jun 2023 09:21:36 +0800
Subject: md/raid1-10: fix casting from randomized structure in raid1_submit_write()

From: Yu Kuai <yukuai3@xxxxxxxxxx>

commit b5a99602b74bbfa655be509c615181dd95b0719e upstream.

Following build error triggered while build with clang version 17.0.0
with W=1(this can't be reporduced with gcc 13.1.0):

drivers/md/raid1-10.c:117:25: error: casting from randomized structure
pointer type 'struct block_device *' to 'struct md_rdev *'
     117 |         struct md_rdev *rdev = (struct md_rdev *)bio->bi_bdev;
         |                                ^

Fix this by casting 'bio->bi_bdev' to 'void *', as it used to be.

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202306142042.fmjfmTF8-lkp@xxxxxxxxx/
Fixes: 8295efbe68c0 ("md/raid1-10: factor out a helper to submit normal write")
Signed-off-by: Yu Kuai <yukuai3@xxxxxxxxxx>
Signed-off-by: Song Liu <song@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20230616012136.3047071-1-yukuai1@xxxxxxxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/md/raid1-10.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/md/raid1-10.c
+++ b/drivers/md/raid1-10.c
@@ -113,7 +113,7 @@ static void md_bio_reset_resync_pages(st
 
 static inline void raid1_submit_write(struct bio *bio)
 {
-	struct md_rdev *rdev = (struct md_rdev *)bio->bi_bdev;
+	struct md_rdev *rdev = (void *)bio->bi_bdev;
 
 	bio->bi_next = NULL;
 	bio_set_dev(bio, rdev->bdev);


Patches currently in stable-queue which might be from yukuai3@xxxxxxxxxx are

queue-6.3/md-raid1-10-factor-out-a-helper-to-add-bio-to-plug.patch
queue-6.3/md-raid10-fix-io-loss-while-replacement-replace-rdev.patch
queue-6.3/md-raid1-10-submit-write-io-directly-if-bitmap-is-no.patch
queue-6.3/md-raid10-fix-null-ptr-deref-of-mreplace-in-raid10_s.patch
queue-6.3/block-fix-blktrace-debugfs-entries-leakage.patch
queue-6.3/block-rq_qos-protect-rq_qos-apis-with-a-new-lock.patch
queue-6.3/blk-iocost-use-spin_lock_irqsave-in-adjust_inuse_and.patch
queue-6.3/blk-mq-fix-potential-io-hang-by-wrong-wake_batch.patch
queue-6.3/md-raid1-10-factor-out-a-helper-to-submit-normal-wri.patch
queue-6.3/md-raid10-check-slab-out-of-bounds-in-md_bitmap_get_.patch
queue-6.3/md-raid10-fix-wrong-setting-of-max_corr_read_errors.patch
queue-6.3/md-raid1-10-fix-casting-from-randomized-structure-in-raid1_submit_write.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux