diff mbox series

xen/blkfront: fix bug in backported patch

Message ID 20211223105308.17077-1-jgross@suse.com
State New
Headers show
Series xen/blkfront: fix bug in backported patch | expand

Commit Message

Juergen Gross Dec. 23, 2021, 10:53 a.m. UTC
The backport of commit 8f5a695d99000fc ("xen/blkfront: don't take local
copy of a request from the ring page") to stable 4.4 kernel introduced
a bug when adding the needed blkif_ring_get_request() function, as
info->ring.req_prod_pvt was incremented twice now.

Fix that be deleting the now superfluous increments after calling that
function.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 drivers/block/xen-blkfront.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Greg KH Dec. 27, 2021, 12:43 p.m. UTC | #1
On Thu, Dec 23, 2021 at 02:40:38PM +0100, Juergen Gross wrote:
> On 23.12.21 11:57, Greg KH wrote:
> > On Thu, Dec 23, 2021 at 11:53:08AM +0100, Juergen Gross wrote:
> > > The backport of commit 8f5a695d99000fc ("xen/blkfront: don't take local
> > > copy of a request from the ring page") to stable 4.4 kernel introduced
> > > a bug when adding the needed blkif_ring_get_request() function, as
> > > info->ring.req_prod_pvt was incremented twice now.
> > > 
> > > Fix that be deleting the now superfluous increments after calling that
> > > function.
> > > 
> > > Signed-off-by: Juergen Gross <jgross@suse.com>
> > > ---
> > >   drivers/block/xen-blkfront.c | 4 ----
> > >   1 file changed, 4 deletions(-)
> > 
> > So this is only needed in 4.4.y?  No other backports were incorrect?
> 
> Yes. 4.4 only.

Great, now queued up, thanks.

greg k-h
diff mbox series

Patch

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 1e44b7880200..ae2c47e99c88 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -493,8 +493,6 @@  static int blkif_queue_discard_req(struct request *req)
 	else
 		ring_req->u.discard.flag = 0;
 
-	info->ring.req_prod_pvt++;
-
 	/* Copy the request to the ring page. */
 	*final_ring_req = *ring_req;
 	info->shadow[id].inflight = true;
@@ -711,8 +709,6 @@  static int blkif_queue_rw_req(struct request *req)
 	if (setup.segments)
 		kunmap_atomic(setup.segments);
 
-	info->ring.req_prod_pvt++;
-
 	/* Copy request(s) to the ring page. */
 	*final_ring_req = *ring_req;
 	info->shadow[id].inflight = true;