[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-7635b03adf3d7b84da7649b81efa91e6ebf11b85@git.kernel.org>
Date: Fri, 3 Apr 2009 12:51:41 GMT
From: Li Zefan <lizf@...fujitsu.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, acme@...hat.com, hpa@...or.com,
mingo@...hat.com, lizf@...fujitsu.com, alan.brunelle@...com,
jens.axboe@...cle.com, tglx@...utronix.de, mingo@...e.hu
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@...fujitsu.com>
AuthorDate: Fri, 3 Apr 2009 15:31:34 +0800
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Fri, 3 Apr 2009 14:48:11 +0200
blktrace: small cleanup in blk_msg_write()
Signed-off-by: Li Zefan <lizf@...fujitsu.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: "Alan D. Brunelle" <alan.brunelle@...com>
Cc: Jens Axboe <jens.axboe@...cle.com>
LKML-Reference: <49D5BB56.7000807@...fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@...e.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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists