Re: [PATCH] [RESEND] devres: Fix possible use after free

From: Tejun Heo
Date: Tue Jun 14 2011 - 03:17:44 EST


Hello,

On Tue, Jun 14, 2011 at 10:07:32AM +0300, Maxin B John wrote:
> A freed pointer is passed as an argument to the function "devres_destroy()" in
> "kernel/irq/devres.c" and "lib/devres.c". This patch fixes the possible use
> after free.
>
> It's notabug at this time, but the code is dangerous.

The code is not dangerous. The pointer value is used strictly as key
and the code path is always properly serialized. The change is to
appease access-after-free detection logic, similar to the way we
change the code to better accomodate sparse or other code analysys
tools. Can you please update the patch description to reflect that?

Thank you.

--
tejun
--
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/