If an EFAULT return from the kernel results in an infinite loop in
libusb(x):

It's not a matter of _recovering_ from the EFAULT.  It's a matter of
whether libusb(x) should propagate it to the caller or not.

There is simply _no_ excuse not to propagate it.

<Sarcasm on>
Should we tell the kernel developers not to even return it?
What about SIGSEGV?   Sit in an infinite loop instead?
Ridiculous.
<Sarcasm off>

Sorry.  I'm with Miguel.  There is a reason EFAULT exists.  The kernel
returned an error.  Propagate it back.  An infinite loop is not acceptable.
 At least if it's propagated back, the application has a chance of logging
the error and doing something - even if the only something is to reboot the
system.

Orin.




On Thu, Jan 9, 2014 at 6:13 AM, Hans de Goede <notificati...@github.com>wrote:

> miguelfreitas, please stop trying to somehow propagate the EFAULT and
> recover from it. Something is causing bad pointers and/or memory
> corruption, once that happens any predictable behavior is off the table.
>
> I will only accept a patch for this if it turns out the bad pointers are
> caused by a libusb bug, and you've a patch fixing the bad pointers.
>
> Please focus your efforts on finding where the bad pointers are coming
> from. EFAULT errors are simply irrecoverable, so any effort you spend on
> recovering from them is wasted time, and any patches you write to try and
> deal with them will be rejected.
>
> —
> Reply to this email directly or view it on 
> GitHub<https://github.com/libusbx/libusbx/issues/76#issuecomment-31934361>
> .
>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> libusbx-devel mailing list
> libusbx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libusbx-devel
>
>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to