From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 8141AC678DB for ; Tue, 7 Mar 2023 18:56:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233468AbjCGS41 (ORCPT ); Tue, 7 Mar 2023 13:56:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233462AbjCGS4K (ORCPT ); Tue, 7 Mar 2023 13:56:10 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9DDB9749B for ; Tue, 7 Mar 2023 10:43:40 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 9021AB819CA for ; Tue, 7 Mar 2023 18:43:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6447C433D2; Tue, 7 Mar 2023 18:43:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678214583; bh=iYX5qWHMaH8B8G9kRwtvIs+1rTAjqHYKdfBR7y97xeI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wlUBf9uvXN+D2gR+ljrb7uf1vTsQAAKnJBFQ0B2n1TEV32wTOSumFlSacz6N0UNLU wr6uq1XovIwg/P7H6z8Sz6/DZZIMb5tNeF8CfwRDD4hHFotv9XFoEGj894fZwCgA8w xfQIo9qgaO/kpaohb3AsDjkMSUoYCNc7u4PzUUD4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Antonio Alvarez Feijoo , "Masami Hiramatsu (Google)" Subject: [PATCH 6.1 839/885] tools/bootconfig: fix single & used for logical condition Date: Tue, 7 Mar 2023 18:02:53 +0100 Message-Id: <20230307170038.301092294@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307170001.594919529@linuxfoundation.org> References: <20230307170001.594919529@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Antonio Alvarez Feijoo commit cf8c59a3756b2735c409a9b3ac1e4ec556546a7a upstream. A single & will create a background process and return true, so the grep command will run even if the file checked in the first condition does not exist. Link: https://lore.kernel.org/all/20230112114215.17103-1-antonio.feijoo@suse.com/ Fixes: 1eaad3ac3f39 ("tools/bootconfig: Use per-group/all enable option in ftrace2bconf script") Signed-off-by: Antonio Alvarez Feijoo Cc: stable@vger.kernel.org Acked-by: Masami Hiramatsu (Google) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Greg Kroah-Hartman --- tools/bootconfig/scripts/ftrace2bconf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/bootconfig/scripts/ftrace2bconf.sh +++ b/tools/bootconfig/scripts/ftrace2bconf.sh @@ -93,7 +93,7 @@ referred_vars() { } event_is_enabled() { # enable-file - test -f $1 & grep -q "1" $1 + test -f $1 && grep -q "1" $1 } per_event_options() { # event-dir