Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755165AbbBTXru (ORCPT ); Fri, 20 Feb 2015 18:47:50 -0500 Received: from dragon.rutgers.edu ([128.6.4.3]:45196 "EHLO dragon.rutgers.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754759AbbBTXrt (ORCPT ); Fri, 20 Feb 2015 18:47:49 -0500 X-Greylist: delayed 3600 seconds by postgrey-1.27 at vger.kernel.org; Fri, 20 Feb 2015 18:47:49 EST X-ExtScanner: Niversoft's Regex Matcher X-Spam-ASN: X-Spam-Relay-Country: X-Spam-Language: From: Zi Yan To: rostedt@goodmis.org, mingo@redhat.com, linux-kernel@vger.kernel.org Cc: Zi Yan Subject: [PATCH] tracing: Allow larger than PAGE_SIZE filter pattern Date: Fri, 20 Feb 2015 17:47:23 -0500 Message-Id: <1424472443-12422-1-git-send-email-zi.yan@cs.rutgers.edu> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1491 Lines: 48 Large applications(e.g. Cassandra) may have hundreds of threads running. To trace all those threads, larger size(>PAGE_SIZE) of filter pattern is needed. Signed-off-by: Zi Yan --- kernel/trace/trace_events.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index db54dda..8347c48 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -1092,15 +1092,12 @@ event_filter_write(struct file *filp, const char __user *ubuf, size_t cnt, char *buf; int err = -ENODEV; - if (cnt >= PAGE_SIZE) - return -EINVAL; - - buf = (char *)__get_free_page(GFP_TEMPORARY); + buf = (char *)alloc_pages_exact(cnt, GFP_TEMPORARY); if (!buf) return -ENOMEM; if (copy_from_user(buf, ubuf, cnt)) { - free_page((unsigned long) buf); + free_pages_exact((unsigned long) buf, cnt); return -EFAULT; } buf[cnt] = '\0'; @@ -1111,7 +1108,7 @@ event_filter_write(struct file *filp, const char __user *ubuf, size_t cnt, err = apply_event_filter(file, buf); mutex_unlock(&event_mutex); - free_page((unsigned long) buf); + free_pages_exact((unsigned long) buf, cnt); if (err < 0) return err; -- 2.1.4 -- 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/