From: David Miller <davem@davemloft.net>
To: amit2030@gmail.com
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org, netdev@vger.kernel.org
Subject: Re: [PATCH] [REVISED] net/ipv4/multipath_wrandom.c: check kmalloc() return value.
Date: Thu, 08 Mar 2007 23:29:08 -0800 (PST) [thread overview]
Message-ID: <20070308.232908.92582631.davem@davemloft.net> (raw)
In-Reply-To: <20070308232215.aa512aaa.amit2030@gmail.com>
From: Amit Choudhary <amit2030@gmail.com>
Date: Thu, 8 Mar 2007 23:22:15 -0800
> Description: Check the return value of kmalloc() in function wrandom_set_nhinfo(), in file net/ipv4/multipath_wrandom.c.
>
> Signed-off-by: Amit Choudhary <amit2030@gmail.com>
This kind of patch has been submitted several times before and it's
never accepted because you have to do much more than this to recover
from the allocation error.
There is no error status returned to the caller, so the callers assume
the operation succeeded, and will either OOPS or crash in some other
way.
Therefore, just adding some NULL pointer checks and returning is not
going to fix this bug.
The whole cahce-multipath subsystem has to have it's guts revamped for
proper error handling.
next prev parent reply other threads:[~2007-03-09 7:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-09 7:22 Amit Choudhary
2007-03-09 7:29 ` David Miller [this message]
2007-03-12 11:51 ` Jarek Poplawski
2007-03-12 12:36 ` Pekka Enberg
2007-03-12 13:42 ` Jarek Poplawski
2007-03-12 20:54 ` David Miller
2007-03-12 20:53 ` Removal of multipath cached (was Re: [PATCH] [REVISED] net/ipv4/multipath_wrandom.c: check kmalloc() return value.) David Miller
2007-03-13 6:22 ` Andrew Morton
2007-03-13 7:05 ` Jarek Poplawski
2007-03-12 12:15 [PATCH] [REVISED] net/ipv4/multipath_wrandom.c: check kmalloc() return value Pekka J Enberg
2007-03-12 20:56 ` David Miller
2007-03-14 20:15 ` Ravikiran G Thirumalai
2007-03-14 22:11 ` David Miller
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=20070308.232908.92582631.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=akpm@osdl.org \
--cc=amit2030@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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
all inboxes | Powered by JetHome®