OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
916d4d6
)
rbd: use snprintf for disk->disk_name
author
Sage Weil
<sage@newdream.net>
Fri, 13 May 2011 03:57:03 +0000
(20:57 -0700)
committer
Sage Weil
<sage@newdream.net>
Tue, 24 May 2011 18:52:03 +0000
(11:52 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
drivers/block/rbd.c
patch
|
blob
|
history
diff --git
a/drivers/block/rbd.c
b/drivers/block/rbd.c
index
0d80967
..
d833d02
100644
(file)
--- 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;