diff options
author | Hannes Reinecke <hare@suse.de> | 2019-07-24 12:00:55 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-09 18:53:31 +0300 |
commit | 157a1f2fc415734a693792403cba0dce23d044c1 (patch) | |
tree | a60407c1bbefc33d649e620f06ba5f95b3be3799 /include/scsi/libfcoe.h | |
parent | b19ffe6e7205c0b0d26b750673873f3f9f61da35 (diff) | |
download | linux-157a1f2fc415734a693792403cba0dce23d044c1.tar.xz |
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>
Diffstat (limited to 'include/scsi/libfcoe.h')
-rw-r--r-- | include/scsi/libfcoe.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h index a4e41444f5fe..282358843659 100644 --- a/include/scsi/libfcoe.h +++ b/include/scsi/libfcoe.h @@ -241,6 +241,7 @@ struct fcoe_fcf { * @vn_mac: VN_Node assigned MAC address for data */ struct fcoe_rport { + struct fc_rport_priv rdata; unsigned long time; u16 fcoe_len; u16 flags; |