]> git.baikalelectronics.ru Git - kernel.git/commit
libiscsi: Fix iscsi_check_transport_timeouts possible infinite loop
authorAriel Nahum <arieln@mellanox.com>
Thu, 3 Sep 2015 16:49:55 +0000 (19:49 +0300)
committerJames Bottomley <JBottomley@Odin.com>
Thu, 17 Sep 2015 14:25:02 +0000 (07:25 -0700)
commite7c7192703e17f7afc5089ade7d056d72716ac6c
tree5584c2387542cb4f3c9e89b8f3f01bc6f590eea7
parent935a478e4144e0a4f690471a4a1d8ad5718a721b
libiscsi: Fix iscsi_check_transport_timeouts possible infinite loop

Connection last_ping is not being updated when iscsi_send_nopout fails.
Not updating the last_ping will cause firing a timer to a past time
(last_ping + ping_tmo < current_time) which triggers an infinite loop of
iscsi_check_transport_timeouts() and hogs the cpu.

Fix this issue by checking the return value of iscsi_send_nopout.
If it fails set the next_timeout to one second later.

Signed-off-by: Ariel Nahum <arieln@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/libiscsi.c