nvmet-fc: correct use after free on list teardown
authorJames Smart <jsmart2021@gmail.com>
Mon, 14 Aug 2017 18:20:32 +0000 (11:20 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 16 Aug 2017 08:06:18 +0000 (10:06 +0200)
commit16a5a480f067f945fd27bf91ffdce3f959b0d4b6
treed04bb93e2ec23fa0fa679794e954943920396b5d
parent42819eb7a0957cc340ad4ed8bba736bab5ebc464
nvmet-fc: correct use after free on list teardown

Use list_for_each_entry_safe to prevent list handling from referencing
next pointers directly after list_del's

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/fc.c