genhtml: Nicer other views
[can-benchmark.git] / doc / notes.org
1 * uboot settings
2
3  set ipaddr 192.168.2.3
4  set netmask 255.255.255.0
5  set serverip 192.168.2.2 
6  set imagefile ryu/uImage
7  set devicetreefile ryu/shark-ryu.dtb
8  set nfspath /srv/nfs/root-shark
9  set bootcmd_tftpnfs_static 'tftp 800000 ${imagefile}; tftp 7f0000 ${devicetreefile}; set bootargs ${linux_console} root=/dev/nfs nfsroot=${serverip}:${nfspath} rw ip=${ipaddr}; mw f0000b00 ${psc_cfg}; bootm 800000 - 7f0000'
10  set bootcmd 'run bootcmd_tftpnfs_static'
11
12 * Questions
13 ** Why crc modification alone does not produce an error and is not returned by cangw -L? 
14 * Kernel oops
15 ** Linux-2.6.33.7-00005-ge2f49b5 
16 Unable to handle kernel paging request for instruction fetch
17 Faulting instruction address: 0x8d56acc4
18 Oops: Kernel access of bad area, sig: 11 [#1]
19 PREEMPT Shark
20 Modules linked in:
21 NIP: 8d56acc4 LR: c0260208 CTR: 8d56acc7
22 REGS: c03f3bc0 TRAP: 0400   Not tainted  (2.6.33.7-00005-ge2f49b5)
23 MSR: 20009032 <EE,ME,IR,DR>  CR: 24008028  XER: 0000005f
24 TASK = c03d5478[0] 'swapper' THREAD: c03f2000
25 GPR00: 8d56acc7 c03f3c70 c03d5478 c7990160 c78d54ad 00000048 c79901a4 00000002 
26 GPR08: 000000e0 00000000 00000001 00000002 44000022 7f33ff4e 80000000 00000042 
27 GPR16: 00000008 20000000 c909e900 00000001 c03f3d78 c79326e0 00000008 c799dc1c 
28 GPR24: c7976800 c78d54f9 c7949828 c7a06620 c03f2000 c7990160 c78d54ad c03f3c70 
29 NIP [8d56acc4] 0x8d56acc4
30 LR [c0260208] dev_queue_xmit+0x2f0/0x588
31 Call Trace:
32 [c03f3c70] [c025ff74] dev_queue_xmit+0x5c/0x588 (unreliable)
33 [c03f3ca0] [c02d62d8] can_send+0x9c/0x1a0
34 [c03f3cc0] [c02d97a8] can_can_gw_rcv+0x108/0x164
35 [c03f3cf0] [c02d52ac] can_rcv_filter+0x240/0x2e8
36 [c03f3d10] [c02d541c] can_rcv+0xc8/0x140
37 [c03f3d30] [c025e968] netif_receive_skb+0x2ac/0x350
38 [c03f3d70] [c020a230] mscan_rx_poll+0x1c0/0x464
39 [c03f3dd0] [c025f428] net_rx_action+0x104/0x22c
40 [c03f3e20] [c00345e0] __do_softirq+0x10c/0x21c
41 [c03f3e70] [c00075d0] do_softirq+0x58/0x74
42 [c03f3e80] [c0034300] irq_exit+0x8c/0xbc
43 [c03f3e90] [c00076c8] do_IRQ+0xdc/0x188
44 [c03f3ec0] [c0014db0] ret_from_except+0x0/0x14
45 --- Exception: 501 at cpu_idle+0x104/0x114
46     LR = cpu_idle+0x104/0x114
47 [c03f3f80] [c000aefc] cpu_idle+0x68/0x114 (unreliable)
48 [c03f3fa0] [c0003f40] rest_init+0xa4/0xc4
49 [c03f3fc0] [c039f918] start_kernel+0x2e4/0x2fc
50 [c03f3ff0] [00003438] 0x3438
51 Instruction dump:
52 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 
53 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 
54 Kernel panic - not syncing: Fatal exception in interrupt
55 Call Trace:
56 [c03f3ab0] [c0009cdc] show_stack+0x70/0x1d4 (unreliable)
57 [c03f3b00] [c02ff5ec] dump_stack+0x2c/0x44
58 [c03f3b10] [c02ff6b0] panic+0xac/0x19c
59 [c03f3b60] [c0011df8] die+0x188/0x1a4
60 [c03f3b90] [c00165c8] bad_page_fault+0x90/0xe0
61 [c03f3bb0] [c0014bb8] handle_page_fault+0x7c/0x80
62 --- Exception: 400 at 0x8d56acc4
63     LR = dev_queue_xmit+0x2f0/0x588
64 [c03f3c70] [c025ff74] dev_queue_xmit+0x5c/0x588 (unreliable)
65 [c03f3ca0] [c02d62d8] can_send+0x9c/0x1a0
66 [c03f3cc0] [c02d97a8] can_can_gw_rcv+0x108/0x164
67 [c03f3cf0] [c02d52ac] can_rcv_filter+0x240/0x2e8
68 [c03f3d10] [c02d541c] can_rcv+0xc8/0x140
69 [c03f3d30] [c025e968] netif_receive_skb+0x2ac/0x350
70 [c03f3d70] [c020a230] mscan_rx_poll+0x1c0/0x464
71 [c03f3dd0] [c025f428] net_rx_action+0x104/0x22c
72 [c03f3e20] [c00345e0] __do_softirq+0x10c/0x21c
73 [c03f3e70] [c00075d0] do_softirq+0x58/0x74
74 [c03f3e80] [c0034300] irq_exit+0x8c/0xbc
75 [c03f3e90] [c00076c8] do_IRQ+0xdc/0x188
76 [c03f3ec0] [c0014db0] ret_from_except+0x0/0x14
77 --- Exception: 501 at cpu_idle+0x104/0x114
78     LR = cpu_idle+0x104/0x114
79 [c03f3f80] [c000aefc] cpu_idle+0x68/0x114 (unreliable)
80 [c03f3fa0] [c0003f40] rest_init+0xa4/0xc4
81 [c03f3fc0] [c039f918] start_kernel+0x2e4/0x2fc
82 [c03f3ff0] [00003438] 0x3438
83 Rebooting in 180 seconds..
84
85 ** Current kernel
86 *** Panic
87 Unable to handle kernel paging request for instruction fetch
88 Faulting instruction address: 0x8cd6acc4
89 Oops: Kernel access of bad area, sig: 11 [#1]
90 PREEMPT Shark
91 Modules linked in:
92 NIP: 8cd6acc4 LR: c025fdac CTR: 8cd6acc7
93 REGS: c03f3bd0 TRAP: 0400   Not tainted  (2.6.33.7-00005-ge2f49b5)
94 MSR: 20009032 <EE,ME,IR,DR>  CR: 22008028  XER: 0000005f
95 TASK = c03d6478[0] 'swapper' THREAD: c03f2000
96 GPR00: 8cd6acc7 c03f3c80 c03d6478 c79fec00 c78cd4ad 00000048 c79fec44 00000002 
97 GPR08: 000000e0 00000000 00000001 c03f3c80 42000022 7f33ff4e 80000000 00000042 
98 GPR16: 00000008 20000000 c909e900 00000001 c03f3d88 c79386e0 00000008 c79fe51c 
99 GPR24: 0000000c c78cd4f9 c7975800 c7949828 c7a33d24 c79fec00 c78cd4ad c03f3c80 
100 NIP [8cd6acc4] 0x8cd6acc4
101 LR [c025fdac] dev_queue_xmit+0xec/0x588
102 Call Trace:
103 [c03f3c80] [c025fd68] dev_queue_xmit+0xa8/0x588 (unreliable)
104 [c03f3cb0] [c02d5128] can_send+0x9c/0x1a0
105 [c03f3cd0] [c02d85ec] can_can_gw_rcv+0x108/0x164
106 [c03f3d00] [c02d3fdc] can_rcv_filter+0xf8/0x2e8
107 [c03f3d20] [c02d4294] can_rcv+0xc8/0x140
108 [c03f3d40] [c025e6f8] netif_receive_skb+0x2a8/0x34c
109 [c03f3d80] [c020a774] mscan_rx_poll+0x1c0/0x464
110 [c03f3de0] [c025f1b8] net_rx_action+0x104/0x238
111 [c03f3e30] [c00368c8] __do_softirq+0x128/0x244
112 [c03f3e80] [c00075e0] do_softirq+0x64/0x80
113 [c03f3e90] [c00365d0] irq_exit+0x98/0xc4
114 [c03f3ea0] [c00076d8] do_IRQ+0xdc/0x188
115 [c03f3ed0] [c0014d40] ret_from_except+0x0/0x14
116 [c03f3f90] [c000aed8] cpu_idle+0x68/0x10c (unreliable)
117 --- Exception: 501 at cpu_idle+0xfc/0x10c
118     LR = cpu_idle+0xfc/0x10c
119 [c03f3fb0] [c0003f34] rest_init+0x98/0xc4
120 [c03f3fc0] [c039f914] start_kernel+0x2e0/0x2f8
121 [c03f3ff0] [00003438] 0x3438
122 Instruction dump:
123 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 
124 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 
125 Kernel panic - not syncing: Fatal exception in interrupt
126 Call Trace:
127 [c03f3ac0] [c0009cc0] show_stack+0x70/0x1d4 (unreliable)
128 [c03f3b10] [c02fde74] dump_stack+0x2c/0x44
129 [c03f3b20] [c02fdf30] panic+0xa4/0x19c
130 [c03f3b70] [c0011d90] die+0x184/0x1a0
131 --- Exception: c03f3d88 at 0x42000022
132     LR = 0x8
133 [c03f3ba0] [c0016558] bad_page_fault+0x90/0xe0 (unreliable)
134 [c03f3bc0] [c0014b48] handle_page_fault+0x7c/0x80
135 --- Exception: 400 at 0x8cd6acc4
136     LR = dev_queue_xmit+0xec/0x588
137 [c03f3c80] [c025fd68] dev_queue_xmit+0xa8/0x588 (unreliable)
138 [c03f3cb0] [c02d5128] can_send+0x9c/0x1a0
139 [c03f3cd0] [c02d85ec] can_can_gw_rcv+0x108/0x164
140 [c03f3d00] [c02d3fdc] can_rcv_filter+0xf8/0x2e8
141 [c03f3d20] [c02d4294] can_rcv+0xc8/0x140
142 [c03f3d40] [c025e6f8] netif_receive_skb+0x2a8/0x34c
143 [c03f3d80] [c020a774] mscan_rx_poll+0x1c0/0x464
144 [c03f3de0] [c025f1b8] net_rx_action+0x104/0x238
145 [c03f3e30] [c00368c8] __do_softirq+0x128/0x244
146 [c03f3e80] [c00075e0] do_softirq+0x64/0x80
147 [c03f3e90] [c00365d0] irq_exit+0x98/0xc4
148 [c03f3ea0] [c00076d8] do_IRQ+0xdc/0x188
149 [c03f3ed0] [c0014d40] ret_from_except+0x0/0x14
150 --- Exception: 501 at cpu_idle+0xfc/0x10c
151     LR = cpu_idle+0xfc/0x10c
152 [c03f3f90] [c000aed8] cpu_idle+0x68/0x10c (unreliable)
153 [c03f3fb0] [c0003f34] rest_init+0x98/0xc4
154 [c03f3fc0] [c039f914] start_kernel+0x2e0/0x2f8
155 [c03f3ff0] [00003438] 0x3438
156
157 *** Disassemble
158         if (q->enqueue) {
159 c025fd54:       80 1e 00 00     lwz     r0,0(r30)
160 c025fd58:       2f 80 00 00     cmpwi   cr7,r0,0
161 c025fd5c:       41 9e 01 94     beq-    cr7,c025fef0 <dev_queue_xmit+0x230>
162         raw_spin_lock_init(&(_lock)->rlock);            \
163 } while (0)
164
165 static inline void spin_lock(spinlock_t *lock)
166 {
167         raw_spin_lock(&lock->rlock);
168 c025fd60:       38 60 00 01     li      r3,1
169 c025fd64:       4b dc 47 cd     bl      c0024530 <add_preempt_count>
170 c025fd68:       80 1e 00 4c     lwz     r0,76(r30) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
171 {
172         spinlock_t *root_lock = qdisc_lock(q);
173         int rc;
174
175         spin_lock(root_lock);
176         if (unlikely(test_bit(__QDISC_STATE_DEACTIVATED, &q->state))) {
177 c025fd6c:       3b 3e 00 4c     addi    r25,r30,76
178 c025fd70:       70 09 00 04     andi.   r9,r0,4
179 c025fd74:       40 82 01 f0     bne-    c025ff64 <dev_queue_xmit+0x2a4>
180
181 *** Corresponding C code
182 static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
183                                  struct net_device *dev,
184                                  struct netdev_queue *txq)
185 {
186         spinlock_t *root_lock = qdisc_lock(q);
187         int rc;
188
189         spin_lock(root_lock);
190
191 ** 2.6.36.1-00006-g2e11adb
192 Unable to handle kernel paging request for data at address 0xfffffffe
193 Faulting instruction address: 0xc0262358
194 Oops: Kernel access of bad area, sig: 11 [#1]
195 PREEMPT Shark
196 last sysfs file: /sys/devices/lpb.0/fc000000.flash/mtd/mtd2ro/dev
197 Modules linked in:
198 NIP: c0262358 LR: c026218c CTR: 00000000
199 REGS: c7ffbd20 TRAP: 0300   Not tainted  (2.6.36.1-00006-g2e11adb)
200 MSR: 00009032 <EE,ME,IR,DR>  CR: 42008024  XER: 0000005f
201 DAR: fffffffe, DSISR: 20000000
202 TASK = c03e44d0[0] 'swapper' THREAD: c0400000
203 GPR00: c7939560 c7ffbdd0 c03e44d0 00000100 00000000 00000060 c798bb64 00000000 
204 GPR08: 000000e8 00000002 00000001 00000002 42000022 7f33ff4e 80000000 00000042 
205 GPR16: 00000008 20000000 c909e900 00000001 c7ffbef8 c0404a84 c0404a80 c78b4000 
206 GPR24: 00000000 c798bb20 c79395c0 c7a77e20 c796f800 c798bb20 fffffffe c7ffbdd0 
207 NIP [c0262358] dev_queue_xmit+0x200/0x4f0
208 LR [c026218c] dev_queue_xmit+0x34/0x4f0
209 Call Trace:
210 [c7ffbdd0] [c026218c] dev_queue_xmit+0x34/0x4f0 (unreliable)
211 [c7ffbe00] [c02dd1f4] can_send+0x9c/0x1a0
212 [c7ffbe20] [c02e07a8] can_can_gw_rcv+0x108/0x164
213 [c7ffbe50] [c02dc224] can_rcv_filter+0xf8/0x2e8
214 [c7ffbe70] [c02dc4dc] can_rcv+0xc8/0x140
215 [c7ffbe90] [c02606f0] __netif_receive_skb+0x2cc/0x338
216 [c7ffbed0] [c0260934] netif_receive_skb+0x5c/0x98
217 [c7ffbef0] [c020d72c] mscan_rx_poll+0x1c0/0x454
218 [c7ffbf50] [c0260c64] net_rx_action+0x104/0x230
219 [c7ffbfa0] [c0031350] __do_softirq+0x118/0x22c
220 [c7ffbff0] [c0011704] call_do_softirq+0x14/0x24
221 [c0401e60] [c0006bdc] do_softirq+0x84/0xa8
222 [c0401e80] [c0031074] irq_exit+0x88/0xb4
223 [c0401e90] [c0006d60] do_IRQ+0xe0/0x234
224 [c0401ec0] [c00123d4] ret_from_except+0x0/0x14
225 --- Exception: 501 at cpu_idle+0xfc/0x10c
226     LR = cpu_idle+0xfc/0x10c
227 [c0401f80] [c000a7a8] cpu_idle+0x68/0x10c (unreliable)
228 [c0401fa0] [c0003ec0] rest_init+0x9c/0xbc
229 [c0401fc0] [c03ad91c] start_kernel+0x2c0/0x2d8
230 [c0401ff0] [00003438] 0x3438
231 Instruction dump:
232 41920198 817e000c 2f8b0000 419c018c 55693032 55602036 7ca04850 5569043e 
233 b13d0074 801c01c8 7f402a14 83da0004 <801e0000> 2f800000 409efe88 801c00d8 
234 Kernel panic - not syncing: Fatal exception in interrupt
235 Call Trace:
236 [c7ffbc00] [c00095dc] show_stack+0xb0/0x1d4 (unreliable)
237 [c7ffbc50] [c030664c] dump_stack+0x2c/0x44
238 [c7ffbc60] [c0306720] panic+0xbc/0x1fc
239 [c7ffbcc0] [c000f34c] die+0x1b8/0x1e8
240 --- Exception: c7ffbef8 at 0x42000022
241     LR = 0x8
242 [c7ffbcf0] [c0013b8c] bad_page_fault+0x90/0xe0 (unreliable)
243 [c7ffbd10] [c00121dc] handle_page_fault+0x7c/0x80
244 --- Exception: 300 at dev_queue_xmit+0x200/0x4f0
245     LR = dev_queue_xmit+0x34/0x4f0
246 [c7ffbe00] [c02dd1f4] can_send+0x9c/0x1a0
247 [c7ffbe20] [c02e07a8] can_can_gw_rcv+0x108/0x164
248 [c7ffbe50] [c02dc224] can_rcv_filter+0xf8/0x2e8
249 [c7ffbe70] [c02dc4dc] can_rcv+0xc8/0x140
250 [c7ffbe90] [c02606f0] __netif_receive_skb+0x2cc/0x338
251 [c7ffbed0] [c0260934] netif_receive_skb+0x5c/0x98
252 [c7ffbef0] [c020d72c] mscan_rx_poll+0x1c0/0x454
253 [c7ffbf50] [c0260c64] net_rx_action+0x104/0x230
254 [c7ffbfa0] [c0031350] __do_softirq+0x118/0x22c
255 [c7ffbff0] [c0011704] call_do_softirq+0x14/0x24
256 [c0401e60] [c0006bdc] do_softirq+0x84/0xa8
257 [c0401e80] [c0031074] irq_exit+0x88/0xb4
258 [c0401e90] [c0006d60] do_IRQ+0xe0/0x234
259 [c0401ec0] [c00123d4] ret_from_except+0x0/0x14
260 --- Exception: 501 at cpu_idle+0xfc/0x10c
261     LR = cpu_idle+0xfc/0x10c
262 [c0401f80] [c000a7a8] cpu_idle+0x68/0x10c (unreliable)
263 [c0401fa0] [c0003ec0] rest_init+0x9c/0xbc
264 [c0401fc0] [c03ad91c] start_kernel+0x2c0/0x2d8
265 [c0401ff0] [00003438] 0x3438
266
267 ** With "Spinlock and rw-lock debugging: basic checks" 
268 BUG: spinlock bad magic on CPU#0, swapper/0
269  lock: c7985abc, .magic: c0000000, .owner: <none>/-1, .owner_cpu: -1069448776
270
271 *** later
272 BUG: spinlock bad magic on CPU#0, swapper/0
273  lock: c798cabc, .magic: c0000000, .owner: <none>/-1, .owner_cpu: -1069337880
274 Call Trace:
275 [c7ffbd00] [c000a090] show_stack+0xb0/0x1d4 (unreliable)
276 [c7ffbd50] [c031157c] dump_stack+0x2c/0x44
277 [c7ffbd60] [c01c0914] spin_bug+0x84/0xd0
278 [c7ffbd80] [c01c0ac0] do_raw_spin_lock+0x3c/0x15c
279 [c7ffbdb0] [c0310e34] _raw_spin_lock+0x34/0x4c
280 [c7ffbdd0] [c026d170] dev_queue_xmit+0xa4/0x428
281 [c7ffbe00] [c02e7a28] can_send+0x9c/0x1a0
282 [c7ffbe20] [c02eb038] can_can_gw_rcv+0x108/0x164
283 [c7ffbe50] [c02e6c18] can_rcv_filter+0x240/0x2e8
284 [c7ffbe70] [c02e6d88] can_rcv+0xc8/0x140
285 [c7ffbe90] [c026b664] __netif_receive_skb+0x2cc/0x338
286 [c7ffbed0] [c026b8a8] netif_receive_skb+0x5c/0x98
287 [c7ffbef0] [c0219908] mscan_rx_poll+0x1c0/0x454
288 [c7ffbf50] [c026bbd8] net_rx_action+0x104/0x230
289 [c7ffbfa0] [c00356a4] __do_softirq+0x118/0x22c
290 [c7ffbff0] [c00126b4] call_do_softirq+0x14/0x24
291 [c0445e60] [c00070b8] do_softirq+0x84/0xa8
292 [c0445e80] [c00354e0] irq_exit+0x88/0xb4
293 [c0445e90] [c00071bc] do_IRQ+0xe0/0x234
294 [c0445ec0] [c0013384] ret_from_except+0x0/0x14
295 --- Exception: 501 at cpu_idle+0xfc/0x10c
296     LR = cpu_idle+0xfc/0x10c
297 [c0445f80] [c000b444] cpu_idle+0x68/0x10c (unreliable)
298 [c0445fa0] [c0003ec0] rest_init+0x9c/0xbc
299 [c0445fc0] [c03ed91c] start_kernel+0x2c0/0x2d8
300 [c0445ff0] [00003438] 0x3438
301
302 ** With "Spinlock debugging: sleep-inside-spinlock checking"
303 BUG: sleeping function called from invalid context at /home/wsh/projects/can-benchmark/kernel/2.6.36/mm/slab.c:3101
304 in_atomic(): 1, irqs_disabled(): 0, pid: 379, name: cangw
305 Call Trace:
306 [c7abdb50] [c0009c04] show_stack+0xb0/0x1d4 (unreliable)
307 [c7abdba0] [c02ffe54] dump_stack+0x2c/0x44
308 [c7abdbb0] [c002157c] __might_sleep+0xfc/0x124
309 [c7abdbc0] [c00c45bc] kmem_cache_alloc+0x15c/0x180
310 [c7abdbf0] [c02d60d8] can_rx_register+0x78/0x210
311 [c7abdc30] [c02d9ebc] cgw_create_job+0x1cc/0x220
312 [c7abdc50] [c026c208] rtnetlink_rcv_msg+0x21c/0x28c
313 [c7abdc70] [c02762a4] netlink_rcv_skb+0xb8/0x100
314 [c7abdc90] [c026bfd0] rtnetlink_rcv+0x40/0x5c
315 [c7abdcb0] [c0275e9c] netlink_unicast+0x320/0x368
316 [c7abdd00] [c0276a0c] netlink_sendmsg+0x2e0/0x33c
317 [c7abdd50] [c0244cc0] sock_sendmsg+0x9c/0xd4
318 [c7abde20] [c0247194] sys_sendto+0xcc/0x108
319 [c7abdf00] [c0248980] sys_socketcall+0x17c/0x218
320 [c7abdf40] [c0012524] ret_from_syscall+0x0/0x38
321 --- Exception: c01 at 0xff3413c
322     LR = 0x10001f9c
323 BUG: spinlock bad magic on CPU#0, swapper/0
324  lock: c798aabc, .magic: c0000000, .owner: <none>/-1, .owner_cpu: -1069424200
325 Call Trace:
326 [c7ffbd00] [c0009c04] show_stack+0xb0/0x1d4 (unreliable)
327 [c7ffbd50] [c02ffe54] dump_stack+0x2c/0x44
328 [c7ffbd60] [c01afa50] spin_bug+0x84/0xd0
329 [c7ffbd80] [c01afbfc] do_raw_spin_lock+0x3c/0x15c
330 [c7ffbdb0] [c02ff70c] _raw_spin_lock+0x34/0x4c
331 [c7ffbdd0] [c025bbdc] dev_queue_xmit+0xa4/0x428
332 [c7ffbe00] [c02d630c] can_send+0x9c/0x1a0
333 [c7ffbe20] [c02d991c] can_can_gw_rcv+0x108/0x164
334 [c7ffbe50] [c02d53b4] can_rcv_filter+0xf8/0x2e8
335 [c7ffbe70] [c02d566c] can_rcv+0xc8/0x140
336 [c7ffbe90] [c025a0d0] __netif_receive_skb+0x2cc/0x338
337 [c7ffbed0] [c025a314] netif_receive_skb+0x5c/0x98
338 [c7ffbef0] [c0208374] mscan_rx_poll+0x1c0/0x454
339 [c7ffbf50] [c025a644] net_rx_action+0x104/0x230
340 [c7ffbfa0] [c00317a8] __do_softirq+0x118/0x22c
341 [c7ffbff0] [c0011eec] call_do_softirq+0x14/0x24
342 [c042fe60] [c0006d78] do_softirq+0x84/0xa8
343 [c042fe80] [c00314cc] irq_exit+0x88/0xb4
344 [c042fe90] [c0006efc] do_IRQ+0xe0/0x234
345 [c042fec0] [c0012bbc] ret_from_except+0x0/0x14
346 --- Exception: 501 at cpu_idle+0xfc/0x10c
347     LR = cpu_idle+0xfc/0x10c
348 [c042ff80] [c000afb8] cpu_idle+0x68/0x10c (unreliable)
349 [c042ffa0] [c0003ec0] rest_init+0x9c/0xbc
350 [c042ffc0] [c03da91c] start_kernel+0x2c0/0x2d8
351 [c042fff0] [00003438] 0x3438
352 ** First patch
353 diff --git a/net/can/gw.c b/net/can/gw.c
354 index 94ba3f1..7779ca6 100644
355 --- a/net/can/gw.c
356 +++ b/net/can/gw.c
357 @@ -822,11 +822,14 @@ static int cgw_create_job(struct sk_buff *skb,  struct nlmsghdr *nlh,
358         if (gwj->dst.dev->type != ARPHRD_CAN)
359                 goto put_src_dst_out;
360                 
361 -       spin_lock(&cgw_list_lock);
362  
363         err = cgw_register_filter(gwj);
364 -       if (!err)
365 -               hlist_add_head_rcu(&gwj->list, &cgw_list);
366 +       if (err)
367 +               goto put_src_dst_out;
368 +
369 +       spin_lock(&cgw_list_lock);
370 +
371 +       hlist_add_head_rcu(&gwj->list, &cgw_list);
372  
373         spin_unlock(&cgw_list_lock);
374  
375 ** GFP_ATOMIC patch
376 diff --git a/net/can/af_can.c b/net/can/af_can.c
377 index 702be5a..b046ff0 100644
378 --- a/net/can/af_can.c
379 +++ b/net/can/af_can.c
380 @@ -418,7 +418,7 @@ int can_rx_register(struct net_device *dev, canid_t can_id, canid_t mask,
381         if (dev && dev->type != ARPHRD_CAN)
382                 return -ENODEV;
383  
384 -       r = kmem_cache_alloc(rcv_cache, GFP_KERNEL);
385 +       r = kmem_cache_alloc(rcv_cache, GFP_ATOMIC);
386         if (!r)
387                 return -ENOMEM;
388  
389 ** Another panic
390 BUG: spinlock bad magic on CPU#0, swapper/0
391  lock: c7986abc, .magic: c0000000, .owner: <none>/-1, .owner_cpu: -1069424200
392 Call Trace:
393 [c7ffbd00] [c0009c04] show_stack+0xb0/0x1d4 (unreliable)
394 [c7ffbd50] [c02ffe54] dump_stack+0x2c/0x44
395 [c7ffbd60] [c01afa50] spin_bug+0x84/0xd0
396 [c7ffbd80] [c01afbfc] do_raw_spin_lock+0x3c/0x15c
397 [c7ffbdb0] [c02ff70c] _raw_spin_lock+0x34/0x4c
398 [c7ffbdd0] [c025bbdc] dev_queue_xmit+0xa4/0x428
399 [c7ffbe00] [c02d630c] can_send+0x9c/0x1a0
400 [c7ffbe20] [c02d991c] can_can_gw_rcv+0x108/0x164
401 [c7ffbe50] [c02d53b4] can_rcv_filter+0xf8/0x2e8
402 [c7ffbe70] [c02d566c] can_rcv+0xc8/0x140
403 [c7ffbe90] [c025a0d0] __netif_receive_skb+0x2cc/0x338
404 [c7ffbed0] [c025a314] netif_receive_skb+0x5c/0x98
405 [c7ffbef0] [c0208374] mscan_rx_poll+0x1c0/0x454
406 [c7ffbf50] [c025a644] net_rx_action+0x104/0x230
407 [c7ffbfa0] [c00317a8] __do_softirq+0x118/0x22c
408 [c7ffbff0] [c0011eec] call_do_softirq+0x14/0x24
409 [c042fe60] [c0006d78] do_softirq+0x84/0xa8
410 [c042fe80] [c00314cc] irq_exit+0x88/0xb4
411 [c042fe90] [c0006efc] do_IRQ+0xe0/0x234
412 [c042fec0] [c0012bbc] ret_from_except+0x0/0x14
413 --- Exception: 501 at cpu_idle+0xfc/0x10c
414     LR = cpu_idle+0xfc/0x10c
415 [c042ff80] [c000afb8] cpu_idle+0x68/0x10c (unreliable)
416 [c042ffa0] [c0003ec0] rest_init+0x9c/0xbc
417 [c042ffc0] [c03da91c] start_kernel+0x2c0/0x2d8
418 [c042fff0] [00003438] 0x3438
419 Unrecoverable FP Unavailable Exception 801 at c7986ca0
420 Oops: Unrecoverable FP Unavailable Exception, sig: 6 [#1]
421 PREEMPT Shark
422 last sysfs file: /sys/devices/lpb.0/fc000000.flash/mtd/mtd2ro/dev
423 Modules linked in:
424 NIP: c7986ca0 LR: c025bc3c CTR: c7986ca0
425 REGS: c7ffbd20 TRAP: 0801   Not tainted  (2.6.36.1-00006-g2e11adb-dirty)
426 MSR: 00009032 <EE,ME,IR,DR>  CR: 22002024  XER: 2000005f
427 TASK = c0411520[0] 'swapper' THREAD: c042e000
428 GPR00: c7986ca0 c7ffbdd0 c0411520 c79b8240 c7986a60 00000010 c043b384 00004000 
429 GPR08: c043b788 00000000 00003fff c7ffbdd0 42002024 
430 NIP [c7986ca0] 0xc7986ca0
431 LR [c025bc3c] dev_queue_xmit+0x104/0x428
432 Call Trace:
433 [c7ffbdd0] [c025bbdc] dev_queue_xmit+0xa4/0x428 (unreliable)
434 [c7ffbe00] [c02d630c] can_send+0x9c/0x1a0
435 [c7ffbe20] [c02d991c] can_can_gw_rcv+0x108/0x164
436 [c7ffbe50] [c02d53b4] can_rcv_filter+0xf8/0x2e8
437 [c7ffbe70] [c02d566c] can_rcv+0xc8/0x140
438 [c7ffbe90] [c025a0d0] __netif_receive_skb+0x2cc/0x338
439 [c7ffbed0] [c025a314] netif_receive_skb+0x5c/0x98
440 [c7ffbef0] [c0208374] mscan_rx_poll+0x1c0/0x454
441 [c7ffbf50] [c025a644] net_rx_action+0x104/0x230
442 [c7ffbfa0] [c00317a8] __do_softirq+0x118/0x22c
443 [c7ffbff0] [c0011eec] call_do_softirq+0x14/0x24
444 [c042fe60] [c0006d78] do_softirq+0x84/0xa8
445 [c042fe80] [c00314cc] irq_exit+0x88/0xb4
446 [c042fe90] [c0006efc] do_IRQ+0xe0/0x234
447 [c042fec0] [c0012bbc] ret_from_except+0x0/0x14
448 --- Exception: 501 at cpu_idle+0xfc/0x10c
449     LR = cpu_idle+0xfc/0x10c
450 [c042ff80] [c000afb8] cpu_idle+0x68/0x10c (unreliable)
451 [c042ffa0] [c0003ec0] rest_init+0x9c/0xbc
452 [c042ffc0] [c03da91c] start_kernel+0x2c0/0x2d8
453 [c042fff0] [00003438] 0x3438
454 Instruction dump:
455 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 
456 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 
457 Kernel panic - not syncing: Fatal exception in interrupt
458 Call Trace:
459 [c7ffbc10] [c0009c04] show_stack+0xb0/0x1d4 (unreliable)
460 [c7ffbc60] [c02ffe54] dump_stack+0x2c/0x44
461 [c7ffbc70] [c02fff28] panic+0xbc/0x200
462 [c7ffbcd0] [c000faf8] die+0x1a4/0x1cc
463 [c7ffbcf0] [c000fc34] kernel_fp_unavailable_exception+0x4c/0x64
464 [c7ffbd10] [c0012bbc] ret_from_except+0x0/0x14
465 --- Exception: 801 at 0xc7986ca0
466     LR = dev_queue_xmit+0x104/0x428
467 [c7ffbdd0] [c025bbdc] dev_queue_xmit+0xa4/0x428 (unreliable)
468 [c7ffbe00] [c02d630c] can_send+0x9c/0x1a0
469 [c7ffbe20] [c02d991c] can_can_gw_rcv+0x108/0x164
470 [c7ffbe50] [c02d53b4] can_rcv_filter+0xf8/0x2e8
471 [c7ffbe70] [c02d566c] can_rcv+0xc8/0x140
472 [c7ffbe90] [c025a0d0] __netif_receive_skb+0x2cc/0x338
473 [c7ffbed0] [c025a314] netif_receive_skb+0x5c/0x98
474 [c7ffbef0] [c0208374] mscan_rx_poll+0x1c0/0x454
475 [c7ffbf50] [c025a644] net_rx_action+0x104/0x230
476 [c7ffbfa0] [c00317a8] __do_softirq+0x118/0x22c
477 [c7ffbff0] [c0011eec] call_do_softirq+0x14/0x24
478 [c042fe60] [c0006d78] do_softirq+0x84/0xa8
479 [c042fe80] [c00314cc] irq_exit+0x88/0xb4
480 [c042fe90] [c0006efc] do_IRQ+0xe0/0x234
481 [c042fec0] [c0012bbc] ret_from_except+0x0/0x14
482 --- Exception: 501 at cpu_idle+0xfc/0x10c
483     LR = cpu_idle+0xfc/0x10c
484 [c042ff80] [c000afb8] cpu_idle+0x68/0x10c (unreliable)
485 [c042ffa0] [c0003ec0] rest_init+0x9c/0xbc
486 [c042ffc0] [c03da91c] start_kernel+0x2c0/0x2d8
487 [c042fff0] [00003438] 0x3438
488  
489 ** After cansend can1
490 BUG: spinlock bad magic on CPU#0, swapper/0
491  lock: c7985abc, .magic: c0000000, .owner: <none>/-1, .owner_cpu: -1069424200
492 Call Trace:
493 [c7ffbd00] [c0009c04] show_stack+0xb0/0x1d4 (unreliable)
494 [c7ffbd50] [c0300434] dump_stack+0x2c/0x44
495 [c7ffbd60] [c01afa50] spin_bug+0x84/0xd0
496 [c7ffbd80] [c01afbfc] do_raw_spin_lock+0x3c/0x15c
497 [c7ffbdb0] [c02ffcec] _raw_spin_lock+0x34/0x4c
498 [c7ffbdd0] [c025c1a0] dev_queue_xmit+0xa4/0x428
499 [c7ffbe00] [c02d68d0] can_send+0x9c/0x1a0
500 [c7ffbe20] [c02da27c] can_can_gw_rcv+0x108/0x164
501 [c7ffbe50] [c02d5978] can_rcv_filter+0xf8/0x2e8
502 [c7ffbe70] [c02d5c30] can_rcv+0xc8/0x140
503 [c7ffbe90] [c025a694] __netif_receive_skb+0x2cc/0x338
504 [c7ffbed0] [c025a8d8] netif_receive_skb+0x5c/0x98
505 [c7ffbef0] [c0208938] mscan_rx_poll+0x1c0/0x454
506 [c7ffbf50] [c025ac08] net_rx_action+0x104/0x230
507 [c7ffbfa0] [c00317a8] __do_softirq+0x118/0x22c
508 [c7ffbff0] [c0011eec] call_do_softirq+0x14/0x24
509 [c042fe60] [c0006d78] do_softirq+0x84/0xa8
510 [c042fe80] [c00314cc] irq_exit+0x88/0xb4
511 [c042fe90] [c0006efc] do_IRQ+0xe0/0x234
512 [c042fec0] [c0012bbc] ret_from_except+0x0/0x14
513 --- Exception: 501 at cpu_idle+0xfc/0x10c
514     LR = cpu_idle+0xfc/0x10c
515 [c042ff80] [c000afb8] cpu_idle+0x68/0x10c (unreliable)
516 [c042ffa0] [c0003ec0] rest_init+0x9c/0xbc
517 [c042ffc0] [c03da91c] start_kernel+0x2c0/0x2d8
518 [c042fff0] [00003438] 0x3438
519 Unrecoverable FP Unavailable Exception 801 at c7985ca0
520 Oops: Unrecoverable FP Unavailable Exception, sig: 6 [#1]
521 PREEMPT Shark
522 last sysfs file: /sys/devices/lpb.0/fc000000.flash/mtd/mtd2ro/dev
523 Modules linked in:
524 NIP: c7985ca0 LR: c025c200 CTR: c7985ca0
525 REGS: c7ffbd20 TRAP: 0801   Not tainted  (2.6.36.1-00011-gdb0ddb5)
526 MSR: 00009032 <EE,ME,IR,DR>  CR: 22002024  XER: 2000005f
527 TASK = c0411520[0] 'swapper' THREAD: c042e000
528 GPR00: c7985ca0 c7ffbdd0 c0411520 c7a49e20 c7985a60 00000010 c043b384 00004000 
529 GPR08: c043b788 00000000 00003fff c7ffbdd0 42002024 
530 NIP [c7985ca0] 0xc7985ca0
531 LR [c025c200] dev_queue_xmit+0x104/0x428
532 Call Trace:
533 [c7ffbdd0] [c025c1a0] dev_queue_xmit+0xa4/0x428 (unreliable)
534 [c7ffbe00] [c02d68d0] can_send+0x9c/0x1a0
535 [c7ffbe20] [c02da27c] can_can_gw_rcv+0x108/0x164
536 [c7ffbe50] [c02d5978] can_rcv_filter+0xf8/0x2e8
537 [c7ffbe70] [c02d5c30] can_rcv+0xc8/0x140
538 [c7ffbe90] [c025a694] __netif_receive_skb+0x2cc/0x338
539 [c7ffbed0] [c025a8d8] netif_receive_skb+0x5c/0x98
540 [c7ffbef0] [c0208938] mscan_rx_poll+0x1c0/0x454
541 [c7ffbf50] [c025ac08] net_rx_action+0x104/0x230
542 [c7ffbfa0] [c00317a8] __do_softirq+0x118/0x22c
543 [c7ffbff0] [c0011eec] call_do_softirq+0x14/0x24
544 [c042fe60] [c0006d78] do_softirq+0x84/0xa8
545 [c042fe80] [c00314cc] irq_exit+0x88/0xb4
546 [c042fe90] [c0006efc] do_IRQ+0xe0/0x234
547 [c042fec0] [c0012bbc] ret_from_except+0x0/0x14
548 --- Exception: 501 at cpu_idle+0xfc/0x10c
549     LR = cpu_idle+0xfc/0x10c
550 [c042ff80] [c000afb8] cpu_idle+0x68/0x10c (unreliable)
551 [c042ffa0] [c0003ec0] rest_init+0x9c/0xbc
552 [c042ffc0] [c03da91c] start_kernel+0x2c0/0x2d8
553 [c042fff0] [00003438] 0x3438
554 Instruction dump:
555 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 
556 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 
557 Kernel panic - not syncing: Fatal exception in interrupt
558 Call Trace:
559 [c7ffbc10] [c0009c04] show_stack+0xb0/0x1d4 (unreliable)
560 [c7ffbc60] [c0300434] dump_stack+0x2c/0x44
561 [c7ffbc70] [c0300508] panic+0xbc/0x200
562 [c7ffbcd0] [c000faf8] die+0x1a4/0x1cc
563 [c7ffbcf0] [c000fc34] kernel_fp_unavailable_exception+0x4c/0x64
564 [c7ffbd10] [c0012bbc] ret_from_except+0x0/0x14
565 --- Exception: 801 at 0xc7985ca0
566     LR = dev_queue_xmit+0x104/0x428
567 [c7ffbdd0] [c025c1a0] dev_queue_xmit+0xa4/0x428 (unreliable)
568 [c7ffbe00] [c02d68d0] can_send+0x9c/0x1a0
569 [c7ffbe20] [c02da27c] can_can_gw_rcv+0x108/0x164
570 [c7ffbe50] [c02d5978] can_rcv_filter+0xf8/0x2e8
571 [c7ffbe70] [c02d5c30] can_rcv+0xc8/0x140
572 [c7ffbe90] [c025a694] __netif_receive_skb+0x2cc/0x338
573 [c7ffbed0] [c025a8d8] netif_receive_skb+0x5c/0x98
574 [c7ffbef0] [c0208938] mscan_rx_poll+0x1c0/0x454
575 [c7ffbf50] [c025ac08] net_rx_action+0x104/0x230
576 [c7ffbfa0] [c00317a8] __do_softirq+0x118/0x22c
577 [c7ffbff0] [c0011eec] call_do_softirq+0x14/0x24
578 [c042fe60] [c0006d78] do_softirq+0x84/0xa8
579 [c042fe80] [c00314cc] irq_exit+0x88/0xb4
580 [c042fe90] [c0006efc] do_IRQ+0xe0/0x234
581 [c042fec0] [c0012bbc] ret_from_except+0x0/0x14
582 --- Exception: 501 at cpu_idle+0xfc/0x10c
583     LR = cpu_idle+0xfc/0x10c
584 [c042ff80] [c000afb8] cpu_idle+0x68/0x10c (unreliable)
585 [c042ffa0] [c0003ec0] rest_init+0x9c/0xbc
586 [c042ffc0] [c03da91c] start_kernel+0x2c0/0x2d8
587 [c042fff0] [00003438] 0x3438
588 ** After cansend can0
589 BUG: spinlock bad magic on CPU#0, swapper/0
590  lock: c7985abc, .magic: c0000000, .owner: <none>/-1, .owner_cpu: -1069424200
591 Call Trace:
592 [c7ffbd00] [c0009c04] show_stack+0xb0/0x1d4 (unreliable)
593 [c7ffbd50] [c0300434] dump_stack+0x2c/0x44
594 [c7ffbd60] [c01afa50] spin_bug+0x84/0xd0
595 [c7ffbd80] [c01afbfc] do_raw_spin_lock+0x3c/0x15c
596 [c7ffbdb0] [c02ffcec] _raw_spin_lock+0x34/0x4c
597 [c7ffbdd0] [c025c1a0] dev_queue_xmit+0xa4/0x428
598 [c7ffbe00] [c02d68d0] can_send+0x9c/0x1a0
599 [c7ffbe20] [c02da27c] can_can_gw_rcv+0x108/0x164
600 [c7ffbe50] [c02d5978] can_rcv_filter+0xf8/0x2e8
601 [c7ffbe70] [c02d5c30] can_rcv+0xc8/0x140
602 [c7ffbe90] [c025a694] __netif_receive_skb+0x2cc/0x338
603 [c7ffbed0] [c025a8d8] netif_receive_skb+0x5c/0x98
604 [c7ffbef0] [c0208938] mscan_rx_poll+0x1c0/0x454
605 [c7ffbf50] [c025ac08] net_rx_action+0x104/0x230
606 [c7ffbfa0] [c00317a8] __do_softirq+0x118/0x22c
607 [c7ffbff0] [c0011eec] call_do_softirq+0x14/0x24
608 [c042fe60] [c0006d78] do_softirq+0x84/0xa8
609 [c042fe80] [c00314cc] irq_exit+0x88/0xb4
610 [c042fe90] [c0006efc] do_IRQ+0xe0/0x234
611 [c042fec0] [c0012bbc] ret_from_except+0x0/0x14
612 --- Exception: 501 at cpu_idle+0xfc/0x10c
613     LR = cpu_idle+0xfc/0x10c
614 [c042ff80] [c000afb8] cpu_idle+0x68/0x10c (unreliable)
615 [c042ffa0] [c0003ec0] rest_init+0x9c/0xbc
616 [c042ffc0] [c03da91c] start_kernel+0x2c0/0x2d8
617 [c042fff0] [00003438] 0x3438
618 Unrecoverable FP Unavailable Exception 801 at c7985ca0
619 Oops: Unrecoverable FP Unavailable Exception, sig: 6 [#1]
620 PREEMPT Shark
621 last sysfs file: /sys/devices/lpb.0/fc000000.flash/mtd/mtd2ro/dev
622 Modules linked in:
623 NIP: c7985ca0 LR: c025c200 CTR: c7985ca0
624 REGS: c7ffbd20 TRAP: 0801   Not tainted  (2.6.36.1-00011-gdb0ddb5)
625 MSR: 00009032 <EE,ME,IR,DR>  CR: 22002024  XER: 2000005f
626 TASK = c0411520[0] 'swapper' THREAD: c042e000
627 GPR00: c7985ca0 c7ffbdd0 c0411520 c7a49e20 c7985a60 00000010 c043b384 00004000 
628 GPR08: c043b788 00000000 00003fff c7ffbdd0 42002024 
629 NIP [c7985ca0] 0xc7985ca0
630 LR [c025c200] dev_queue_xmit+0x104/0x428
631 Call Trace:
632 [c7ffbdd0] [c025c1a0] dev_queue_xmit+0xa4/0x428 (unreliable)
633 [c7ffbe00] [c02d68d0] can_send+0x9c/0x1a0
634 [c7ffbe20] [c02da27c] can_can_gw_rcv+0x108/0x164
635 [c7ffbe50] [c02d5978] can_rcv_filter+0xf8/0x2e8
636 [c7ffbe70] [c02d5c30] can_rcv+0xc8/0x140
637 [c7ffbe90] [c025a694] __netif_receive_skb+0x2cc/0x338
638 [c7ffbed0] [c025a8d8] netif_receive_skb+0x5c/0x98
639 [c7ffbef0] [c0208938] mscan_rx_poll+0x1c0/0x454
640 [c7ffbf50] [c025ac08] net_rx_action+0x104/0x230
641 [c7ffbfa0] [c00317a8] __do_softirq+0x118/0x22c
642 [c7ffbff0] [c0011eec] call_do_softirq+0x14/0x24
643 [c042fe60] [c0006d78] do_softirq+0x84/0xa8
644 [c042fe80] [c00314cc] irq_exit+0x88/0xb4
645 [c042fe90] [c0006efc] do_IRQ+0xe0/0x234
646 [c042fec0] [c0012bbc] ret_from_except+0x0/0x14
647 --- Exception: 501 at cpu_idle+0xfc/0x10c
648     LR = cpu_idle+0xfc/0x10c
649 [c042ff80] [c000afb8] cpu_idle+0x68/0x10c (unreliable)
650 [c042ffa0] [c0003ec0] rest_init+0x9c/0xbc
651 [c042ffc0] [c03da91c] start_kernel+0x2c0/0x2d8
652 [c042fff0] [00003438] 0x3438
653 Instruction dump:
654 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 
655 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 
656 Kernel panic - not syncing: Fatal exception in interrupt
657 Call Trace:
658 [c7ffbc10] [c0009c04] show_stack+0xb0/0x1d4 (unreliable)
659 [c7ffbc60] [c0300434] dump_stack+0x2c/0x44
660 [c7ffbc70] [c0300508] panic+0xbc/0x200
661 [c7ffbcd0] [c000faf8] die+0x1a4/0x1cc
662 [c7ffbcf0] [c000fc34] kernel_fp_unavailable_exception+0x4c/0x64
663 [c7ffbd10] [c0012bbc] ret_from_except+0x0/0x14
664 --- Exception: 801 at 0xc7985ca0
665     LR = dev_queue_xmit+0x104/0x428
666 [c7ffbdd0] [c025c1a0] dev_queue_xmit+0xa4/0x428 (unreliable)
667 [c7ffbe00] [c02d68d0] can_send+0x9c/0x1a0
668 [c7ffbe20] [c02da27c] can_can_gw_rcv+0x108/0x164
669 [c7ffbe50] [c02d5978] can_rcv_filter+0xf8/0x2e8
670 [c7ffbe70] [c02d5c30] can_rcv+0xc8/0x140
671 [c7ffbe90] [c025a694] __netif_receive_skb+0x2cc/0x338
672 [c7ffbed0] [c025a8d8] netif_receive_skb+0x5c/0x98
673 [c7ffbef0] [c0208938] mscan_rx_poll+0x1c0/0x454
674 [c7ffbf50] [c025ac08] net_rx_action+0x104/0x230
675 [c7ffbfa0] [c00317a8] __do_softirq+0x118/0x22c
676 [c7ffbff0] [c0011eec] call_do_softirq+0x14/0x24
677 [c042fe60] [c0006d78] do_softirq+0x84/0xa8
678 [c042fe80] [c00314cc] irq_exit+0x88/0xb4
679 [c042fe90] [c0006efc] do_IRQ+0xe0/0x234
680 [c042fec0] [c0012bbc] ret_from_except+0x0/0x14
681 --- Exception: 501 at cpu_idle+0xfc/0x10c
682     LR = cpu_idle+0xfc/0x10c
683 [c042ff80] [c000afb8] cpu_idle+0x68/0x10c (unreliable)
684 [c042ffa0] [c0003ec0] rest_init+0x9c/0xbc
685 [c042ffc0] [c03da91c] start_kernel+0x2c0/0x2d8
686 [c042fff0] [00003438] 0x3438
687
688 ** After cangw with modifications -m ...
689 Unable to handle kernel paging request for data at address 0xdead4ead
690 Faulting instruction address: 0xc025c178
691 Oops: Kernel access of bad area, sig: 11 [#1]
692 PREEMPT Shark
693 last sysfs file: /sys/devices/lpb.0/fc000000.flash/mtd/mtd2ro/dev
694 Modules linked in:
695 NIP: c025c178 LR: c025c130 CTR: c02d90c4
696 REGS: c7ffbd70 TRAP: 0300   Not tainted  (2.6.36.1-00005-gc63c5e8)
697 MSR: 00009032 <EE,ME,IR,DR>  CR: 40008284  XER: 0000005f
698 DAR: dead4ead, DSISR: 20000000
699 TASK = c7a9ee10[369] 'cansend' THREAD: c7aca000
700 GPR00: c7a31820 c7ffbe20 c7a9ee10 00000080 00000000 00000000 c7a4ef24 00000000 
701 GPR08: 00000000 00000002 00000001 c7ffbe20 40000282 10019f68 c042b0b0 00000001 
702 GPR16: c046da04 c042bcf0 c042bce0 c7ffa03c c0414924 c0432ac4 c0432ac0 c7abfc00 
703 GPR24: 00000000 c7a4eee0 c7a318a0 c7abf000 c7a37d24 c7a4eee0 dead4ead c7ffbe20 
704 NIP [c025c178] dev_queue_xmit+0x7c/0x428
705 LR [c025c130] dev_queue_xmit+0x34/0x428
706 Call Trace:
707 [c7ffbe20] [c025c130] dev_queue_xmit+0x34/0x428 (unreliable)
708 [c7ffbe50] [c02d68d0] can_send+0x9c/0x1a0
709 [c7ffbe70] [c02da288] can_can_gw_rcv+0x114/0x170
710 [c7ffbea0] [c02d5978] can_rcv_filter+0xf8/0x2e8
711 [c7ffbec0] [c02d5c30] can_rcv+0xc8/0x140
712 [c7ffbee0] [c025a694] __netif_receive_skb+0x2cc/0x338
713 [c7ffbf20] [c025a7b8] process_backlog+0xb8/0x17c
714 [c7ffbf50] [c025ac08] net_rx_action+0x104/0x230
715 [c7ffbfa0] [c00317a8] __do_softirq+0x118/0x22c
716 [c7ffbff0] [c0011eec] call_do_softirq+0x14/0x24
717 [c7acbd60] [c0006d78] do_softirq+0x84/0xa8
718 [c7acbd80] [c025b634] netif_rx_ni+0x6c/0x90
719 [c7acbda0] [c02d691c] can_send+0xe8/0x1a0
720 [c7acbdc0] [c02d7f80] raw_sendmsg+0xf4/0x168
721 [c7acbdf0] [c0245cf8] sock_aio_write+0x104/0x134
722 [c7acbe50] [c00c7848] do_sync_write+0xbc/0x110
723 [c7acbef0] [c00c8638] vfs_write+0x170/0x190
724 [c7acbf10] [c00c8778] sys_write+0x5c/0xa8
725 [c7acbf40] [c0012524] ret_from_syscall+0x0/0x38
726 --- Exception: c01 at 0xff23618
727     LR = 0x1000094c
728 Instruction dump:
729 7fa4eb78 4e800421 801b01f0 7c7e1b78 5469043e 7f830040 54633032 409c01b4 
730 b13d0074 801b01e8 7f401a14 83da0004 <801e0000> 2f800000 419e0254 801e0078 
731 Kernel panic - not syncing: Fatal exception in interrupt
732 Call Trace:
733 [c7ffbc60] [c0009c04] show_stack+0xb0/0x1d4 (unreliable)
734 [c7ffbcb0] [c030043c] dump_stack+0x2c/0x44
735 [c7ffbcc0] [c0300510] panic+0xbc/0x200
736 [c7ffbd20] [c000faf8] die+0x1a4/0x1cc
737 [c7ffbd40] [c0014374] bad_page_fault+0x90/0xe0
738 [c7ffbd60] [c00129c4] handle_page_fault+0x7c/0x80
739 --- Exception: 300 at dev_queue_xmit+0x7c/0x428
740     LR = dev_queue_xmit+0x34/0x428
741 [c7ffbe50] [c02d68d0] can_send+0x9c/0x1a0
742 [c7ffbe70] [c02da288] can_can_gw_rcv+0x114/0x170
743 [c7ffbea0] [c02d5978] can_rcv_filter+0xf8/0x2e8
744 [c7ffbec0] [c02d5c30] can_rcv+0xc8/0x140
745 [c7ffbee0] [c025a694] __netif_receive_skb+0x2cc/0x338
746 [c7ffbf20] [c025a7b8] process_backlog+0xb8/0x17c
747 [c7ffbf50] [c025ac08] net_rx_action+0x104/0x230
748 [c7ffbfa0] [c00317a8] __do_softirq+0x118/0x22c
749 [c7ffbff0] [c0011eec] call_do_softirq+0x14/0x24
750 [c7acbd60] [c0006d78] do_softirq+0x84/0xa8
751 [c7acbd80] [c025b634] netif_rx_ni+0x6c/0x90
752 [c7acbda0] [c02d691c] can_send+0xe8/0x1a0
753 [c7acbdc0] [c02d7f80] raw_sendmsg+0xf4/0x168
754 [c7acbdf0] [c0245cf8] sock_aio_write+0x104/0x134
755 [c7acbe50] [c00c7848] do_sync_write+0xbc/0x110
756 [c7acbef0] [c00c8638] vfs_write+0x170/0x190
757 [c7acbf10] [c00c8778] sys_write+0x5c/0xa8
758 [c7acbf40] [c0012524] ret_from_syscall+0x0/0x38
759 --- Exception: c01 at 0xff23618
760     LR = 0x1000094c
761
762 * write returns ENOBUFS
763 The reason is queuing discipline - the queue is full and
764 pfifo_fast_enqueue returns failure. This failure is propagated down to
765 qdisc_enqueue_root(), __dev_xmit_skb(), dev_queue_xmit() and
766 can_send()
767
768 ** See the follwing trace
769
770 # tracer: function_graph
771 #
772 # CPU  DURATION                  FUNCTION CALLS
773 # |     |   |                     |   |   |   |
774  1)               |  can_send() {
775  1)               |    dev_queue_xmit() {
776  1)               |      rt_spin_lock() {
777  1)   0.894 us    |        __might_sleep();
778  1)   2.750 us    |      }
779  1)               |      pfifo_fast_enqueue() {
780  1)               |        kfree_skb() {
781  1)               |          __kfree_skb() {
782  1)               |            skb_release_head_state() {
783  1)               |              sock_wfree() {
784  1)               |                sock_def_write_space() {
785  1)               |                  rt_read_lock() {
786  1)               |                    __rt_spin_lock() {
787  1)   0.677 us    |                      __might_sleep();
788  1)   2.386 us    |                    }
789  1)   4.150 us    |                  }
790  1)               |                  rt_read_unlock() {
791  1)   0.918 us    |                    __rt_spin_unlock();
792  1)   2.644 us    |                  }
793  1)   9.375 us    |                }
794  1) + 10.999 us   |              }
795  1) + 12.708 us   |            }
796  1)               |            skb_release_data() {
797  1)               |              kfree() {
798  1)               |                _slab_irq_disable() {
799  1)               |                  rt_spin_lock() {
800  1)   0.849 us    |                    __might_sleep();
801  1)   2.588 us    |                  }
802  1)   4.242 us    |                }
803  1)   0.864 us    |                __cache_free();
804  1)   0.888 us    |                rt_spin_unlock();
805  1)   9.456 us    |              }
806  1) + 11.185 us   |            }
807  1)               |            kmem_cache_free() {
808  1)               |              _slab_irq_disable() {
809  1)               |                rt_spin_lock() {
810  1)   0.812 us    |                  __might_sleep();
811  1)   2.542 us    |                }
812  1)   4.240 us    |              }
813  1)   0.813 us    |              __cache_free();
814  1)   0.894 us    |              rt_spin_unlock();
815  1)   9.329 us    |            }
816  1) + 36.444 us   |          }
817  1) + 38.136 us   |        }
818  1) + 39.974 us   |      }
819  1)               |      /* qdisc_enqueue_root = 1 */
820  1)               |      __qdisc_run() {
821  1)               |        sch_direct_xmit() {
822  1)   0.855 us    |          rt_spin_unlock();
823  1)               |          rt_spin_lock() {
824  1)   0.827 us    |            __might_sleep();
825  1)   2.521 us    |          }
826  1)               |          dev_hard_start_xmit() {
827  1)               |            sja1000_start_xmit() {
828  1)   1.646 us    |              kvaser_pci_write_reg();
829  1)   1.460 us    |              kvaser_pci_write_reg();
830  1)   1.691 us    |              kvaser_pci_write_reg();
831  1)   1.450 us    |              kvaser_pci_write_reg();
832  1)   1.416 us    |              kvaser_pci_write_reg();
833  1)               |              can_put_echo_skb() {
834  1)               |                sock_wfree() {
835  1)               |                  sock_def_write_space() {
836  1)               |                    rt_read_lock() {
837  1)               |                      __rt_spin_lock() {
838  1)   0.939 us    |                        __might_sleep();
839  1)   2.699 us    |                      }
840  1)   4.337 us    |                    }
841  1)               |                    rt_read_unlock() {
842  1)   0.844 us    |                      __rt_spin_unlock();
843  1)   2.507 us    |                    }
844  1)   9.242 us    |                  }
845  1) + 11.047 us   |                }
846  1) + 12.791 us   |              }
847  1)               |              sja1000_write_cmdreg() {
848  1)               |                rt_spin_lock() {
849  1)   0.802 us    |                  __might_sleep();
850  1)   2.532 us    |                }
851  1)   1.481 us    |                kvaser_pci_write_reg();
852  1)   2.155 us    |                kvaser_pci_read_reg();
853  1)   0.843 us    |                rt_spin_unlock();
854  1) + 11.100 us   |              }
855  1) + 38.263 us   |            }
856  1)               |            /* ops->ndo_start_xmit(skb, dev) = 0 */
857  1) + 41.508 us   |          }
858  1)               |          /* dev_hard_start_xmit(skb, dev) = 0 */
859  1)   0.884 us    |          rt_spin_unlock();
860  1)               |          rt_spin_lock() {
861  1)   0.817 us    |            __might_sleep();
862  1)   2.583 us    |          }
863  1)               |          /* qdisc_len = 9 */
864  1)               |          /* sch_direct_xmit returns 0 */
865  1) + 57.502 us   |        }
866  1) + 59.288 us   |      }
867  1)   0.877 us    |      rt_spin_unlock();
868  1)               |      /* __dev_xmit_skb = 1 */
869  1) ! 111.265 us  |    }
870  1)               |  /* dev_queue_xmit = 1 */
871  1)               |  /* net_xmit_errno = -105 */
872  1)   0.956 us    |    kfree_skb();
873  1) ! 117.340 us  |  }
874  1)               |  /* write returned -1 */
875
876 ** The trace was generated by kernel v2.6.33.7-rt29-4-g92487e4 with the following patch applied:
877
878 diff --git a/net/can/af_can.c b/net/can/af_can.c
879 index 4d8479d7..c91968d 100644
880 --- a/net/can/af_can.c
881 +++ b/net/can/af_can.c
882 @@ -344,8 +344,11 @@ int can_send(struct sk_buff *skb, int loop)
883  
884         /* send to netdevice */
885         err = dev_queue_xmit(skb);
886 -       if (err > 0)
887 +       trace_printk("dev_queue_xmit = %d\n", err);
888 +       if (err > 0) {
889                 err = net_xmit_errno(err);
890 +               trace_printk("net_xmit_errno = %d\n", err);
891 +       }
892  
893         if (err) {
894  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)
895 diff --git a/net/core/dev.c b/net/core/dev.c
896 index 7a5412e..10ca9b4 100644
897 --- a/net/core/dev.c
898 +++ b/net/core/dev.c
899 @@ -1828,6 +1828,8 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
900                         skb_dst_drop(skb);
901  
902                 rc = ops->ndo_start_xmit(skb, dev);
903 +               trace_printk("ops->ndo_start_xmit(skb, dev) = %d\n", rc);
904 +
905                 if (rc == NETDEV_TX_OK)
906                         txq_trans_update(txq);
907                 /*
908 @@ -1854,6 +1856,7 @@ gso:
909                 skb->next = nskb->next;
910                 nskb->next = NULL;
911                 rc = ops->ndo_start_xmit(nskb, dev);
912 +               trace_printk("gso: ops->ndo_start_xmit(skb, dev) = %d\n", rc);
913                 if (unlikely(rc != NETDEV_TX_OK)) {
914                         if (rc & ~NETDEV_TX_MASK)
915                                 goto out_kfree_gso_skb;
916 @@ -1949,6 +1952,8 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
917         spin_lock(root_lock);
918         if (unlikely(test_bit(__QDISC_STATE_DEACTIVATED, &q->state))) {
919                 kfree_skb(skb);
920 +               trace_printk("QDISC_STATE_DEACTIVATED\n");
921 +
922                 rc = NET_XMIT_DROP;
923         } else if ((q->flags & TCQ_F_CAN_BYPASS) && !qdisc_qlen(q) &&
924                    !test_and_set_bit(__QDISC_STATE_RUNNING, &q->state)) {
925 @@ -1966,6 +1971,7 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
926                 rc = NET_XMIT_SUCCESS;
927         } else {
928                 rc = qdisc_enqueue_root(skb, q);
929 +               trace_printk("qdisc_enqueue_root = %d\n", rc);
930                 qdisc_run(q);
931         }
932         spin_unlock(root_lock);
933 @@ -2047,6 +2053,7 @@ gso:
934  #endif
935         if (q->enqueue) {
936                 rc = __dev_xmit_skb(skb, q, dev, txq);
937 +               trace_printk("__dev_xmit_skb = %d\n", rc);
938                 goto out;
939         }
940  
941 @@ -2072,6 +2079,8 @@ gso:
942  
943                         if (!netif_tx_queue_stopped(txq)) {
944                                 rc = dev_hard_start_xmit(skb, dev, txq);
945 +                               trace_printk("dev_hard_start_xmit = %d\n", rc);
946 +
947                                 if (dev_xmit_complete(rc)) {
948                                         HARD_TX_UNLOCK(dev, txq);
949                                         goto out;
950 diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
951 index bf7f50e..aea0833 100644
952 --- a/net/sched/sch_generic.c
953 +++ b/net/sched/sch_generic.c
954 @@ -125,6 +125,7 @@ int sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q,
955         HARD_TX_LOCK(dev, txq);
956         if (!netif_tx_queue_stopped(txq) && !netif_tx_queue_frozen(txq))
957                 ret = dev_hard_start_xmit(skb, dev, txq);
958 +       trace_printk("dev_hard_start_xmit(skb, dev) = %d\n", ret);
959  
960         HARD_TX_UNLOCK(dev, txq);
961  
962 @@ -133,9 +134,11 @@ int sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q,
963         if (dev_xmit_complete(ret)) {
964                 /* Driver sent out skb successfully or skb was consumed */
965                 ret = qdisc_qlen(q);
966 +               trace_printk("qdisc_len = %d\n", ret);
967         } else if (ret == NETDEV_TX_LOCKED) {
968                 /* Driver try lock failed */
969                 ret = handle_dev_cpu_collision(skb, txq, q);
970 +               trace_printk("handle_dev_cpu_collision = %d\n", ret);
971         } else {
972                 /* Driver returned NETDEV_TX_BUSY - requeue skb */
973                 if (unlikely (ret != NETDEV_TX_BUSY && net_ratelimit()))
974 @@ -143,12 +146,13 @@ int sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q,
975                                dev->name, ret, q->q.qlen);
976  
977                 ret = dev_requeue_skb(skb, q);
978 +               trace_printk("dev_requeue_skb = %d\n", ret);
979         }
980  
981         if (ret && (netif_tx_queue_stopped(txq) ||
982                     netif_tx_queue_frozen(txq)))
983                 ret = 0;
984 -
985 +       trace_printk("%s returns %d\n", __FUNCTION__, ret);
986         return ret;
987  }
988