re: md/raid10: handle recovery of replacement devices.

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

 



Hello NeilBrown,

This is a semi-automatic email about new static checker warnings.

The patch e1f6cbf7e1b0: "md/raid10: handle recovery of replacement 
devices." from Nov 9, 2011, leads to the following Smatch complaint:

drivers/md/raid10.c +2814 sync_request()
	 error: we previously assumed 'bio' could be null (see line 2808)

drivers/md/raid10.c
  2807					bio = r10_bio->devs[1].repl_bio;
  2808					if (bio)
                                            ^^^
check.

  2809						bio->bi_end_io = NULL;
  2810					rdev = mirror->replacement;
  2811					if (rdev == NULL ||
  2812					    test_bit(Faulty, &rdev->flags))
  2813						break;
  2814					bio->bi_next = biolist;
                                        ^^^^^^^^^^^^
unconditional dereference.

  2815					biolist = bio;
  2816					bio->bi_private = r10_bio;

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux