diff options
author | Dan Carpenter <error27@gmail.com> | 2010-01-23 15:45:22 +0300 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2010-01-25 20:01:41 +0300 |
commit | d3db7b485ad7c467a61279d6a8ef51a3c83352df (patch) | |
tree | ca9dbee2840d5781dd02c1c84194b38e7d94006f /drivers/block | |
parent | 98ec286e016a028678cc943b1a1f87668ad447c8 (diff) | |
download | linux-d3db7b485ad7c467a61279d6a8ef51a3c83352df.tar.xz |
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>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 2 |
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) 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); |