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: <20190903073726.21880-1-yuehaibing@huawei.com>
Date:   Tue, 3 Sep 2019 15:37:26 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     <jannh@...gle.com>, <axboe@...nel.dk>, <dhowells@...hat.com>,
        <james.morris@...rosoft.com>, <yuehaibing@...wei.com>
CC:     <linux-kernel@...r.kernel.org>
Subject: [PATCH -next] misc: watch_queue: Fix build error

drivers/misc/watch_queue.c: In function watch_queue_account_mem:
drivers/misc/watch_queue.c:309:38: error: struct user_struct has no member named locked_vm; did you mean locked_shm?
  cur_pages = atomic_long_read(&user->locked_vm);
                                      ^~~~~~~~~
                                      locked_shm

struct user_struct {
...
   #if defined(CONFIG_PERF_EVENTS) || defined(CONFIG_BPF_SYSCALL) || \
       defined(CONFIG_NET) || defined(CONFIG_IO_URING)
           atomic_long_t locked_vm;
   #endif
...
}

If none of the CONFIGS is defined, locked_vm will be unavailable.

Reported-by: Hulk Robot <hulkci@...wei.com>
Fixes: 064756fb355a ("General notification queue with user mmap()'able ring buffer")
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
 include/linux/sched/user.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/sched/user.h b/include/linux/sched/user.h
index 917d88e..126494d 100644
--- a/include/linux/sched/user.h
+++ b/include/linux/sched/user.h
@@ -33,7 +33,8 @@ struct user_struct {
 	kuid_t uid;
 
 #if defined(CONFIG_PERF_EVENTS) || defined(CONFIG_BPF_SYSCALL) || \
-    defined(CONFIG_NET) || defined(CONFIG_IO_URING)
+	defined(CONFIG_NET) || defined(CONFIG_IO_URING) || \
+	defined(CONFIG_WATCH_QUEUE)
 	atomic_long_t locked_vm;
 #endif
 
-- 
2.7.4


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ