From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org
Cc: segooon@gmail.com, neilb@suse.de
Subject: + md-check-return-code-of-read_sb_page.patch added to -mm tree
Date: Wed, 08 Sep 2010 13:06:20 -0700 [thread overview]
Message-ID: <201009082006.o88K6KZ6006044@imap1.linux-foundation.org> (raw)
The patch titled
md: check return code of read_sb_page
has been added to the -mm tree. Its filename is
md-check-return-code-of-read_sb_page.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: md: check return code of read_sb_page
From: Vasiliy Kulikov <segooon@gmail.com>
Function read_sb_page may return ERR_PTR(...). Check for it.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/md/bitmap.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff -puN drivers/md/bitmap.c~md-check-return-code-of-read_sb_page drivers/md/bitmap.c
--- a/drivers/md/bitmap.c~md-check-return-code-of-read_sb_page
+++ a/drivers/md/bitmap.c
@@ -936,6 +936,7 @@ static int bitmap_init_from_disk(struct
int outofdate;
int ret = -ENOSPC;
void *paddr;
+ struct page *p;
chunks = bitmap->chunks;
file = bitmap->file;
@@ -999,11 +1000,16 @@ static int bitmap_init_from_disk(struct
*/
page = bitmap->sb_page;
offset = sizeof(bitmap_super_t);
- if (!file)
- read_sb_page(bitmap->mddev,
+ if (!file) {
+ p = read_sb_page(bitmap->mddev,
bitmap->mddev->bitmap_info.offset,
page,
index, count);
+ if (IS_ERR(p)) {
+ ret = PTR_ERR(p);
+ goto err;
+ }
+ }
} else if (file) {
page = read_page(file, index, bitmap, count);
offset = 0;
_
Patches currently in -mm which might be from segooon@gmail.com are
linux-next.patch
md-check-return-code-of-read_sb_page.patch
reply other threads:[~2010-09-08 20:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201009082006.o88K6KZ6006044@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=neilb@suse.de \
--cc=segooon@gmail.com \
/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