From: Philipp Reisner <philipp.reisner@linbit.com>
To: Dan Carpenter <error27@gmail.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>,
Jens Axboe <jens.axboe@oracle.com>,
Philipp Reisner <philipp.reisner@linbit.com>,
drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH] drbd: lc_element_by_index() never returns NULL
Date: Thu, 1 Apr 2010 10:56:40 +0200 [thread overview]
Message-ID: <1270112219-15836-1-git-send-email-philipp.reisner@linbit.com> (raw)
In-Reply-To: <9736574BB1380E.7050404@linbit.com>
In-Reply-To: <9736574BB1380E.7050404@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
---
drivers/block/drbd/drbd_actlog.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c
index 43e57f3..df01899 100644
--- a/drivers/block/drbd/drbd_actlog.c
+++ b/drivers/block/drbd/drbd_actlog.c
@@ -1336,7 +1336,7 @@ int drbd_rs_del_all(struct drbd_conf *mdev)
/* ok, ->resync is there. */
for (i = 0; i < mdev->resync->nr_elements; i++) {
e = lc_element_by_index(mdev->resync, i);
- bm_ext = e ? lc_entry(e, struct bm_extent, lce) : NULL;
+ bm_ext = lc_entry(e, struct bm_extent, lce);
if (bm_ext->lce.lc_number == LC_FREE)
continue;
if (bm_ext->lce.lc_number == mdev->resync_wenr) {
--
1.6.3.3
next prev parent reply other threads:[~2010-04-01 8:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-27 14:59 [patch] drbd: potential null dereference Dan Carpenter
2010-04-01 8:56 ` Philipp Reisner
2010-04-01 8:56 ` Philipp Reisner [this message]
2010-04-02 6:40 ` [PATCH] drbd: lc_element_by_index() never returns NULL Jens Axboe
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=1270112219-15836-1-git-send-email-philipp.reisner@linbit.com \
--to=philipp.reisner@linbit.com \
--cc=drbd-dev@lists.linbit.com \
--cc=error27@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lars.ellenberg@linbit.com \
--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
Powered by JetHome