Bladeren bron

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client

Pull Ceph fix from Sage Weil:
 "This addresses a refcounting bug that leads to a use-after-free"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  rbd: don't put snap_context twice in rbd_queue_workfn()
Linus Torvalds 9 jaren geleden
bovenliggende
commit
849ee3d46a
1 gewijzigde bestanden met toevoegingen van 1 en 0 verwijderingen
  1. 1 0
      drivers/block/rbd.c

+ 1 - 0
drivers/block/rbd.c

@@ -3442,6 +3442,7 @@ static void rbd_queue_workfn(struct work_struct *work)
 		goto err_rq;
 		goto err_rq;
 	}
 	}
 	img_request->rq = rq;
 	img_request->rq = rq;
+	snapc = NULL; /* img_request consumes a ref */
 
 
 	if (op_type == OBJ_OP_DISCARD)
 	if (op_type == OBJ_OP_DISCARD)
 		result = rbd_img_request_fill(img_request, OBJ_REQUEST_NODATA,
 		result = rbd_img_request_fill(img_request, OBJ_REQUEST_NODATA,