diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-04-03 09:31:34 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-03 14:48:11 +0200 |
commit | 7635b03adf3d7b84da7649b81efa91e6ebf11b85 (patch) | |
tree | 072f7292c865162b7fb00fa33a68f0486f327563 | |
parent | blktrace: NUL-terminate user space messages (diff) | |
download | linux-7635b03adf3d7b84da7649b81efa91e6ebf11b85.tar.xz linux-7635b03adf3d7b84da7649b81efa91e6ebf11b85.zip |
blktrace: small cleanup in blk_msg_write()
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: "Alan D. Brunelle" <alan.brunelle@hp.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
LKML-Reference: <49D5BB56.7000807@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to '')
-rw-r--r-- | kernel/trace/blktrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index a400b861fad3..73d7860b72e2 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -327,7 +327,7 @@ static ssize_t blk_msg_write(struct file *filp, const char __user *buffer, char *msg; struct blk_trace *bt; - if (count > BLK_TN_MAX_MSG - 1) + if (count >= BLK_TN_MAX_MSG) return -EINVAL; msg = kmalloc(count + 1, GFP_KERNEL); |