Re: [PATCH 4/14] drivers/message: Move dereference after NULL test

From: Alan Cox
Date: Tue Oct 27 2009 - 07:39:18 EST


On Sat, 17 Oct 2009 08:34:18 +0200 (CEST)
Julia Lawall <julia@xxxxxxx> wrote:

> From: Julia Lawall <julia@xxxxxxx>
>
> If the NULL test on dev->i2o_dev or i2o_dev is needed, then the dereference
> should be after the NULL test.
>
> A simplified version of the semantic match that detects this problem is as
> follows (http://coccinelle.lip6.fr/):

Real bug - actually this needs proper locking but I doubt anyone uses I2O
hardware any. Should go in anyway

> Signed-off-by: Julia Lawall <julia@xxxxxxx>
Signed-off-by: Alan Cox <alan@xxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/