which context can't use queue_work() function?
onlyfever
onlyfever at gmail.com
Mon Dec 5 10:28:35 EST 2011
2011/12/4 <michi1 at michaelblizek.twilightparadox.com>:
> Hi!
>
> On 21:56 Sat 03 Dec , onlyfever wrote:
>> Hi,
>> I have a question about work queue.
>> I use queue_work() function in my TTY driver's write function (ch_tty_write()).
>> The TTY driver works fine,but when this driver is called from
>> ppp_write() function system would crash.
>>
>> static int ch_tty_write(struct tty_struct *tty,
>> const unsigned char *buf, int count)
>> {
>> ......
>> queue_work(xxx,xxxx);
>> return count;
>> }
>>
>> I want to know which context can't use queue_work() function?
>> Put the crash message below.
>>
>> Unable to handle kernel NULL pointer dereference at virtual address 00000003
>
> Please check that you have properly called "INIT_WORK" and do pass any null
> pointers to either INIT_WORK or queue_work. If this does not help, please
> give us a pointer on where to get your kernel tree.
>
> -Michi
> --
> programing a layer 3+4 network protocol for mesh networks
> see http://michaelblizek.twilightparadox.com
I find the reason,the work queue has been destroyed before the work been called.
thanks.
Regards!
More information about the Kernelnewbies
mailing list