BUG? possible race between tasklet_action and tasklet_kill

From: Chris Friesen
Date: Fri Sep 11 2009 - 13:00:46 EST


I think I may have discovered a race between tasklet_action and
tasklet_kill. Given how long this code has been around, I assume that
I'm simply not understanding the purposes of tasklet_kill correctly, but
it seems like there's a mechanism whereby we could hit the BUG path in
tasklet_action().

cpu A cpu B
starts tasklet_kill()
does while loop until
TASKLET_STATE_SCHED not set
runs tasklet_schedule()
starts tasklet_action()
tasklet_unlock_wait()
if (tasklet_trylock(t)) {
clear_bit(TASKLET_STATE_SCHED)
test_and_clear_bit(TASKLET_STATE_SCHED
BUG


Is this a valid issue, or is this an improper usage pattern somehow?

Thanks,

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