]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/include-linux-relay.h-fix-percpu-annotation-in-struc.patch
Linux 4.14.111
[thirdparty/kernel/stable-queue.git] / queue-4.19 / include-linux-relay.h-fix-percpu-annotation-in-struc.patch
1 From ff7fefa837c3e0a3e68ef0c5a63d236e010fcda1 Mon Sep 17 00:00:00 2001
2 From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
3 Date: Thu, 7 Mar 2019 16:31:28 -0800
4 Subject: include/linux/relay.h: fix percpu annotation in struct rchan
5
6 [ Upstream commit 62461ac2e5b6520b6d65fc6d7d7b4b8df4b848d8 ]
7
8 The percpu member of this structure is declared as:
9 struct ... ** __percpu member;
10 So its type is:
11 __percpu pointer to pointer to struct ...
12
13 But looking at how it's used, its type should be:
14 pointer to __percpu pointer to struct ...
15 and it should thus be declared as:
16 struct ... * __percpu *member;
17
18 So fix the placement of '__percpu' in the definition of this
19 structures.
20
21 This silents a few Sparse's warnings like:
22 warning: incorrect type in initializer (different address spaces)
23 expected void const [noderef] <asn:3> *__vpp_verify
24 got struct sched_domain **
25
26 Link: http://lkml.kernel.org/r/20190118144902.79065-1-luc.vanoostenryck@gmail.com
27 Fixes: 017c59c042d01 ("relay: Use per CPU constructs for the relay channel buffer pointers")
28 Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
29 Cc: Jens Axboe <axboe@suse.de>
30 Cc: Thomas Gleixner <tglx@linutronix.de>
31 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
32 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
33 Signed-off-by: Sasha Levin <sashal@kernel.org>
34 ---
35 include/linux/relay.h | 2 +-
36 1 file changed, 1 insertion(+), 1 deletion(-)
37
38 diff --git a/include/linux/relay.h b/include/linux/relay.h
39 index e1bdf01a86e2..c759f96e39c1 100644
40 --- a/include/linux/relay.h
41 +++ b/include/linux/relay.h
42 @@ -66,7 +66,7 @@ struct rchan
43 struct kref kref; /* channel refcount */
44 void *private_data; /* for user-defined data */
45 size_t last_toobig; /* tried to log event > subbuf size */
46 - struct rchan_buf ** __percpu buf; /* per-cpu channel buffers */
47 + struct rchan_buf * __percpu *buf; /* per-cpu channel buffers */
48 int is_global; /* One global buffer ? */
49 struct list_head list; /* for channel list */
50 struct dentry *parent; /* parent dentry passed to open */
51 --
52 2.19.1
53