From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jens Axboe <jaxboe@fusionio.com>, linux-kernel@vger.kernel.org
Subject: [git pull v3.0-rc1] What branch to base fixes for v3.0-rc1 for block system?
Date: Tue, 31 May 2011 15:10:39 -0400 [thread overview]
Message-ID: <20110531191039.GA5269@dumpdata.com> (raw)
Hey Jens,
I've got two tiny fixes for the xen-blkback (see below):
git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git for-jens/xen-blkback.fixes
and they are based on for-2.6.40/drivers branch. Is that the way you
prefer to pull patches from sub-trees? Or should I rebase it on 3.0-rc1?
Or should send bug-fixes just directly to Linus?
Dan Carpenter (1):
xen/blkback: potential null dereference in error handling
Laszlo Ersek (1):
xen/blkback: don't call vbd_size() if bd_disk is NULL
drivers/block/xen-blkback/blkback.c | 10 ++++++----
drivers/block/xen-blkback/xenbus.c | 3 +--
2 files changed, 7 insertions(+), 6 deletions(-)
And them combined:
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
index c73910c..e3c26d1 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -809,11 +809,13 @@ static int __init xen_blkif_init(void)
failed_init:
kfree(blkbk->pending_reqs);
kfree(blkbk->pending_grant_handles);
- for (i = 0; i < mmap_pages; i++) {
- if (blkbk->pending_pages[i])
- __free_page(blkbk->pending_pages[i]);
+ if (blkback->pending_pages) {
+ for (i = 0; i < mmap_pages; i++) {
+ if (blkbk->pending_pages[i])
+ __free_page(blkbk->pending_pages[i]);
+ }
+ kfree(blkbk->pending_pages);
}
- kfree(blkbk->pending_pages);
kfree(blkbk);
blkbk = NULL;
return rc;
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c
index 3457082..6cc0db1 100644
--- a/drivers/block/xen-blkback/xenbus.c
+++ b/drivers/block/xen-blkback/xenbus.c
@@ -357,14 +357,13 @@ static int xen_vbd_create(struct xen_blkif *blkif, blkif_vdev_t handle,
}
vbd->bdev = bdev;
- vbd->size = vbd_sz(vbd);
-
if (vbd->bdev->bd_disk == NULL) {
DPRINTK("xen_vbd_create: device %08x doesn't exist.\n",
vbd->pdevice);
xen_vbd_free(vbd);
return -ENOENT;
}
+ vbd->size = vbd_sz(vbd);
if (vbd->bdev->bd_disk->flags & GENHD_FL_CD || cdrom)
vbd->type |= VDISK_CDROM;
next reply other threads:[~2011-05-31 19:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-31 19:10 Konrad Rzeszutek Wilk [this message]
2011-05-31 19:25 ` [git pull v3.0-rc1] What branch to base fixes for v3.0-rc1 for block system? Jens Axboe
2011-06-01 15:15 ` Konrad Rzeszutek Wilk
2011-06-02 11:16 ` 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=20110531191039.GA5269@dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=jaxboe@fusionio.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