[Cbe-oss-dev] [patch 2/5] Add support to OProfile for profiling Cell/B.E. SPUs

Arnd Bergmann arnd at arndb.de
Wed Jun 20 19:35:58 EST 2007


On Wednesday 20 June 2007, mita at fixstars.com wrote:
> > +
> > +     /* Allocate arrays for collecting SPU PC samples */
> > +     samples = (u32 *) kzalloc(SPUS_PER_NODE *
> > +                               TRACE_ARRAY_SIZE * sizeof(u32), GFP_KERNEL);
> > +
> 
>  - Unnecessary cast for kzalloc().
> 
>  - Allocation failure is ignored here. But there is no error handling
>    in timer fuction (profile_spus), too.

Right. Bob, can you make a patch to remove the case and make sure that
we never access the sample array when the allocation has failed?

	Arnd <><



More information about the Linuxppc-dev mailing list