* [Qemu-devel] [PATCH 0/2] Two simple Coverity defect patches @ 2014-05-16 15:44 Markus Armbruster 2014-05-16 15:44 ` [Qemu-devel] [PATCH 1/2] scsi: Document intentional fall through in scsi_req_length() Markus Armbruster ` (2 more replies) 0 siblings, 3 replies; 5+ messages in thread From: Markus Armbruster @ 2014-05-16 15:44 UTC (permalink / raw) To: qemu-devel; +Cc: pbonzini Markus Armbruster (2): scsi: Document intentional fall through in scsi_req_length() virtio-scsi: Plug memory leak on virtio_scsi_push_event() error path hw/scsi/scsi-bus.c | 2 ++ hw/scsi/virtio-scsi.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) -- 1.8.1.4 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 1/2] scsi: Document intentional fall through in scsi_req_length() 2014-05-16 15:44 [Qemu-devel] [PATCH 0/2] Two simple Coverity defect patches Markus Armbruster @ 2014-05-16 15:44 ` Markus Armbruster 2014-05-16 15:44 ` [Qemu-devel] [PATCH 2/2] virtio-scsi: Plug memory leak on virtio_scsi_push_event() error path Markus Armbruster 2014-05-16 15:53 ` [Qemu-devel] [PATCH 0/2] Two simple Coverity defect patches Paolo Bonzini 2 siblings, 0 replies; 5+ messages in thread From: Markus Armbruster @ 2014-05-16 15:44 UTC (permalink / raw) To: qemu-devel; +Cc: pbonzini For clarity, and to hush up Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> --- hw/scsi/scsi-bus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index abe7302..06399fa 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -938,6 +938,7 @@ static int scsi_req_length(SCSICommand *cmd, SCSIDevice *dev, uint8_t *buf) if (cmd->xfer == 0) { cmd->xfer = 256; } + /* fall through */ case WRITE_10: case WRITE_VERIFY_10: case WRITE_12: @@ -952,6 +953,7 @@ static int scsi_req_length(SCSICommand *cmd, SCSIDevice *dev, uint8_t *buf) if (cmd->xfer == 0) { cmd->xfer = 256; } + /* fall through */ case READ_10: case RECOVER_BUFFERED_DATA: case READ_12: -- 1.8.1.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 2/2] virtio-scsi: Plug memory leak on virtio_scsi_push_event() error path 2014-05-16 15:44 [Qemu-devel] [PATCH 0/2] Two simple Coverity defect patches Markus Armbruster 2014-05-16 15:44 ` [Qemu-devel] [PATCH 1/2] scsi: Document intentional fall through in scsi_req_length() Markus Armbruster @ 2014-05-16 15:44 ` Markus Armbruster 2014-05-16 15:52 ` Paolo Bonzini 2014-05-16 15:53 ` [Qemu-devel] [PATCH 0/2] Two simple Coverity defect patches Paolo Bonzini 2 siblings, 1 reply; 5+ messages in thread From: Markus Armbruster @ 2014-05-16 15:44 UTC (permalink / raw) To: qemu-devel; +Cc: pbonzini Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> --- hw/scsi/virtio-scsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 1752193..14261fb 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -498,7 +498,7 @@ static void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev, uint32_t event, uint32_t reason) { VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s); - VirtIOSCSIReq *req = virtio_scsi_pop_req(s, vs->event_vq); + VirtIOSCSIReq *req; VirtIOSCSIEvent *evt; VirtIODevice *vdev = VIRTIO_DEVICE(s); int in_size; @@ -507,6 +507,7 @@ static void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev, return; } + req = virtio_scsi_pop_req(s, vs->event_vq); if (!req) { s->events_dropped = true; return; -- 1.8.1.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] virtio-scsi: Plug memory leak on virtio_scsi_push_event() error path 2014-05-16 15:44 ` [Qemu-devel] [PATCH 2/2] virtio-scsi: Plug memory leak on virtio_scsi_push_event() error path Markus Armbruster @ 2014-05-16 15:52 ` Paolo Bonzini 0 siblings, 0 replies; 5+ messages in thread From: Paolo Bonzini @ 2014-05-16 15:52 UTC (permalink / raw) To: Markus Armbruster, qemu-devel Il 16/05/2014 17:44, Markus Armbruster ha scritto: > Spotted by Coverity. > > Signed-off-by: Markus Armbruster <armbru@redhat.com> > --- > hw/scsi/virtio-scsi.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c > index 1752193..14261fb 100644 > --- a/hw/scsi/virtio-scsi.c > +++ b/hw/scsi/virtio-scsi.c > @@ -498,7 +498,7 @@ static void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev, > uint32_t event, uint32_t reason) > { > VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s); > - VirtIOSCSIReq *req = virtio_scsi_pop_req(s, vs->event_vq); > + VirtIOSCSIReq *req; > VirtIOSCSIEvent *evt; > VirtIODevice *vdev = VIRTIO_DEVICE(s); > int in_size; > @@ -507,6 +507,7 @@ static void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev, > return; > } > > + req = virtio_scsi_pop_req(s, vs->event_vq); > if (!req) { > s->events_dropped = true; > return; > Cc: qemu-stable@nongnu.org ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] Two simple Coverity defect patches 2014-05-16 15:44 [Qemu-devel] [PATCH 0/2] Two simple Coverity defect patches Markus Armbruster 2014-05-16 15:44 ` [Qemu-devel] [PATCH 1/2] scsi: Document intentional fall through in scsi_req_length() Markus Armbruster 2014-05-16 15:44 ` [Qemu-devel] [PATCH 2/2] virtio-scsi: Plug memory leak on virtio_scsi_push_event() error path Markus Armbruster @ 2014-05-16 15:53 ` Paolo Bonzini 2 siblings, 0 replies; 5+ messages in thread From: Paolo Bonzini @ 2014-05-16 15:53 UTC (permalink / raw) To: Markus Armbruster, qemu-devel Il 16/05/2014 17:44, Markus Armbruster ha scritto: > Markus Armbruster (2): > scsi: Document intentional fall through in scsi_req_length() > virtio-scsi: Plug memory leak on virtio_scsi_push_event() error path > > hw/scsi/scsi-bus.c | 2 ++ > hw/scsi/virtio-scsi.c | 3 ++- > 2 files changed, 4 insertions(+), 1 deletion(-) Thanks, applied (locally until the pending pull request is processed). Paolo ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-05-16 15:53 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-05-16 15:44 [Qemu-devel] [PATCH 0/2] Two simple Coverity defect patches Markus Armbruster 2014-05-16 15:44 ` [Qemu-devel] [PATCH 1/2] scsi: Document intentional fall through in scsi_req_length() Markus Armbruster 2014-05-16 15:44 ` [Qemu-devel] [PATCH 2/2] virtio-scsi: Plug memory leak on virtio_scsi_push_event() error path Markus Armbruster 2014-05-16 15:52 ` Paolo Bonzini 2014-05-16 15:53 ` [Qemu-devel] [PATCH 0/2] Two simple Coverity defect patches Paolo Bonzini
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).