diff mbox

[1/1] scsi: storvsc: Set the SRB flags correctly when no data transfer is needed

Message ID 1429918435-8353-1-git-send-email-kys@microsoft.com (mailing list archive)
State New, archived
Headers show

Commit Message

KY Srinivasan April 24, 2015, 11:33 p.m. UTC
Set the SRB flags correctly when there is no data transfer.

Cc: <stable@vger.kernel.org>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Long Li <longli@microsoft.com>
---
 drivers/scsi/storvsc_drv.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Dan Carpenter April 25, 2015, 7:05 a.m. UTC | #1
On Fri, Apr 24, 2015 at 04:33:55PM -0700, K. Y. Srinivasan wrote:
> Set the SRB flags correctly when there is no data transfer.
> 

What are the user visible effects of this bug?  We transfer bogus data?

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
KY Srinivasan April 25, 2015, 4:15 p.m. UTC | #2
> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: Saturday, April 25, 2015 12:05 AM
> To: KY Srinivasan
> Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; ohering@suse.com;
> jbottomley@parallels.com; hch@infradead.org; linux-scsi@vger.kernel.org;
> apw@canonical.com; vkuznets@redhat.com; jasowang@redhat.com;
> stable@vger.kernel.org
> Subject: Re: [PATCH 1/1] scsi: storvsc: Set the SRB flags correctly when no
> data transfer is needed
> 
> On Fri, Apr 24, 2015 at 04:33:55PM -0700, K. Y. Srinivasan wrote:
> > Set the SRB flags correctly when there is no data transfer.
> >
> 
> What are the user visible effects of this bug?  We transfer bogus data?

No, we don't transfer any bogus data. However, some IHV drivers will
return an error on some valid commands because of these flags being set.

Regards,

K. Y
> 
> regards,
> dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index d9dad90..3c6584f 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1600,8 +1600,7 @@  static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd)
 		break;
 	default:
 		vm_srb->data_in = UNKNOWN_TYPE;
-		vm_srb->win8_extension.srb_flags |= (SRB_FLAGS_DATA_IN |
-						     SRB_FLAGS_DATA_OUT);
+		vm_srb->win8_extension.srb_flags |= SRB_FLAGS_NO_DATA_TRANSFER;
 		break;
 	}