From: Dan Carpenter <error27@gmail.com>
To: Lars Ellenberg <drbd-dev@lists.linbit.com>
Cc: drbd-user@lists.linbit.com, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [patch] drbd: null dereference bug
Date: Sat, 23 Jan 2010 15:45:22 +0300 [thread overview]
Message-ID: <20100123124522.GA3061@bicker> (raw)
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);
next reply other threads:[~2010-01-23 12:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-23 12:45 Dan Carpenter [this message]
2010-01-25 17:14 ` [Drbd-dev] [patch] drbd: null dereference bug Philipp Reisner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100123124522.GA3061@bicker \
--to=error27@gmail.com \
--cc=drbd-dev@lists.linbit.com \
--cc=drbd-user@lists.linbit.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox