]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: libfc: free skb when receiving invalid flogi resp
authorMing Lu <ming.lu@citrix.com>
Thu, 24 Jan 2019 05:25:42 +0000 (13:25 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 29 Jan 2019 06:19:25 +0000 (01:19 -0500)
commit24e371c8c49ff01eb652a6863dc7c96f44d19efe
treef425dadb6ae2226ea0bf94d73c4525e74a4b36d7
parent9e50b1dd211017fb6d52886a780f998e9d3627d3
scsi: libfc: free skb when receiving invalid flogi resp

The issue to be fixed in this commit is when libfc found it received a
invalid FLOGI response from FC switch, it would return without freeing the
fc frame, which is just the skb data. This would cause memory leak if FC
switch keeps sending invalid FLOGI responses.

This fix is just to make it execute `fc_frame_free(fp)` before returning
from function `fc_lport_flogi_resp`.

Signed-off-by: Ming Lu <ming.lu@citrix.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libfc/fc_lport.c