diff options
author | Sage Weil <sage@newdream.net> | 2011-05-13 05:57:03 +0200 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-05-24 20:52:03 +0200 |
commit | aedfec59eed37d1ff7ce09b303b668234e9a7f8e (patch) | |
tree | 92e3e6e638acd63b07aab244cdd30826277001be /drivers/block | |
parent | rbd: cleanup: make kfree match kmalloc (diff) | |
download | linux-aedfec59eed37d1ff7ce09b303b668234e9a7f8e.tar.xz linux-aedfec59eed37d1ff7ce09b303b668234e9a7f8e.zip |
rbd: use snprintf for disk->disk_name
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rbd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 0d80967e140c..d833d02b321f 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1721,7 +1721,8 @@ static int rbd_init_disk(struct rbd_device *rbd_dev) if (!disk) goto out; - sprintf(disk->disk_name, DRV_NAME "%d", rbd_dev->id); + snprintf(disk->disk_name, sizeof(disk->disk_name), DRV_NAME "%d", + rbd_dev->id); disk->major = rbd_dev->major; disk->first_minor = 0; disk->fops = &rbd_bd_ops; |