linux-next: build warning after merge of the akpm-current tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

In file included from arch/x86/include/asm/percpu.h:45,
                 from arch/x86/include/asm/current.h:6,
                 from include/linux/sched.h:12,
                 from include/linux/uaccess.h:5,
                 from fs/proc/base.c:51:
fs/proc/base.c: In function 'proc_smack_attr_dir_lookup':
include/linux/kernel.h:73:25: warning: passing argument 4 of 'proc_pident_lookup' makes pointer from integer without a cast [-Wint-conversion]
 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/proc/base.c:2602:7: note: in expansion of macro 'ARRAY_SIZE'
       ARRAY_SIZE(LSM##_attr_dir_stuff)); \
       ^~~~~~~~~~
fs/proc/base.c:2615:1: note: in expansion of macro 'LSM_DIR_OPS'
 LSM_DIR_OPS(smack);
 ^~~~~~~~~~~
fs/proc/base.c:2454:31: note: expected 'const struct pid_entry *' but argument is of type 'long unsigned int'
       const struct pid_entry *end)
       ~~~~~~~~~~~~~~~~~~~~~~~~^~~

Introduced by commit

  f6e3521a4c5b ("proc: calculate end pointer for /proc/*/* lookup at compile time")

interacting with commit

  6d9c939dbe4d ("procfs: add smack subdir to attrs")

from the security tree.

I have applied the following merge fix patch

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Thu, 31 Jan 2019 15:56:56 +1100
Subject: [PATCH] proc: merge fix for proc_pident_lookup() API change

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
 fs/proc/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index 4ac7f32c1929..3daca4367d29 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2599,7 +2599,7 @@ static struct dentry *proc_##LSM##_attr_dir_lookup(struct inode *dir, \
 { \
 	return proc_pident_lookup(dir, dentry, \
 				  LSM##_attr_dir_stuff, \
-				  ARRAY_SIZE(LSM##_attr_dir_stuff)); \
+				  LSM##_attr_dir_stuff + ARRAY_SIZE(LSM##_attr_dir_stuff)); \
 } \
 \
 static const struct inode_operations proc_##LSM##_attr_dir_inode_ops = { \
-- 
2.20.1

---
Cheers,
Stephen Rothwell

Attachment: pgpVFoRT5Zn8L.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux