lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251027091231.1770-1-bajing@cmss.chinamobile.com>
Date: Mon, 27 Oct 2025 17:12:30 +0800
From: bajing <bajing@...s.chinamobile.com>
To: akpm@...ux-foundation.org
Cc: linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	bajing <bajing@...s.chinamobile.com>
Subject: [PATCH] Fix the problem that kunit cannot run

When running ./tools/testing/kunit/kunit.py run,the error for mm/swap.h
is as follows:
ERROR:root:In file included from ../mm/shmem.c:43:
../mm/swap.h: In function ‘non_swapcache_batch’:
../mm/swap.h:66:19: error: implicit declaration of function ‘swp_offset’;
did you mean ‘pud_offset’? [-Werror=implicit-function-declaration]
   66 |  pgoff_t offset = swp_offset(entry);
      |                   ^~~~~~~~~~
      |                   pud_offset
In file included from ../mm/shmem.c:68:
../include/linux/swapops.h: At top level:
../include/linux/swapops.h:107:23: error: conflicting types for ‘swp_offset’
  107 | static inline pgoff_t swp_offset(swp_entry_t entry)
      |                       ^~~~~~~~~~
In file included from ../mm/shmem.c:43:
../mm/swap.h:66:19: note: previous implicit declaration of ‘swp_offset’ was here
   66 |  pgoff_t offset = swp_offset(entry);
      |                   ^~~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [../scripts/Makefile.build:243: mm/shmem.o] Error 1
make[3]: *** [../scripts/Makefile.build:480: mm] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/home/openeuler/kernel/Makefile:1924: .] Error 2
make[1]: *** [/home/openeuler/kernel/Makefile:234: __sub-make] Error 2
make: *** [Makefile:234: __sub-make] Error 2

Signed-off-by: bajing <bajing@...s.chinamobile.com>
---
 mm/swap.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/swap.h b/mm/swap.h
index 26fa536a8947..04695e1af068 100644
--- a/mm/swap.h
+++ b/mm/swap.h
@@ -4,6 +4,7 @@
 
 #ifdef CONFIG_SWAP
 #include <linux/blk_types.h> /* for bio_end_io_t */
+#include <linux/swapops.h>
 
 /* linux/mm/page_io.c */
 int sio_pool_init(void);
-- 
2.50.1.windows.1




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ