lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1468283787-18260-1-git-send-email-wu.wubin@huawei.com>
Date:	Tue, 12 Jul 2016 08:36:27 +0800
From:	Bin Wu <wu.wubin@...wei.com>
To:	<boris.ostrovsky@...cle.com>, <david.vrabel@...rix.com>,
	<jgross@...e.com>, <jejb@...ux.vnet.ibm.com>,
	<martin.petersen@...cle.com>, <xen-devel@...ts.xenproject.org>,
	<linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<wu.wubin@...wei.com>
Subject: [PATCH v2] xen_pvscsi: reclaim the ring request when the prepairing failed

During scsi command queueing or exception handling, if prepairing
fails, we need to reclaim the failed request. Otherwise, the garbage
request will be pushed into the ring for the backend to work.

Signed-off-by: Bin Wu <wu.wubin@...wei.com>
---
 drivers/scsi/xen-scsifront.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c
index 9dc8687..8646db1 100644
--- a/drivers/scsi/xen-scsifront.c
+++ b/drivers/scsi/xen-scsifront.c
@@ -184,8 +184,6 @@ static struct vscsiif_request *scsifront_pre_req(struct vscsifrnt_info *info)
 
 	ring_req = RING_GET_REQUEST(&(info->ring), ring->req_prod_pvt);
 
-	ring->req_prod_pvt++;
-
 	ring_req->rqid = (uint16_t)id;
 
 	return ring_req;
@@ -196,6 +194,8 @@ static void scsifront_do_request(struct vscsifrnt_info *info)
 	struct vscsiif_front_ring *ring = &(info->ring);
 	int notify;
 
+	ring->req_prod_pvt++;
+
 	RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(ring, notify);
 	if (notify)
 		notify_remote_via_irq(info->irq);
-- 
2.3.2 (Apple Git-55)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ