]> git.ipfire.org Git - people/arne_f/kernel.git/commit
RDMA: Directly cast the sockaddr union to sockaddr
authorJason Gunthorpe <jgg@mellanox.com>
Mon, 13 May 2019 00:57:57 +0000 (21:57 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Aug 2019 15:53:32 +0000 (17:53 +0200)
commit4ee0a5228ad554d36a2e0ff68cdadeca7c414e79
treed3240ddaa47c5321a46113d95694666c385b1fb2
parenta941d836628c0ec2c58aa9b19a4f64347ced41fe
RDMA: Directly cast the sockaddr union to sockaddr

commit 641114d2af312d39ca9bbc2369d18a5823da51c6 upstream.

gcc 9 now does allocation size tracking and thinks that passing the member
of a union and then accessing beyond that member's bounds is an overflow.

Instead of using the union member, use the entire union with a cast to
get to the sockaddr. gcc will now know that the memory extends the full
size of the union.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/core/addr.c
drivers/infiniband/hw/ocrdma/ocrdma_ah.c
drivers/infiniband/hw/ocrdma/ocrdma_hw.c