On Mon 07-01-13 20:30:38, Fernando Luis Vázquez Cao wrote: > If a frozen bdev does not have a filesystem sitting on top of it any subsequent > nested freeze will cause a null pointer dereference because freeze_bdev() > calls drop_super() unconditionally. drop_super() should be called only when > there is a superblock to drop. Looks good. You can add: Reviewed-by: Jan Kara <jack@xxxxxxx> Honza > > Cc: linux-fsdevel@xxxxxxxxxxxxxxx > Cc: Josef Bacik <jbacik@xxxxxxxxxxxx> > Cc: Eric Sandeen <sandeen@xxxxxxxxxx> > Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx> > Cc: Jan Kara <jack@xxxxxxx> > Cc: Dave Chinner <dchinner@xxxxxxxxxx> > Cc: Luiz Capitulino <lcapitulino@xxxxxxxxxx> > Signed-off-by: Fernando Luis Vazquez Cao <fernando@xxxxxxxxxxxxx> > --- > > diff -urNp linux-3.8-rc1-orig/fs/block_dev.c linux-3.8-rc1/fs/block_dev.c > --- linux-3.8-rc1-orig/fs/block_dev.c 2012-12-25 11:38:05.072018000 +0900 > +++ linux-3.8-rc1/fs/block_dev.c 2012-12-25 11:50:43.060018000 +0900 > @@ -227,8 +227,8 @@ struct super_block *freeze_bdev(struct b > * to freeze_bdev grab an active reference and only the last > * thaw_bdev drops it. > */ > - sb = get_super(bdev); > - drop_super(sb); > + if ((sb = get_super(bdev)) != NULL) > + drop_super(sb); > mutex_unlock(&bdev->bd_fsfreeze_mutex); > return sb; > } > > -- Jan Kara <jack@xxxxxxx> SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html