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 X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7ED33C352A3 for ; Mon, 10 Feb 2020 13:33:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 58A3C20715 for ; Mon, 10 Feb 2020 13:33:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581341581; bh=vUP6zEWYBB1yHlAQ1iOFq7JclQXJx4UoBRusEwH6Pas=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=cOObp7rWxxcnMx20wkNTjBzk4Ad/XWznfgsiM+UXRDi5AhO4PIovtlHzsv+E2K6rW qI9TAR/OmF8w1bDSCAGSh7Qruc9UEfihG6niao6uf8t7MtJuE/dJOpQkh32wWrukaK nz5WJze4FycDjASPEPUZfD/dDRNJdK2volD2S7ZE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731587AbgBJNdA (ORCPT ); Mon, 10 Feb 2020 08:33:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:53250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728065AbgBJMfl (ORCPT ); Mon, 10 Feb 2020 07:35:41 -0500 Received: from localhost (unknown [209.37.97.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E867B21739; Mon, 10 Feb 2020 12:35:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338141; bh=vUP6zEWYBB1yHlAQ1iOFq7JclQXJx4UoBRusEwH6Pas=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XLH917IZWk6mQHJJrhxab23aVr+8ZTIzFRLCv+R6f2g/MHKrOGnXNkaJepio0vogH Fh5EYGyiLFMooNU1zBzlZSLADg1UWJFtDztrfynMCkP4miP5ka6HBmM7BIAcrra5Kl vHammuzHAlDmts4INDSqMQNqiyBU8nCc9q7AT4Kw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , Alexei Starovoitov , Jesper Dangaard Brouer Subject: [PATCH 4.19 096/195] samples/bpf: Dont try to remove users homedir on clean Date: Mon, 10 Feb 2020 04:32:34 -0800 Message-Id: <20200210122314.615080352@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122305.731206734@linuxfoundation.org> References: <20200210122305.731206734@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Toke Høiland-Jørgensen commit b2e5e93ae8af6a34bca536cdc4b453ab1e707b8b upstream. The 'clean' rule in the samples/bpf Makefile tries to remove backup files (ending in ~). However, if no such files exist, it will instead try to remove the user's home directory. While the attempt is mostly harmless, it does lead to a somewhat scary warning like this: rm: cannot remove '~': Is a directory Fix this by using find instead of shell expansion to locate any actual backup files that need to be removed. Fixes: b62a796c109c ("samples/bpf: allow make to be run from samples/bpf/ directory") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/157952560126.1683545.7273054725976032511.stgit@toke.dk Signed-off-by: Greg Kroah-Hartman --- samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -221,7 +221,7 @@ all: clean: $(MAKE) -C ../../ M=$(CURDIR) clean - @rm -f *~ + @find $(CURDIR) -type f -name '*~' -delete $(LIBBPF): FORCE # Fix up variables inherited from Kbuild that tools/ build system won't like