Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758138AbZCZRWT (ORCPT ); Thu, 26 Mar 2009 13:22:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756186AbZCZRWF (ORCPT ); Thu, 26 Mar 2009 13:22:05 -0400 Received: from ey-out-2122.google.com ([74.125.78.25]:26192 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755774AbZCZRWD (ORCPT ); Thu, 26 Mar 2009 13:22:03 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:message-id:from:to:cc:subject:user-agent:mime-version :content-type; b=C6k8YDVbtDLzUm4RlcciTOHjhGPIHvgd2HYKYU6Y/iPhPONMIp+CT92nZQYAn929nF /kWQKSIQnH65Y+GiZ6piL+nGxqBTWENVEHX4qRe/VjGNuqTsi0B7ZjkUImgHozDknJK6 oqvm0jdYaT1Mo0JaNN8C/Gh7tlW+m1zImVkl8= Date: Thu, 26 Mar 2009 18:22:18 +0100 Message-ID: <87zlf8kxmd.wl%vmayatsk@redhat.com> From: Vitaly Mayatskikh To: linux-kernel@vger.kernel.org Cc: Pekka Paalanen Subject: [PATCH] ftrace: advance readpos in trace_seq_to_user() by really read bytes User-Agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/22.3 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 701 Lines: 24 If tracer will not provide input buffer of enough size, he will never see data between cnt and len bytes. diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 17bb88d..0217615 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -477,7 +477,7 @@ ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf, size_t cnt) if (ret) return -EFAULT; - s->readpos += len; + s->readpos += cnt; return cnt; } -- wbr, Vitaly -- 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/