Am Mittwoch, den 26.02.2020, 09:58 +0000 schrieb Vladimir Stankovic +int mausb_enqueue_event_from_user(u8 madev_addr, u16 num_of_events, + u16 num_of_completed) +{ + unsigned long flags; + struct mausb_device *dev; + + spin_lock_irqsave(&mss.lock, flags); You save the flags. + dev = mausb_get_dev_from_addr_unsafe(madev_addr); + + if (!dev) { + spin_unlock_irqrestore(&mss.lock, flags); + return -EINVAL; + } + + spin_lock_irqsave(&dev->num_of_user_events_lock, flags); You overwrite the flags. + dev->num_of_user_events += num_of_events; + dev->num_of_completed_events += num_of_completed; + spin_unlock_irqrestore(&dev->num_of_user_events_lock, flags); Your restore the flags. + queue_work(dev->workq, &dev->work); + spin_unlock_irqrestore(&mss.lock, flags); You restore the overwritten flags. This cannot be right. Regards Oliver