public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* random.c changes for sparse irq_desc are crap
@ 2008-12-31 18:29 Matt Mackall
  2008-12-31 23:07 ` Yinghai Lu
  0 siblings, 1 reply; 7+ messages in thread
From: Matt Mackall @ 2008-12-31 18:29 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: Linux Kernel Mailing List, Linus Torvalds

I just noticed you merged a change that pointlessly converts two
random.c functions into ugly random.h inlines without going through the
maintainer.

I also don't like the look of the newly-introduced sparse variants of
these functions. Failure to find an irq descriptor in
get_timer_rand_state is a BUG_ON should-never-happen sort of condition,
not something to silently ignore. Letting the code try to dereference
NULL is preferred here: we'll actually be able to find and fix the
broken driver that's throwing around meaningless irq vectors.

Throwing away the timer_state pointer in the set_timer_rand_state
function is similarly bogus in addition to being a memory leak.

Please fix this up.

-- 
Mathematics is the supreme nostalgia of our time.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-01-03  8:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-31 18:29 random.c changes for sparse irq_desc are crap Matt Mackall
2008-12-31 23:07 ` Yinghai Lu
2008-12-31 23:40   ` Matt Mackall
2009-01-01  0:14     ` Yinghai Lu
2009-01-01  9:31       ` Matt Mackall
2009-01-02 15:59         ` Ingo Molnar
2009-01-03  8:06           ` [PATCH] sparseirq: move set/get_timer_rand_state back to .c Yinghai Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox