login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
November
»
16
Re: [Patch] mm/sparse.c: Check the return value of sparse_index_alloc().
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Andrew Morton <akpm@...>
To: WANG Cong <xiyou.wangcong@...>
Cc: <linux-kernel@...>, <riel@...>, <clameter@...>, <linux-mm@...>
Subject:
Re: [Patch] mm/sparse.c: Check the return value of sparse_index_alloc().
Date: Friday, November 16, 2007 - 5:37 pm
On Thu, 15 Nov 2007 21:54:28 +0800 WANG Cong <xiyou.wangcong@gmail.com> wrote:
quoted text
> > Since sparse_index_alloc() can return NULL on memory allocation failure, > we must deal with the failure condition when calling it. > > Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> > Cc: Christoph Lameter <clameter@sgi.com> > Cc: Rik van Riel <riel@redhat.com> > > --- > > diff --git a/Makefile b/Makefile > diff --git a/mm/sparse.c b/mm/sparse.c > index e06f514..d245e59 100644 > --- a/mm/sparse.c > +++ b/mm/sparse.c > @@ -83,6 +83,8 @@ static int __meminit sparse_index_init(unsigned long section_nr, int nid) > return -EEXIST; > > section = sparse_index_alloc(nid); > + if (!section) > + return -ENOMEM; > /* > * This lock keeps two different sections from > * reallocating for the same index
Sure, but both callers of sparse_index_init() ignore its return value anyway. -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[Patch] mm/sparse.c: Check the return value of sparse_index_...
, WANG Cong
, (Thu Nov 15, 9:54 am)
Re: [Patch] mm/sparse.c: Check the return value of sparse_in...
, Dave Hansen
, (Mon Nov 19, 5:17 pm)
[Patch] mm/sparse.c: Improve the error handling for sparse_a...
, WANG Cong
, (Fri Nov 23, 1:51 am)
Re: [Patch] mm/sparse.c: Improve the error handling for spar...
, Yasunori Goto
, (Mon Nov 26, 6:19 am)
[Patch](Resend) mm/sparse.c: Improve the error handling for ...
, WANG Cong
, (Mon Nov 26, 10:26 pm)
Re: [Patch](Resend) mm/sparse.c: Improve the error handling ...
, Dave Hansen
, (Tue Nov 27, 2:53 pm)
Re: [Patch](Resend) mm/sparse.c: Improve the error handling ...
, WANG Cong
, (Wed Nov 28, 8:44 am)
Re: [Patch](Resend) mm/sparse.c: Improve the error handling ...
, Dave Hansen
, (Thu Nov 29, 1:47 pm)
Re: [Patch](Resend) mm/sparse.c: Improve the error handling ...
, Yasunori Goto
, (Wed Nov 28, 10:42 pm)
Re: [Patch](Resend) mm/sparse.c: Improve the error handling ...
, Yasunori Goto
, (Tue Nov 27, 7:55 am)
Re: [Patch] mm/sparse.c: Check the return value of sparse_in...
, WANG Cong
, (Tue Nov 20, 12:57 am)
Re: [Patch] mm/sparse.c: Check the return value of sparse_in...
, Andrew Morton
, (Fri Nov 16, 5:37 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
Linus Torvalds
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
David Newall
Re: Slow DOWN, please!!!
Ian Campbell
Re: [PATCH] x86: Construct 32 bit boot time page tables in native format.
netbsd-tech-kern
:
Matthias Scheler
Re: HEADS UP: timecounters (branch simonb-timecounters) merged into -current
Greg Troxel
Re: Interface to change NFS exports
Thor Lancelot Simon
metadata cache and memory fragmentation
YAMAMOTO Takashi
amap memory allocation
git
:
linux-netdev
:
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 0/37] dccp: Feature negotiation - last call for comments
David Miller
[GIT]: Networking
Dushan Tcholich
Re: ksoftirqd high cpu load on kernels 2.6.24 to 2.6.27-rc1-mm1
Colocation donated by:
Who's online
There are currently
2 users
and
804 guests
online.
Online users
strcmp
cukagu39
Syndicate