tasklet_schedule()....

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

 



Title: linen_small Stationery
Hi all.
 
I am trying to use tasklet_schedule() function.
CODE 1 works OK.
but calling tasklet_schedule() via some_bad_function() - like CODE 2
- results in a system hang with [error messages].
 
Can anyone tell me why?
Please help.
Thanks.
 
 
code 1>
 
   #include <linux/config.h>
   #include <linux/module.h>
   #include <linux/init.h>
   #include <linux/interrupt.h>
 
   void my_tasklet_func(unsigned long data)
   {
      printk("tasklet working...\n");
   }
 
   static int __init init_module_()
   { 
      DECLARE_TASKLET(my_tasklet, my_tasklet_func, 0);
      tasklet_schedule(&my_tasklet);
   }
   static int __init cleanup_module_() { ... }
   module_init(init_module_);
   module_exit(cleanup_module_);
 
 
code 2>
 
   void some_bad_function() {
      DECLARE_TASKLET(my_tasklet, my_tasklet_func, 0);
      tasklet_schedule(&my_tasklet);
   }
   static int __init init_module_()
   {
      some_bad_function(); 
   }
 
[error messages]
 
Unhandled kernel unaligned access in unaligned.c:emulate_load_store_insn, line 3
72:
$0 : 00000000 30008401 00000000 00000008
$4 : ffffffea 80315598 811170c0 8111aac0
$8 : 00000008 0000000f 00000000 c000008c
$12: c00002a4 c0000060 00000005 c0000060
$16: ffffffea 802e6080 00000007 8031559c
$20: 80315590 00000000 00000000 00000000
$24: 00000000 2aba4820
$28: 83b40000 83b41ee8 10001db0 80120b38
epc   : 80120c94
Status: 30008403
Cause : 00800010
Process insmod (pid: 46, stackpage=83b40000)
Stack: 00000000 00000000 00000000 00000000 00000001 802e60d8 80120b38 0080000c
       10009408 10007e40 100098a0 00000000 10009408 10007e40 100098a0 00000000
       00000310 8010da3c 100198d0 00000fff 10017f10 00000000 100087a0 00000000
       00000000 fefefeff 00000000 ffffffff 10001db0 100098a0 00000000 00000000
       00000000 10009798 2ac44e74 00000045 00000008 2ac44e7c 00000005 c0000060
       10009408 ...
Call Trace: [<80120b38>] [<8010da3c>] [<c0000060>]
Code: 00408821  02002021  8c820008 <1440000c> 8e100000  c0820004  2401fffe  0041
1024  e0820004

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux