linux-stable/include/uapi
Pi-Hsun Shih f4169c4e91 wireless: Use offsetof instead of custom macro.
commit 6989310f5d upstream.

Use offsetof to calculate offset of a field to take advantage of
compiler built-in version when possible, and avoid UBSAN warning when
compiling with Clang:

==================================================================
UBSAN: Undefined behaviour in net/wireless/wext-core.c:525:14
member access within null pointer of type 'struct iw_point'
CPU: 3 PID: 165 Comm: kworker/u16:3 Tainted: G S      W         4.19.23 #43
Workqueue: cfg80211 __cfg80211_scan_done [cfg80211]
Call trace:
 dump_backtrace+0x0/0x194
 show_stack+0x20/0x2c
 __dump_stack+0x20/0x28
 dump_stack+0x70/0x94
 ubsan_epilogue+0x14/0x44
 ubsan_type_mismatch_common+0xf4/0xfc
 __ubsan_handle_type_mismatch_v1+0x34/0x54
 wireless_send_event+0x3cc/0x470
 ___cfg80211_scan_done+0x13c/0x220 [cfg80211]
 __cfg80211_scan_done+0x28/0x34 [cfg80211]
 process_one_work+0x170/0x35c
 worker_thread+0x254/0x380
 kthread+0x13c/0x158
 ret_from_fork+0x10/0x18
===================================================================

Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/r/20191204081307.138765-1-pihsun@chromium.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-05 10:06:48 +02:00
..
asm-generic
drm drm/i915: Fix I915_EXEC_RING_MASK 2019-06-11 12:21:50 +02:00
linux wireless: Use offsetof instead of custom macro. 2020-08-05 10:06:48 +02:00
misc License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
mtd License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
rdma RDMA/vmw_pvrdma: Return the correct opcode when creating WR 2019-05-16 19:42:29 +02:00
scsi License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
sound ASoC: topology: Add missing clock gating parameter when parsing hw_configs 2018-08-03 07:50:42 +02:00
video License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
xen License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00