Message ID | 20220314112732.248150763@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 939D9C4332F for <stable@archiver.kernel.org>; Mon, 14 Mar 2022 11:39:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239263AbiCNLky (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 14 Mar 2022 07:40:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239318AbiCNLkn (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 14 Mar 2022 07:40:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30B39483A6; Mon, 14 Mar 2022 04:38:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6D4D261170; Mon, 14 Mar 2022 11:38:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B4A7C340E9; Mon, 14 Mar 2022 11:38:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647257900; bh=2nf8HXth9T/w8PG6CAV6F7BLmu6qUd7AypFw6oFnjUo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2TT/1bmrfqpwLItlVjzv01smb1+JxKGILQstedokSe+WRdF/3ZB7YWSO+1fyjqUhV Xf54v0FRx+3xZS4sXd6vnkJ4wS9xrYEYq0w2zmf0ylSIIoHZWBWpkKq688AjDmgdDO DR/wTkeTJfl3/QrGgrazjS25RggJRIMBynOfNrrg= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Sven Schnelle <svens@linux.ibm.com>, "Steven Rostedt (Google)" <rostedt@goodmis.org>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.19 16/30] tracing: Ensure trace buffer is at least 4096 bytes large Date: Mon, 14 Mar 2022 12:34:34 +0100 Message-Id: <20220314112732.248150763@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112731.785042288@linuxfoundation.org> References: <20220314112731.785042288@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 19a6b088f1e7..063b434c89d2 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -1118,10 +1118,12 @@ static int __init set_buf_size(char *str) if (!str) return 0; buf_size = memparse(str, &str); - /* nr_entries can not be zero */ - if (buf_size == 0) - return 0; - trace_buf_size = buf_size; + /* + * nr_entries can not be zero and the startup + * tests require some buffer space. Therefore + * ensure we have at least 4096 bytes of buffer. + */ + trace_buf_size = max(4096UL, buf_size); return 1; } __setup("trace_buf_size=", set_buf_size);