Re: [GIT PULL] timer fixes
From: Borislav Petkov
Date: Sun Aug 14 2022 - 13:43:14 EST
On Sun, Aug 14, 2022 at 10:24:45AM -0700, Paul E. McKenney wrote:
> If it is causing more trouble than it is worth, then I have not objection
> to taking a different approach.
Well, pretty much every file I tried in the output of
git grep -e '->sighand'
triggers that sparse warning. For example:
$ make C=1 kernel/signal.o
...
kernel/signal.c:195:31: warning: incorrect type in argument 1 (different address spaces)
kernel/signal.c:195:31: expected struct spinlock [usertype] *lock
kernel/signal.c:195:31: got struct spinlock [noderef] __rcu *
kernel/signal.c:198:33: warning: incorrect type in argument 1 (different address spaces)
kernel/signal.c:198:33: expected struct spinlock [usertype] *lock
kernel/signal.c:198:33: got struct spinlock [noderef] __rcu *
kernel/signal.c:480:9: warning: incorrect type in argument 1 (different address spaces)
kernel/signal.c:480:9: expected struct spinlock [usertype] *lock
kernel/signal.c:480:9: got struct spinlock [noderef] __rcu *
kernel/signal.c:484:34: warning: incorrect type in argument 1 (different address spaces)
kernel/signal.c:484:34: expected struct spinlock [usertype] *lock
kernel/signal.c:484:34: got struct spinlock [noderef] __rcu *
kernel/signal.c:517:9: warning: incorrect type in argument 1 (different address spaces)
kernel/signal.c:517:9: expected struct spinlock [usertype] *lock
kernel/signal.c:517:9: got struct spinlock [noderef] __rcu *
kernel/signal.c:520:36: warning: incorrect type in argument 1 (different address spaces)
kernel/signal.c:520:36: expected struct spinlock [usertype] *lock
kernel/signal.c:520:36: got struct spinlock [noderef] __rcu *
kernel/signal.c:542:53: warning: incorrect type in initializer (different address spaces)
kernel/signal.c:542:53: expected struct k_sigaction *ka
kernel/signal.c:542:53: got struct k_sigaction [noderef] __rcu *
./include/uapi/asm-generic/signal-defs.h:83:29: error: multiple address spaces given
kernel/signal.c:698:33: warning: incorrect type in argument 1 (different address spaces)
kernel/signal.c:698:33: expected struct spinlock [usertype] *lock
kernel/signal.c:698:33: got struct spinlock [noderef] __rcu *
kernel/signal.c:700:31: warning: incorrect type in argument 1 (different address spaces)
kernel/signal.c:700:31: expected struct spinlock [usertype] *lock
kernel/signal.c:700:31: got struct spinlock [noderef] __rcu *
kernel/signal.c:1328:9: warning: incorrect type in argument 1 (different address spaces)
kernel/signal.c:1328:9: expected struct spinlock [usertype] *lock
kernel/signal.c:1328:9: got struct spinlock [noderef] __rcu *
kernel/signal.c:1329:16: warning: incorrect type in assignment (different address spaces)
kernel/signal.c:1329:16: expected struct k_sigaction *action
kernel/signal.c:1329:16: got struct k_sigaction [noderef] __rcu *
kernel/signal.c:1349:34: warning: incorrect type in argument 1 (different address spaces)
kernel/signal.c:1349:34: expected struct spinlock [usertype] *lock
kernel/signal.c:1349:34: got struct spinlock [noderef] __rcu *
kernel/signal.c:1938:36: warning: incorrect type in initializer (different address spaces)
kernel/signal.c:1938:36: expected struct spinlock [usertype] *lock
kernel/signal.c:1938:36: got struct spinlock [noderef] __rcu *
kernel/signal.c:2048:44: warning: cast removes address space '__rcu' of expression
kernel/signal.c:2067:65: warning: too many warnings
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette