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