I'm trying to block a device at kernel level. To be specific, When USB device (USB Mass Storage Device) is plugged in, I want to get its vendorid, productid, serial and let my user space thread decide whether the device attach/detach.
And I met a problem, How could I let the driver wait for my user space thread's processed result(if the device is authorized).