diff --git a/block/ioctl.c b/block/ioctl.c index 38aa194f63ec235f10e76159faf06cb183486d1f..3d866d0037f240c8d636f8b8523df962e72ab123 100644 --- a/block/ioctl.c +++ b/block/ioctl.c @@ -242,6 +242,7 @@ int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, * We need to set the startsect first, the driver may * want to override it. */ + memset(&geo, 0, sizeof(geo)); geo.start = get_start_sect(bdev); ret = disk->fops->getgeo(bdev, &geo); if (ret)