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

Stefani Seibold stefani at seibold.net
Fri Nov 7 08:02:27 UTC 2014


Hi,

Am Donnerstag, den 06.11.2014, 22:20 +0100 schrieb Ludovic Rousseau:
> 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
> 

It can be done much simpler, i already send you the patch.

Greetings,
Stefani






More information about the Pcsclite-muscle mailing list