public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] reposition free_irq to avoid access to invalid data
@ 2013-01-07 10:00 Julia Lawall
  2013-01-07 10:00 ` [PATCH 1/2] drivers/media/platform/soc_camera/pxa_camera.c: " Julia Lawall
  2013-01-07 10:00 ` [PATCH 2/2] drivers/crypto/bfin_crc.c: " Julia Lawall
  0 siblings, 2 replies; 9+ messages in thread
From: Julia Lawall @ 2013-01-07 10:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: kernel-janitors

The data referenced by an interrupt handler should not be freed before the
interrupt is ended.

The semantic match that finds this problem is as follows
(http://coccinelle.lip6.fr/).  The basic idea behind this semantic match is
to find cases where the order of the call to free_irq is different than its
order in some error-handling code.  This semantic match, however, has a
high rate of false positives, because most of the time the order doesn't
seem to matter.

// <smpl>
@fn exists@
expression list es;
expression a,b;
identifier f;
@@

if (...) {
  ... when any
  free_irq(a,b);
  ... when any
  f(es);
  ... when any
  return ...;
}

@@
expression list fn.es;
expression fn.a,fn.b;
identifier fn.f;
@@

*f(es);
... when any
*free_irq(a,b);
// </smpl>


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

end of thread, other threads:[~2013-01-20  0:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-07 10:00 [PATCH 0/2] reposition free_irq to avoid access to invalid data Julia Lawall
2013-01-07 10:00 ` [PATCH 1/2] drivers/media/platform/soc_camera/pxa_camera.c: " Julia Lawall
2013-01-07 11:09   ` Guennadi Liakhovetski
2013-01-07 11:18     ` Julia Lawall
2013-01-07 11:33       ` Guennadi Liakhovetski
2013-01-07 20:08     ` Robert Jarzmik
2013-01-07 21:09       ` Julia Lawall
2013-01-07 10:00 ` [PATCH 2/2] drivers/crypto/bfin_crc.c: " Julia Lawall
2013-01-20  0:12   ` Herbert Xu

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