Re: [Qemu-devel] [PATCH] scsi: esp: clean up handle_ti/esp_do_dma if s->do_cmd

2016-06-15 Thread P J P
+-- On Wed, 15 Jun 2016, Laszlo Ersek wrote --+ | And I guess Prasad will submit a new version of the buffer overflow fix, | on top of this patch, according to your previous message | . Yes, I'm preparing an update. -- Prasad J

Re: [Qemu-devel] [PATCH] scsi: esp: clean up handle_ti/esp_do_dma if s->do_cmd

2016-06-15 Thread Paolo Bonzini
On 15/06/2016 15:16, Laszlo Ersek wrote: > On 06/15/16 14:39, Paolo Bonzini wrote: >> Finally, assert that the other caller of esp_do_dma (esp_transfer_data) >> only transfers data and not a command. This is true because get_cmd >> cancels the old request synchronously before its caller handle_s

Re: [Qemu-devel] [PATCH] scsi: esp: clean up handle_ti/esp_do_dma if s->do_cmd

2016-06-15 Thread Laszlo Ersek
On 06/15/16 14:39, Paolo Bonzini wrote: > Avoid duplicated code between esp_do_dma and handle_ti. esp_do_dma > has the same code that handle_ti contains after the call to esp_do_dma; > but the code in handle_ti is never reached (... never reached after esp_do_dma() is called -- it is reached in g

[Qemu-devel] [PATCH] scsi: esp: clean up handle_ti/esp_do_dma if s->do_cmd

2016-06-15 Thread Paolo Bonzini
Avoid duplicated code between esp_do_dma and handle_ti. esp_do_dma has the same code that handle_ti contains after the call to esp_do_dma; but the code in handle_ti is never reached because it is in an "else if". Remove the else and also the pointless return. esp_do_dma also has a partially dead