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

Stefani Seibold stefani
Thu Nov 6 09:52:02 PST 2014


Hi Ludovic,

maybe my patch is bogus, but this is not the right place, IMHO it is
really a wrong solution.

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

Regards,
Stefani
 
Am Donnerstag, den 06.11.2014, 15:26 +0100 schrieb Ludovic Rousseau:
> 2014-08-08 8:00 GMT+02:00 Stefani Seibold <stefani at seibold.net>:
> > Am Donnerstag, den 07.08.2014, 14:55 +0200 schrieb Ludovic Rousseau:
> >> 2014-08-05 9:28 GMT+02:00 Stefani Seibold <stefani at seibold.net>:
> >> > Hi,
> >>
> >> Hello,
> >>
> >> > V3 5-Aug-2014
> >> >         Fix resource leak in HPStopHotPluggables(), release udev
> >> >         Fix error handling in HPRegisterForHotplugEvents() and HPStopHotPluggables()
> >> >         Revert unneeded RFRemoveReader() in HPRegisterForHotplugEvents()
> >>
> >> Patch applied in revision 6951
> >> http://lists.alioth.debian.org/pipermail/pcsclite-cvs-commit/2014-August/006506.html
> >>
> >> Thanks
> >>
> >
> > Thanks for applying the patch.
> 
> Stefani, your patch was bogus :-(
> 
> See bug [#314869] pcscd: Socket activation not working on first try
> https://alioth.debian.org/tracker/index.php?func=detail&aid=314869&group_id=30105&atid=410085
> 
> The problem is that you called HPScanUSB() in
> HPEstablishUSBNotifications() so in the hotplug thread.
> But this thread may not yet be created when the daemon accepts client
> connections.
> 
> pcscd needs to scan the USB bus _before_ returning from
> HPRegisterForHotplugEvents().
> 
> I fixed the bug in revision 7028
> http://lists.alioth.debian.org/pipermail/pcsclite-cvs-commit/2014-November/006583.html
> 
> Bye
> 






More information about the pcsclite-muscle mailing list