[ibm-acpi-devel] [ltp] Re: thinkpad-acpi release 0.17-20071002 uploaded to ibm-acpi.sf.net

Chris Hanson linux-thinkpad@linux-thinkpad.org
Thu, 04 Oct 2007 18:34:44 -0400


Henrique de Moraes Holschuh wrote:
> Here's the offending code, from backlight.c:
>
> [...]

Yes, I've read it pretty carefully.  That's what I marked up with
printk's to find the problem.  I agree with your analysis of the
fragility of the parsing, but that's not the problem I'm seeing.  (As I
think you're aware.)

What doesn't appear here is code to discard the input buffer when EINVAL
is returned.  I don't understand where that is supposed to happen, since
it would normally be handled by returning the number of characters read
from the buffer.  By returning EINVAL, there's no way to tell the caller
how many characters to discard from the buffer.  Am I missing something
here?