]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 17 Sep 2019 16:02:18 +0000 (18:02 +0200)
commite3bbf1b25f753afeb1a7f90b58510302d2fc8341
tree76edf71b234369a79a39c40737847b49afba8e32
parentdfc9614d707741fe8823a793b1fe13acc663ade5
scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure

BugLink: https://bugs.launchpad.net/bugs/1840378
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/scsi/fcoe/fcoe_ctlr.c
drivers/scsi/libfc/fc_rport.c
include/scsi/libfcoe.h