login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
January
»
27
Re: lib/idr.c: initialize struct idr_layer
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Pekka Enberg <penberg@...>
To: Vegard Nossum <vegard.nossum@...>
Cc: Jim Houston <jim.houston@...>, Ingo Molnar <mingo@...>, Tejun Heo <htejun@...>, Linux Kernel Mailing List <linux-kernel@...>
Subject:
Re: lib/idr.c: initialize struct idr_layer
Date: Sunday, January 27, 2008 - 5:00 pm
Hi Vegard, On Jan 27, 2008 10:07 PM, Vegard Nossum <vegard.nossum@gmail.com> wrote:
quoted text
> I am testing my kmemcheck patches, and it has come up with a couple of > uses of uninitialized memory in lib/idr.c. These are (the line numbers > may differ slightly):
[snip]
quoted text
> @@ -39,12 +39,16 @@ static struct idr_layer *alloc_layer(struct idr *idp) > { > struct idr_layer *p; > unsigned long flags; > + int i; > > spin_lock_irqsave(&idp->lock, flags); > if ((p = idp->id_free)) { > idp->id_free = p->ary[0]; > idp->id_free_cnt--; > - p->ary[0] = NULL; > + p->bitmap = 0; > + for(i = 0; i < ARRAY_SIZE(p->ary); ++i) > + p->ary[i] = NULL; > + p->count = 0;
But aren't these zeroed by idr_cache_ctor() already?
quoted text
> } > spin_unlock_irqrestore(&idp->lock, flags); > return(p);
Pekka --
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:
lib/idr.c: initialize struct idr_layer
, Vegard Nossum
, (Sun Jan 27, 4:07 pm)
Re: lib/idr.c: initialize struct idr_layer
, Pekka Enberg
, (Sun Jan 27, 5:00 pm)
Re: lib/idr.c: initialize struct idr_layer
, Vegard Nossum
, (Sun Jan 27, 5:17 pm)
Re: lib/idr.c: initialize struct idr_layer
, Pekka J Enberg
, (Sun Jan 27, 5:21 pm)
Re: lib/idr.c: initialize struct idr_layer
, Vegard Nossum
, (Sun Jan 27, 5:30 pm)
Re: lib/idr.c: initialize struct idr_layer
, Pekka Enberg
, (Sun Jan 27, 5:35 pm)
Re: lib/idr.c: initialize struct idr_layer
, Vegard Nossum
, (Sun Jan 27, 5:56 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Andrea Arcangeli
[PATCH 00 of 12] mmu notifier #v13
Eric W. Biederman
Remaining straight forward kthread API conversions...
Eric Paris
Re: [malware-list] [RFC 0/5] [TALPA] Intro to a linux interface for on access scan...
Trond Myklebust
Re: Announce: Linux-next (Or Andrew's dream :-))
git
:
linux-netdev
:
Gerrit Renker
[PATCH 0/37] dccp: Feature negotiation - last call for comments
David Miller
[GIT]: Networking
Herbert Xu
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Alexey Dobriyan
[PATCH 04/33] Fix {ip,6}_route_me_harder() in netns
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
6 users
and
1014 guests
online.
Online users
strcmp
techxpert
hedomeka86d
Nelson
genanxdiso
plianc20
Syndicate