[Crash-utility] [PATCH v3 1/3] memory_driver: Ensure PWD points to the current directory

Mathias Krause minipli at grsecurity.net
Thu Sep 28 09:19:06 UTC 2023


Building crash.ko broke in commit 74ac92971241 ("Support for multiple
jobs to build crash"), as PWD won't be updated on recursive calls to
'make' and will still point to the upper directory.

This leads to the 'all' target trying to build modules in the top level
directory -- where there are none.

Fix that by updating PWD to the current directory.

Fixes: 74ac92971241 ("Support for multiple jobs to build crash")
Reported-by: Lianbo Jiang <lijiang at redhat.com>
Signed-off-by: Mathias Krause <minipli at grsecurity.net>
---
 memory_driver/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/memory_driver/Makefile b/memory_driver/Makefile
index b494aa3cd184..d0f3ccc912f4 100644
--- a/memory_driver/Makefile
+++ b/memory_driver/Makefile
@@ -9,6 +9,7 @@
 # GNU General Public License for more details.
 #
 obj-m := crash.o
+PWD := $(shell pwd)
 all:
 	make -C /lib/modules/`uname -r`/build M=${PWD} SUBDIRS=${PWD} modules
 clean:
-- 
2.30.2



More information about the Crash-utility mailing list