[Cbe-oss-dev] [PATCH] spusched: fix null pointer dereference in find_victim

Christoph Hellwig hch at lst.de
Fri Aug 31 03:16:07 EST 2007


On Wed, Aug 29, 2007 at 11:43:15AM +0200, Arnd Bergmann wrote:
> From: Christoph Hellwig <hch at lst.de>
> find_victim can dereference a NULL pointer when iterating over the list
> of victim spus because list_mutex only guarantees spu->ct to be stable,
> but of course not to be non-NULL.
> 
> Also fix find_victim to not call spu_unbind_context without list_mutex
> because that violates the above guarantee.
> 
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> Signed-off-by: Arnd Bergmann <arnd.bergmann at de.ibm.com>
> ---
> 
> I noticed that this patch is not in Jeremy's git tree, but looks like
> it needs to get queued for 2.6.24, right?

Yes, please.  In fact I just tripped over this when comparing CVS to
mainline.




More information about the cbe-oss-dev mailing list