]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure
authorHannes Reinecke <hare@suse.de>
Wed, 24 Jul 2019 09:00:55 +0000 (11:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Aug 2019 15:53:31 +0000 (17:53 +0200)
commit157a1f2fc415734a693792403cba0dce23d044c1
treea60407c1bbefc33d649e620f06ba5f95b3be3799
parentb19ffe6e7205c0b0d26b750673873f3f9f61da35
scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure

commit 023358b136d490ca91735ac6490db3741af5a8bd upstream.

Gcc-9 complains for a memset across pointer boundaries, which happens as
the code tries to allocate a flexible array on the stack.  Turns out we
cannot do this without relying on gcc-isms, so with this patch we'll embed
the fc_rport_priv structure into fcoe_rport, can use the normal
'container_of' outcast, and will only have to do a memset over one
structure.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/fcoe/fcoe_ctlr.c
drivers/scsi/libfc/fc_rport.c
include/scsi/libfcoe.h