which context can't use queue_work() function?

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

 



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
pgd = df344000
[00000003] *pgd=9f3c8031, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] PREEMPT
last sysfs file: /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
Modules linked in:
CPU: 0    Not tainted  (2.6.35.7-g76a4056-svn-dirty #453)
PC is at __wake_up_common+0x20/0x78
LR is at __wake_up+0x44/0x7c
pc : [<c006f29c>]    lr : [<c00727e8>]    psr: 80000093
sp : df197e48  ip : c05fb1ef  fp : df197e6c
r10: 00000000  r9 : 00000000  r8 : 00000003
r7 : 00000003  r6 : c06bcd14  r5 : 00000001  r4 : 00000093
r3 : 00000000  r2 : 00000001  r1 : 00000003  r0 : 00000003
Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c5387d  Table: 9f344019  DAC: 00000015

PC: 0xc006f21c:
f21c  e3a01000 e92d4830 e28db00c e5932430 e3520000 c3a02e47 d3002468 e18340d2
f23c  e0944000 e0a55001 e18340f2 e8bd8830 c069d128 e92d4800 e28db004 e8bd4800
f25c  eaffffe1 e92d4800 e28db004 e8bd4800 eaffffe9 e92d4800 e28db004 e8bd8800
f27c  e92d4ff8 e1a06000 e5900000 e28db024 e1a08001 e1a05002 e1a0a003 e59b9004
f29c  e410400c e244400c ea00000e e590c008 e1a01008 e1a0200a e1a03009 e5907000
f2bc  e12fff3c e3500000 0a000003 e3170001 0a000001 e2555001 08bd8ff8 e594300c
f2dc  e1a00004 e243400c e280300c e1530006 1affffed e8bd8ff8 e92d4800 e28db004
f2fc  e24dd008 e3a03000 e3a02001 e58d3000 ebffffda e24bd004 e8bd8800 e92d4800

LR: 0xc0072768:
2768  e3c23d7f e3c3303f e5933000 e3130002 0a000002 e24bd018 e8bd49f0 ea11529e
2788  e24bd018 e8bd89f0 e92d4800 e3a03000 e28db004 e8bd4800 eaffffd9 e92d49f0
27a8  e28db018 e24dd00c e1a05000 e1a07001 e1a06002 e1a08003 e10f4000 f10c0080
27c8  e3a00001 ebfff86a e3a03000 e1a00005 e1a01007 e1a02006 e58d8000 ebfff2a4
27e8  e121f004 e3a00001 ebfff832 e1a0200d e3c23d7f e3c3303f e5933000 e3130002
2808  0a000002 e24bd018 e8bd49f0 ea11527a e24bd018 e8bd89f0 e92d48f0 e28db014
2828  e24dd008 e24b1018 e1a04000 ebfff882 e594604c e5907414 e1a05000 e1570004
2848  13a07000 03a07001 e3560000 0a000002 e1a01004 e3a02000 ebfff9cd e3570000

SP: 0xdf197dc8:
7dc8  c06a822c 00000056 80000013 c007e288 80000013 c003b070 60000013 ffffffff
7de8  fa200000 ffffffff df197e34 c06bcd14 00000003 c003ba6c 00000003 00000003
7e08  00000001 00000000 00000093 00000001 c06bcd14 00000003 00000003 00000000
7e28  00000000 df197e6c c05fb1ef df197e48 c00727e8 c006f29c 80000093 ffffffff
7e48  00000000 00000093 c06bcd14 00000001 00000003 00000000 dedbf800 df43c400
7e68  df197e94 c00727e8 00000000 00000001 ffffffff 60000013 c06bcd0c dedbfbbc
7e88  df1760b0 c069c018 df1760b0 c0089ccc dedbfbbc d8eee440 dedbf83c c0089d48
7ea8  00000000 c008a420 00000009 dedbf800 0000002f c005b428 df176000 df176014

IP: 0xc05fb16f:
b16c  6f6e203a 6d656d20 2079726f 204a5628 706d6f63 73736572 0a29726f 6e702600
b18c  6c613e2d 70705f6c 756d5f70 00786574 503e363c 67205050 72656e65 64206369
b1ac  65766972 65762072 6f697372 2e32206e 0a322e34 3e333c00 6c696166 74206465
b1cc  6572206f 74736967 50207265 70205050 656e7265 65642074 65636976 64252820
b1ec  c0000a29 3cdedbfb 61663e33 64656c69 206f7420 69676572 72657473 50505020
b20c  76656420 20656369 29642528 333c000a 5050503e 6572203a 69766f6d 6d20676e
b22c  6c75646f 75622065 6e752074 20737469 616d6572 0a216e69 63702600 633e2d68
b24c  5f6e6168 006d6573 703e333c 645f7070 6d6f6365 73657270 72665f73 3a656d61
b26c  206f6e20 6f6d656d 000a7972 503e333c 203a5050 6d206f6e 726f6d65 56282079

FP: 0xdf197dec:
7dec  ffffffff df197e34 c06bcd14 00000003 c003ba6c 00000003 00000003 00000001
7e0c  00000000 00000093 00000001 c06bcd14 00000003 00000003 00000000 00000000
7e2c  df197e6c c05fb1ef df197e48 c00727e8 c006f29c 80000093 ffffffff 00000000
7e4c  00000093 c06bcd14 00000001 00000003 00000000 dedbf800 df43c400 df197e94
7e6c  c00727e8 00000000 00000001 ffffffff 60000013 c06bcd0c dedbfbbc df1760b0
7e8c  c069c018 df1760b0 c0089ccc dedbfbbc d8eee440 dedbf83c c0089d48 00000000
7eac  c008a420 00000009 dedbf800 0000002f c005b428 df176000 df176014 00000016
7ecc  00000000 0000002f c02abfd8 00000053 df176014 00000002 de964800 00000016

R6: 0xc06bcc94:
cc94  00000000 00000000 c06bcca4 dfd352c0 00000000 00000000 c02a757c c02a752c
ccb4  c02a757c c02a752c 00000000 c02a74e4 00000000 00000000 00000000 00000000
ccd4  00000000 00000000 00000000 00000000 00000000 de9c7d80 de9c7dc0 00000000
ccf4  00000000 c0020610 c04bf808 00000000 c077ebd4 00000030 00005403 dedbfbc0
cd14  00000003 00000000 c02ac7a4 c02ac464 00000000 00000000 c02ab68c c02ab694
cd34  c02abd8c 00000000 00000000 c02ab69c c02ac510 c02ab8fc c02ab880 00000000
cd54  00000000 00000001 00000080 c02ac414 c02ac520 00005403 c05fb4ee 0000000e
cd74  00000000 c02ad530 c02ad1fc 00000000 00000000 c02ac9b8 c02ac9c0 c02acd94
Process pppd (pid: 1681, stack limit = 0xdf1962e8)
Stack: (0xdf197e48 to 0xdf198000)
7e40:                   00000000 00000093 c06bcd14 00000001 00000003 00000000
7e60: dedbf800 df43c400 df197e94 c00727e8 00000000 00000001 ffffffff 60000013
7e80: c06bcd0c dedbfbbc df1760b0 c069c018 df1760b0 c0089ccc dedbfbbc d8eee440
7ea0: dedbf83c c0089d48 00000000 c008a420 00000009 dedbf800 0000002f c005b428
7ec0: df176000 df176014 00000016 00000000 0000002f c02abfd8 00000053 df176014
7ee0: 00000002 de964800 00000016 00000001 df1770aa dedbf884 df1760b1 00000000
7f00: 00000000 df176000 df636b40 df636b40 df636b40 00000000 00000000 fffffcec
7f20: 00000000 c02ac45c c02ac414 db9c51c0 db9c51c4 c02aa394 00000016 db9c51c0
7f40: 0006d212 c02aa504 df197f80 00000016 df3d9ac0 0006d212 df197f80 c00e8d8c
7f60: df3d9ac0 0006d212 df3d9ac0 0006d212 00000016 00000004 00000000 c00e8ed4
7f80: 00000000 00000000 00000016 00000000 00000016 0006d212 00027548 c003c0c4
7fa0: df196000 c003bf40 00000016 0006d212 0000000b 0006d212 00000016 00000000
7fc0: 00000016 0006d212 00027548 00000004 00000001 0001fa86 fffffcec 00000000
7fe0: 0002769c bee61a18 0001a027 afd0b47c 20000010 0000000b 80c06021 80c06421
[<c006f29c>] (__wake_up_common+0x20/0x78) from [<c00727e8>]
(__wake_up+0x44/0x7c)
[<c00727e8>] (__wake_up+0x44/0x7c) from [<c0089ccc>] (__queue_work+0x2c/0x58)
[<c0089ccc>] (__queue_work+0x2c/0x58) from [<c0089d48>]
(queue_work_on+0x50/0x5c)
[<c0089d48>] (queue_work_on+0x50/0x5c) from [<c008a420>] (queue_work+0x24/0x54)
[<c008a420>] (queue_work+0x24/0x54) from [<c005b428>] (ch_tty_write+0x80/0xa4)
[<c005b428>] (ch_tty_write+0x80/0xa4) from [<c02abfd8>]
(ppp_async_push+0xe4/0x520)
[<c02abfd8>] (ppp_async_push+0xe4/0x520) from [<c02ac45c>]
(ppp_async_send+0x48/0x50)
[<c02ac45c>] (ppp_async_send+0x48/0x50) from [<c02aa394>]
(ppp_channel_push+0x48/0xc0)
[<c02aa394>] (ppp_channel_push+0x48/0xc0) from [<c02aa504>]
(ppp_write+0xf8/0x100)
[<c02aa504>] (ppp_write+0xf8/0x100) from [<c00e8d8c>] (vfs_write+0xb0/0x148)
[<c00e8d8c>] (vfs_write+0xb0/0x148) from [<c00e8ed4>] (sys_write+0x3c/0x68)
[<c00e8ed4>] (sys_write+0x3c/0x68) from [<c003bf40>] (ret_fast_syscall+0x0/0x30)
Code: e1a08001 e1a05002 e1a0a003 e59b9004 (e410400c)
---[ end trace d4cfc85b433d01fb ]---
Kernel panic - not syncing: Fatal exception in interrupt
[<c0040c50>] (unwind_backtrace+0x0/0xe4) from [<c04c6b78>] (panic+0x54/0xdc)
[<c04c6b78>] (panic+0x54/0xdc) from [<c003f884>] (die+0x1a0/0x1dc)
[<c003f884>] (die+0x1a0/0x1dc) from [<c00419cc>] (__do_kernel_fault+0x64/0x84)
[<c00419cc>] (__do_kernel_fault+0x64/0x84) from [<c0041c84>]
(do_page_fault+0x298/0x2b8)
[<c0041c84>] (do_page_fault+0x298/0x2b8) from [<c003b2ec>]
(do_DataAbort+0x34/0x98)
[<c003b2ec>] (do_DataAbort+0x34/0x98) from [<c003ba6c>] (__dabt_svc+0x4c/0x60)
Exception stack(0xdf197e00 to 0xdf197e48)
7e00: 00000003 00000003 00000001 00000000 00000093 00000001 c06bcd14 00000003
7e20: 00000003 00000000 00000000 df197e6c c05fb1ef df197e48 c00727e8 c006f29c
7e40: 80000093 ffffffff
[<c003ba6c>] (__dabt_svc+0x4c/0x60) from [<c006f29c>]
(__wake_up_common+0x20/0x78)
[<c006f29c>] (__wake_up_common+0x20/0x78) from [<c00727e8>]
(__wake_up+0x44/0x7c)
[<c00727e8>] (__wake_up+0x44/0x7c) from [<c0089ccc>] (__queue_work+0x2c/0x58)
[<c0089ccc>] (__queue_work+0x2c/0x58) from [<c0089d48>]
(queue_work_on+0x50/0x5c)
[<c0089d48>] (queue_work_on+0x50/0x5c) from [<c008a420>] (queue_work+0x24/0x54)
[<c008a420>] (queue_work+0x24/0x54) from [<c005b428>] (ch_tty_write+0x80/0xa4)
[<c005b428>] (ch_tty_write+0x80/0xa4) from [<c02abfd8>]
(ppp_async_push+0xe4/0x520)
[<c02abfd8>] (ppp_async_push+0xe4/0x520) from [<c02ac45c>]
(ppp_async_send+0x48/0x50)
[<c02ac45c>] (ppp_async_send+0x48/0x50) from [<c02aa394>]
(ppp_channel_push+0x48/0xc0)
[<c02aa394>] (ppp_channel_push+0x48/0xc0) from [<c02aa504>]
(ppp_write+0xf8/0x100)
[<c02aa504>] (ppp_write+0xf8/0x100) from [<c00e8d8c>] (vfs_write+0xb0/0x148)
[<c00e8d8c>] (vfs_write+0xb0/0x148) from [<c00e8ed4>] (sys_write+0x3c/0x68)
[<c00e8ed4>] (sys_write+0x3c/0x68) from [<c003bf40>] (ret_fast_syscall+0x0/0x30)
Rebooting in 1 seconds..


thanks.

Regards!

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[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