sleeping function called from invalid context

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

 




Not entirely sure this is the correct place for this, but Google didn't show up anything obviously better.


I'm trying to add functionality to a kernel module which processes various input from Sony Vaio laptops (brightness and the Fn keys) by reading from ACPI. This originally did the ACPI reads during a /proc entry read (user driven).

I'm now trying to drive this read automatically by catching key press events and using that as a trigger.

However, in the input event callback, and also (as another attempt) in a tasklet process/callback the necessary call 'acpi_evaluate_object()' fails with an error “sleeping function called from invalid context”.

The kernel trace suggests this is something to do with a kmalloc() under a variant of the acpi read that involves having a 'relative ACPI path' (the string names of the registers (?) are 4-chars, not fully qualified†); I'm afraid I forget the exact function called by acpi_evaluate_object() that's listed.


Does anyone know the rules for when acpi_evaluate_object() can be called, or maybe suggest another way of getting the data? (please bear in mind I know little of ACPI!). I tried to determine the full path in case the call worked in that context; it looked like it ought to be something like _SB.xxx.xxx.GBRT instead of GBRT, and I can find this sort of hierarchy under acpi under /sys but I *can't* find the actual fields I want (e.g., GBRT) listed, even though they work (I may well be mis-interpreting this /sys tree).

  This is on Fedora Core 5, kernel 2.6.17-1.2174_FC5.

--
[neil@fnx ~]# rm -f .signature
[neil@fnx ~]# ls -l .signature
ls: .signature: No such file or directory
[neil@fnx ~]# exit

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux