title: Is it safe to wake_up_interruptible() from within a tasklet?
body: <p>I have a kernel module that provides data to a userland process through read(). That process blocks on read until data becomes available. I achieve this through a wait_event_interruptible() in the read method.</p>
  
  <p>Data comes from an interrupt handler, which sucks it into memory, then schedules a tasklet to process it. The original code schedules the tasklet, then calls wake_up_interruptible() to re-activate the blocked read. However, this causes a race condition as the tasklet may not be done processing the data before read tries to give it to the user process.</p>
  
  <p>So the question is, is it safe to move my call to wake_up_interruptible() to the end of the tasklet?</p>