linux/net/decnet
Kees Cook dc5306a8c0 decnet: Use container_of() for struct dn_neigh casts
Clang's structure layout randomization feature gets upset when it sees
struct neighbor (which is randomized) cast to struct dn_neigh:

net/decnet/dn_route.c:1123:15: error: casting from randomized structure pointer type 'struct neighbour *' to 'struct dn_neigh *'
			gateway = ((struct dn_neigh *)neigh)->addr;
				   ^

Update all the open-coded casts to use container_of() to do the conversion
instead of depending on strict member ordering.

Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/lkml/202205041247.WKBEHGS5-lkp@intel.com
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Yajun Deng <yajun.deng@linux.dev>
Cc: Zheng Yongjun <zhengyongjun3@huawei.com>
Cc: Bill Wendling <morbo@google.com>
Cc: linux-decnet-user@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220508102217.2647184-1-keescook@chromium.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2022-05-10 12:21:51 +02:00
..
netfilter netfilter: Replace HTTP links with HTTPS ones 2020-07-29 20:09:18 +02:00
af_decnet.c net: decnet: Fix sleeping inside in af_decnet 2021-07-16 14:06:16 -07:00
dn_dev.c decnet: Use container_of() for struct dn_neigh casts 2022-05-10 12:21:51 +02:00
dn_fib.c net: Remove redundant if statements 2021-08-05 13:27:50 +01:00
dn_neigh.c decnet: Use container_of() for struct dn_neigh casts 2022-05-10 12:21:51 +02:00
dn_nsp_in.c net: Don't include filter.h from net/sock.h 2021-12-29 08:48:14 -08:00
dn_nsp_out.c net: decnet: use time_is_before_jiffies() instead of open coding it 2022-02-28 13:21:32 +00:00
dn_route.c decnet: Use container_of() for struct dn_neigh casts 2022-05-10 12:21:51 +02:00
dn_rules.c fib: rules: remove duplicated nla policies 2021-12-16 07:18:35 -08:00
dn_table.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
dn_timer.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile decnet: whitespace fixes 2018-07-24 14:10:42 -07:00
README
sysctl_net_decnet.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00

                       Linux DECnet Project
                      ======================

The documentation for this kernel subsystem is available in the
Documentation/networking subdirectory of this distribution and also
on line at http://www.chygwyn.com/DECnet/

Steve Whitehouse <SteveW@ACM.org>