--- x/include/linux/comedi/comedidev.h +++ y/include/linux/comedi/comedidev.h @@ -364,6 +364,7 @@ struct comedi_async { struct comedi_cmd cmd; wait_queue_head_t wait_head; unsigned int cb_mask; + struct rcu_head rcu; int (*inttrig)(struct comedi_device *dev, struct comedi_subdevice *s, unsigned int x); }; --- l/drivers/comedi/drivers.c +++ y/drivers/comedi/drivers.c @@ -168,7 +168,7 @@ static void comedi_device_detach_cleanup comedi_free_subdevice_minor(s); if (s->async) { comedi_buf_alloc(dev, s, 0); - kfree(s->async); + kfree_rcu(s->async, rcu); } kfree(s->readback); }