From: Kees Cook Date: Wed, 5 Apr 2017 05:12:09 +0000 (-0700) Subject: af_unix: Use designated initializers X-Git-Tag: v4.14-rc1~960^3~245 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=82fe0d2b44e00820c4ecb40a30e6014df6a1dd1f;p=platform%2Fkernel%2Flinux-rpi.git af_unix: Use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, and the initializer fixes were extracted from grsecurity. In this case, NULL initialize with { } instead of undesignated NULLs. Signed-off-by: Kees Cook Signed-off-by: David S. Miller --- diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 928691c..6a7fe76 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -996,7 +996,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) unsigned int hash; struct unix_address *addr; struct hlist_head *list; - struct path path = { NULL, NULL }; + struct path path = { }; err = -EINVAL; if (sunaddr->sun_family != AF_UNIX)