public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@linuxmail.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@digeo.com>,
	Linus Torvalds <torvalds@osdl.org>
Subject: PATCH (Trivial): Fix dm_io.c oops in low memory conditions.
Date: Tue, 09 Nov 2004 14:44:45 +1100	[thread overview]
Message-ID: <1099971769.10988.6.camel@desktop.cunninghams> (raw)

Hi.

If you call drivers/md/dm-io.c:resize_pool on an empty pool and
mempool_create is unable to make the pool, the condition is not handled
correctly, resulting in an oops in mempool_destroy.

Please apply.

Regards,

Nigel

diff -ruN 900-dm-low-memory-fix-old/drivers/md/dm-io.c 900-dm-low-memory-fix-new/drivers/md/dm-io.c
--- 900-dm-low-memory-fix-old/drivers/md/dm-io.c	2004-11-09 14:35:09.234557768 +1100
+++ 900-dm-low-memory-fix-new/drivers/md/dm-io.c	2004-11-09 13:34:36.000000000 +1100
@@ -265,7 +265,7 @@
 		/* create new pool */
 		_io_pool = mempool_create(new_ios, alloc_io, free_io, NULL);
 		if (!_io_pool)
-			r = -ENOMEM;
+			return -ENOMEM;
 
 		r = bio_set_init(&_bios, "dm-io", 512, 1);
 		if (r) {

-- 
Nigel Cunningham
Pastoral Worker
Christian Reformed Church of Tuggeranong
PO Box 1004, Tuggeranong, ACT 2901

You see, at just the right time, when we were still powerless, Christ
died for the ungodly.		-- Romans 5:6


                 reply	other threads:[~2004-11-09  3:47 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=1099971769.10988.6.camel@desktop.cunninghams \
    --to=ncunningham@linuxmail.org \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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