lkmpg icon indicating copy to clipboard operation
lkmpg copied to clipboard

bottomhalf.c

Open trulykyle opened this issue 2 years ago • 1 comments

Hi,

Thanks for the nice book.

But in the example bottomhalf.c, it is trying to sleep in the tasklet which will execute from interrupt context. Then the kernel will crash. I think work_queue or delayed_workqueue are the good candidate for sleep/block within the interrupt context.

thanks, Kyle

trulykyle avatar Mar 16 '23 15:03 trulykyle

Hi @trulykyle ,

You're right. We cannot sleep in the tasklet (atomic mode)[1] [2]. I will fix this recently. Thanks for the feedback!

linD026 avatar Mar 17 '23 04:03 linD026