Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759067AbZDCMwm (ORCPT ); Fri, 3 Apr 2009 08:52:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755221AbZDCMwb (ORCPT ); Fri, 3 Apr 2009 08:52:31 -0400 Received: from hera.kernel.org ([140.211.167.34]:49037 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755050AbZDCMwa (ORCPT ); Fri, 3 Apr 2009 08:52:30 -0400 Date: Fri, 3 Apr 2009 12:51:41 GMT From: Li Zefan To: linux-tip-commits@vger.kernel.org Cc: linux-kernel@vger.kernel.org, acme@redhat.com, hpa@zytor.com, mingo@redhat.com, lizf@cn.fujitsu.com, alan.brunelle@hp.com, jens.axboe@oracle.com, tglx@linutronix.de, mingo@elte.hu Reply-To: mingo@redhat.com, hpa@zytor.com, acme@redhat.com, linux-kernel@vger.kernel.org, lizf@cn.fujitsu.com, alan.brunelle@hp.com, jens.axboe@oracle.com, tglx@linutronix.de, mingo@elte.hu In-Reply-To: <49D5BB56.7000807@cn.fujitsu.com> References: <49D5BB56.7000807@cn.fujitsu.com> Subject: [tip:tracing/blktrace-v2] blktrace: small cleanup in blk_msg_write() Message-ID: Git-Commit-ID: 7635b03adf3d7b84da7649b81efa91e6ebf11b85 X-Mailer: tip-git-log-daemon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (hera.kernel.org [127.0.0.1]); Fri, 03 Apr 2009 12:51:43 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1367 Lines: 39 Commit-ID: 7635b03adf3d7b84da7649b81efa91e6ebf11b85 Gitweb: http://git.kernel.org/tip/7635b03adf3d7b84da7649b81efa91e6ebf11b85 Author: Li Zefan AuthorDate: Fri, 3 Apr 2009 15:31:34 +0800 Committer: Ingo Molnar CommitDate: Fri, 3 Apr 2009 14:48:11 +0200 blktrace: small cleanup in blk_msg_write() Signed-off-by: Li Zefan Cc: Arnaldo Carvalho de Melo Cc: "Alan D. Brunelle" Cc: Jens Axboe LKML-Reference: <49D5BB56.7000807@cn.fujitsu.com> Signed-off-by: Ingo Molnar --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/