[Pcsclite-muscle] [PATCH V3] revamp libudev hotplug

Ludovic Rousseau ludovic.rousseau
Thu Nov 6 13:20:11 PST 2014


2014-11-06 18:52 GMT+01:00 Stefani Seibold <stefani at seibold.net>:
> Hi Ludovic,
>
> maybe my patch is bogus, but this is not the right place, IMHO it is
> really a wrong solution.

Argh! You are right.

> You introduced again a race conditon, since between the HPScanUSB and
> the start of the thread udev hotplug events can occur. If this happens,
> the pcscd will get not informed about this, because no udev monitor is
> running. And believe me this can happen, especially during the boot
> phase.
>
> So you fixed a symptom but not the cause.
>
> Please revert this patch, i will habe a look on the bug [#314869] and
> send you a clean solution if the cause is in hotplug_libudev.c

The solution would be revert the patch and
- set a flag after HPScanUSB() returned.
- wait for the flag change before returning from HPRegisterForHotplugEvents()

Or synchronizing on a pipe like it is done in HPSearchHotPluggables()
of hotplug_libusb.c

Bye

-- 
 Dr. Ludovic Rousseau




More information about the pcsclite-muscle mailing list