From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
alan@lxorguk.ukuu.org.uk, Ben Hutchings <ben@decadent.org.uk>,
Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>,
Jiri Kosina <jkosina@suse.cz>, Jens Axboe <axboe@kernel.dk>
Subject: [ 1/4] floppy: do put_disk on current dr if blk_init_queue fails
Date: Fri, 2 Nov 2012 10:06:05 -0700 [thread overview]
Message-ID: <20121102170333.681455201@linuxfoundation.org> (raw)
In-Reply-To: <20121102170333.581931288@linuxfoundation.org>
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
commit 238ab78469c6ab7845b43d5061cd3c92331b2452 upstream.
If blk_init_queue fails, we do not call put_disk on the current dr
(dr is decremented first in the error handling loop).
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/block/floppy.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4198,6 +4198,7 @@ static int __init floppy_init(void)
disks[dr]->queue = blk_init_queue(do_fd_request, &floppy_lock);
if (!disks[dr]->queue) {
+ put_disk(disks[dr]);
err = -ENOMEM;
goto out_put_disk;
}
next prev parent reply other threads:[~2012-11-02 17:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-02 17:06 [ 0/4] 3.0.51-stable review Greg Kroah-Hartman
2012-11-02 17:06 ` Greg Kroah-Hartman [this message]
2012-11-02 17:06 ` [ 3/4] mm: fix XFS oops due to dirty pages without buffers on s390 Greg Kroah-Hartman
2012-11-02 17:06 ` [ 4/4] drm/nouveau: silence modesetting spam on pre-gf8 chipsets Greg Kroah-Hartman
2012-11-03 0:31 ` [ 0/4] 3.0.51-stable review Rafael Aquini
2012-11-03 4:07 ` Greg Kroah-Hartman
2012-11-03 11:45 ` Rafael Aquini
2012-11-03 14:43 ` Greg Kroah-Hartman
2012-11-03 15:13 ` Steven Rostedt
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=20121102170333.681455201@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=axboe@kernel.dk \
--cc=ben@decadent.org.uk \
--cc=herton.krzesinski@canonical.com \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@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;
as well as URLs for NNTP newsgroup(s).