lkml.org 
[lkml]   [2009]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:tracing/blktrace-v2] blktrace: small cleanup in blk_msg_write()
Commit-ID:  7635b03adf3d7b84da7649b81efa91e6ebf11b85
Gitweb: http://git.kernel.org/tip/7635b03adf3d7b84da7649b81efa91e6ebf11b85
Author: Li Zefan <lizf@cn.fujitsu.com>
AuthorDate: Fri, 3 Apr 2009 15:31:34 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 3 Apr 2009 14:48:11 +0200

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>


---
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 a400b86..73d7860 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);

\
 
 \ /
  Last update: 2009-04-03 14:55    [W:0.110 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site