All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] drbd: null dereference bug
@ 2010-01-23 12:45 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2010-01-23 12:45 UTC (permalink / raw)
  To: Lars Ellenberg; +Cc: drbd-user, linux-kernel, kernel-janitors

epoch is always NULL here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
---
This patch has only been compile tested.  Sorry.  :/

--- orig/drivers/block/drbd/drbd_receiver.c	2010-01-23 10:53:13.000000000 +0300
+++ devel/drivers/block/drbd/drbd_receiver.c	2010-01-23 10:54:19.000000000 +0300
@@ -1224,7 +1224,7 @@ static int receive_Barrier(struct drbd_c
 	epoch = kmalloc(sizeof(struct drbd_epoch), GFP_NOIO);
 	if (!epoch) {
 		dev_warn(DEV, "Allocation of an epoch failed, slowing down\n");
-		issue_flush = !test_and_set_bit(DE_BARRIER_IN_NEXT_EPOCH_ISSUED, &epoch->flags);
+		issue_flush = !test_and_set_bit(DE_BARRIER_IN_NEXT_EPOCH_ISSUED, &mdev->current_epoch->flags);
 		drbd_wait_ee_list_empty(mdev, &mdev->active_ee);
 		if (issue_flush) {
 			rv = drbd_flush_after_epoch(mdev, mdev->current_epoch);

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-01-25 17:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-23 12:45 [patch] drbd: null dereference bug Dan Carpenter
2010-01-23 12:45 ` Dan Carpenter
2010-01-23 12:45 ` [Drbd-dev] " Dan Carpenter
2010-01-25 17:14 ` Philipp Reisner
2010-01-25 17:14   ` Philipp Reisner
2010-01-25 17:14   ` Philipp Reisner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.