Skip to content

Commit

Permalink
x86/vdso: Add __user annotation to VDSO32_SYMBOL
Browse files Browse the repository at this point in the history
The address calculated by VDSO32_SYMBOL() is a pointer into
userland. Add the __user annotation to fix related sparse
warnings in its users.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Andy Lutomirski <luto@MIT.EDU>
Link: http://lkml.kernel.org/r/1346621506-30857-3-git-send-email-minipli@googlemail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Mathias Krause authored and Ingo Molnar committed Sep 5, 2012
1 parent f000262 commit 3d13340
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/include/asm/vdso.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ extern const char VDSO32_PRELINK[];
#define VDSO32_SYMBOL(base, name) \
({ \
extern const char VDSO32_##name[]; \
(void *)(VDSO32_##name - VDSO32_PRELINK + (unsigned long)(base)); \
(void __user *)(VDSO32_##name - VDSO32_PRELINK + \
(unsigned long)(base)); \
})
#endif

Expand Down

0 comments on commit 3d13340

Please sign in to comment.