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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 04 Oct 2007, Chris Hanson wrote:
> OK, I have a lot more information now.
> 
> Contrary to what I previously (thought? I) saw, the procfs interface now
> works OK after writing a bad value to sysfs.  So this is a sysfs-only
> problem, I think.
> 
> The bug is definitely in the backlight implementation, and not in
> thinkpad-acpi.  What is happening is that after I write "8\n" to the
> brightness attribute, those characters are never removed from the input
> buffer, and subsequent input is just appended, e.g. "8\n7\n".  So the
> string never parses after that.

Thanks.  That really narrows it down.  I will look into it.

> There's something odd about the sysfs protocol that I don't get.  If
> backlight_store_brightness is more-or-less a handler for write(), I
> don't see how it could return an error and _also_ cause the input to be
> discarded.  Where is the buffer contents discarded?

When a sysfs handler returns, it is supposed to tell how many chars it
consumed (and as you noticed, it better consume them all :) ), or to return
a negative value (error).  My handlers consume them all, and return EINVAL
if anything is left after the value (but they skip blanks, tabs and EOLs
before and after the value).  Maybe backlight does it differently.

> There are no other patches being applied for these tests.  The patch
> process is completely clean.  I'm running Debian unstable and I update
> daily, so everything is current as of a few hours ago.  gcc is version
> 4.2.1 (Debian 4.2.1-6).

Ok, I can test with that gcc.  I am compiling the kernel with Debian stable,
but it is no trouble at all to try with latest Debian unstable.

> I don't know if it matters, but thinkpad-acpi is compiled in rather than
> built as a module.  FYI I've attached my config file.

It might matter. I will check that.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel

[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux