aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-01-23 07:45:22 -0500
committerPhilipp Reisner <philipp.reisner@linbit.com>2010-01-25 12:01:41 -0500
commitd3db7b485ad7c467a61279d6a8ef51a3c83352df (patch)
treeca9dbee2840d5781dd02c1c84194b38e7d94006f
parent98ec286e016a028678cc943b1a1f87668ad447c8 (diff)
drbd: null dereference bug
epoch is always NULL here. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
-rw-r--r--drivers/block/drbd/drbd_receiver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index f22a5283128a..d065c646b35a 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1224,7 +1224,7 @@ static int receive_Barrier(struct drbd_conf *mdev, struct p_header *h)
1224 epoch = kmalloc(sizeof(struct drbd_epoch), GFP_NOIO); 1224 epoch = kmalloc(sizeof(struct drbd_epoch), GFP_NOIO);
1225 if (!epoch) { 1225 if (!epoch) {
1226 dev_warn(DEV, "Allocation of an epoch failed, slowing down\n"); 1226 dev_warn(DEV, "Allocation of an epoch failed, slowing down\n");
1227 issue_flush = !test_and_set_bit(DE_BARRIER_IN_NEXT_EPOCH_ISSUED, &epoch->flags); 1227 issue_flush = !test_and_set_bit(DE_BARRIER_IN_NEXT_EPOCH_ISSUED, &mdev->current_epoch->flags);
1228 drbd_wait_ee_list_empty(mdev, &mdev->active_ee); 1228 drbd_wait_ee_list_empty(mdev, &mdev->active_ee);
1229 if (issue_flush) { 1229 if (issue_flush) {
1230 rv = drbd_flush_after_epoch(mdev, mdev->current_epoch); 1230 rv = drbd_flush_after_epoch(mdev, mdev->current_epoch);