tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Brainy: uninitialized var in XEN



On Sat, 24 Oct 2015, Maxime Villard wrote:

Index: xbd_xenbus.c
===================================================================
RCS file: /cvsroot/src/sys/arch/xen/xen/xbd_xenbus.c,v
retrieving revision 1.74
diff -u -r1.74 xbd_xenbus.c
--- xbd_xenbus.c	28 Aug 2015 17:41:49 -0000	1.74
+++ xbd_xenbus.c	24 Oct 2015 06:04:38 -0000
@@ -652,9 +652,9 @@
 	for (i = sc->sc_ring.rsp_cons; i != resp_prod; i++) {
 		blkif_response_t *rep = RING_GET_RESPONSE(&sc->sc_ring, i);
 		struct xbd_req *xbdreq = &sc->sc_reqs[rep->id];
+		bp = xbdreq->req_bp;
 		DPRINTF(("xbd_handler(%p): b_bcount = %ld\n",
 		    xbdreq->req_bp, (long)bp->b_bcount));
-		bp = xbdreq->req_bp;
 		if (rep->operation == BLKIF_OP_FLUSH_DISKCACHE) {
 			xbdreq->req_sync.s_error = rep->status;
 			xbdreq->req_sync.s_done = 1;

Found by Brainy. I guess it's ok?

LGTM



+------------------+--------------------------+-------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
+------------------+--------------------------+-------------------------+


Home | Main Index | Thread Index | Old Index