On Mon 13-04-15 16:31:38, Dmitry Monakhov wrote:
> 
> Signed-off-by: Dmitry Monakhov <[email protected]>
...
> @@ -2610,7 +2597,6 @@ static void handle_read_error(struct mddev *mddev, 
> struct r10bio *r10_bio)
>       struct bio *bio;
>       struct r10conf *conf = mddev->private;
>       struct md_rdev *rdev = r10_bio->devs[slot].rdev;
> -     char b[BDEVNAME_SIZE];
>       unsigned long do_sync;
>       int max_sectors;
>  
> @@ -2623,7 +2609,6 @@ static void handle_read_error(struct mddev *mddev, 
> struct r10bio *r10_bio)
>        * frozen.
>        */
>       bio = r10_bio->devs[slot].bio;
> -     bdevname(bio->bi_bdev, b);
>       bio_put(bio);
>       r10_bio->devs[slot].bio = NULL;
>  
> @@ -2639,9 +2624,9 @@ static void handle_read_error(struct mddev *mddev, 
> struct r10bio *r10_bio)
>  read_more:
>       rdev = read_balance(conf, r10_bio, &max_sectors);
>       if (rdev == NULL) {
> -             printk(KERN_ALERT "md/raid10:%s: %s: unrecoverable I/O"
> +             printk(KERN_ALERT "md/raid10:%s: %pg: unrecoverable I/O"
>                      " read error for block %llu\n",
> -                    mdname(mddev), b,
> +                    mdname(mddev), bio->bi_bdev,
>                      (unsigned long long)r10_bio->sector);
>               raid_end_bio_io(r10_bio);
>               return;
  So it seems to me that in the above, you'll reference bio->bi_bdev of an
already free bio since the code does bio_put() just after calling
bdevname()...

                                                                Honza
-- 
Jan Kara <[email protected]>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to