Skip to content

Commit 2f7608f

Browse files
Mike ChristieChristoph Hellwig
authored andcommitted
iscsi class: fix get_host_stats error handling
iscsi_get_host_stats was dropping the error code returned by drivers like qla4xxx. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
1 parent 7f3976f commit 2f7608f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎drivers/scsi/scsi_transport_iscsi.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3467,6 +3467,10 @@ iscsi_get_host_stats(struct iscsi_transport *transport, struct nlmsghdr *nlh)
34673467
memset(buf, 0, host_stats_size);
34683468

34693469
err = transport->get_host_stats(shost, buf, host_stats_size);
3470+
if (err) {
3471+
kfree(skbhost_stats);
3472+
goto exit_host_stats;
3473+
}
34703474

34713475
actual_size = nlmsg_total_size(sizeof(*ev) + host_stats_size);
34723476
skb_trim(skbhost_stats, NLMSG_ALIGN(actual_size));

0 commit comments

Comments
 (0)