Revision 732256b9335f8456623bb772d86c2a24e3cafca2 authored by Erik Hugne on 07 January 2014, 20:51:36 UTC, committed by David S. Miller on 07 January 2014, 21:15:24 UTC
When we pull a received packet from a link's 'deferred packets' queue for processing, its 'next' pointer is not cleared, and still refers to the next packet in that queue, if any. This is incorrect, but caused no harm before commit 40ba3cdf542a469aaa9083fa041656e59b109b90 ("tipc: message reassembly using fragment chain") was introduced. After that commit, it may sometimes lead to the following oops: general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC Modules linked in: tipc CPU: 4 PID: 0 Comm: swapper/4 Tainted: G W 3.13.0-rc2+ #6 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007 task: ffff880017af4880 ti: ffff880017aee000 task.ti: ffff880017aee000 RIP: 0010:[<ffffffff81710694>] [<ffffffff81710694>] skb_try_coalesce+0x44/0x3d0 RSP: 0018:ffff880016603a78 EFLAGS: 00010212 RAX: 6b6b6b6bd6d6d6d6 RBX: ffff880013106ac0 RCX: ffff880016603ad0 RDX: ffff880016603ad7 RSI: ffff88001223ed00 RDI: ffff880013106ac0 RBP: ffff880016603ab8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: ffff88001223ed00 R13: ffff880016603ad0 R14: 000000000000058c R15: ffff880012297650 FS: 0000000000000000(0000) GS:ffff880016600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 000000000805b000 CR3: 0000000011f5d000 CR4: 00000000000006e0 Stack: ffff880016603a88 ffffffff810a38ed ffff880016603aa8 ffff88001223ed00 0000000000000001 ffff880012297648 ffff880016603b68 ffff880012297650 ffff880016603b08 ffffffffa0006c51 ffff880016603b08 00ffffffa00005fc Call Trace: <IRQ> [<ffffffff810a38ed>] ? trace_hardirqs_on+0xd/0x10 [<ffffffffa0006c51>] tipc_link_recv_fragment+0xd1/0x1b0 [tipc] [<ffffffffa0007214>] tipc_recv_msg+0x4e4/0x920 [tipc] [<ffffffffa00016f0>] ? tipc_l2_rcv_msg+0x40/0x250 [tipc] [<ffffffffa000177c>] tipc_l2_rcv_msg+0xcc/0x250 [tipc] [<ffffffffa00016f0>] ? tipc_l2_rcv_msg+0x40/0x250 [tipc] [<ffffffff8171e65b>] __netif_receive_skb_core+0x80b/0xd00 [<ffffffff8171df94>] ? __netif_receive_skb_core+0x144/0xd00 [<ffffffff8171eb76>] __netif_receive_skb+0x26/0x70 [<ffffffff8171ed6d>] netif_receive_skb+0x2d/0x200 [<ffffffff8171fe70>] napi_gro_receive+0xb0/0x130 [<ffffffff815647c2>] e1000_clean_rx_irq+0x2c2/0x530 [<ffffffff81565986>] e1000_clean+0x266/0x9c0 [<ffffffff81985f7b>] ? notifier_call_chain+0x2b/0x160 [<ffffffff8171f971>] net_rx_action+0x141/0x310 [<ffffffff81051c1b>] __do_softirq+0xeb/0x480 [<ffffffff819817bb>] ? _raw_spin_unlock+0x2b/0x40 [<ffffffff810b8c42>] ? handle_fasteoi_irq+0x72/0x100 [<ffffffff81052346>] irq_exit+0x96/0xc0 [<ffffffff8198cbc3>] do_IRQ+0x63/0xe0 [<ffffffff81981def>] common_interrupt+0x6f/0x6f <EOI> This happens when the last fragment of a message has passed through the the receiving link's 'deferred packets' queue, and at least one other packet was added to that queue while it was there. After the fragment chain with the complete message has been successfully delivered to the receiving socket, it is released. Since 'next' pointer of the last fragment in the released chain now is non-NULL, we get the crash shown above. We fix this by clearing the 'next' pointer of all received packets, including those being pulled from the 'deferred' queue, before they undergo any further processing. Fixes: 40ba3cdf542a4 ("tipc: message reassembly using fragment chain") Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Reported-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 657e5d1
File | Mode | Size |
---|---|---|
cpu | ||
debug | ||
events | ||
gcov | ||
irq | ||
locking | ||
power | ||
printk | ||
rcu | ||
sched | ||
time | ||
trace | ||
.gitignore | -rw-r--r-- | 91 bytes |
Kconfig.freezer | -rw-r--r-- | 52 bytes |
Kconfig.hz | -rw-r--r-- | 1.6 KB |
Kconfig.locks | -rw-r--r-- | 4.3 KB |
Kconfig.preempt | -rw-r--r-- | 2.1 KB |
Makefile | -rw-r--r-- | 7.6 KB |
acct.c | -rw-r--r-- | 16.8 KB |
async.c | -rw-r--r-- | 9.9 KB |
audit.c | -rw-r--r-- | 47.6 KB |
audit.h | -rw-r--r-- | 10.1 KB |
audit_tree.c | -rw-r--r-- | 22.2 KB |
audit_watch.c | -rw-r--r-- | 13.9 KB |
auditfilter.c | -rw-r--r-- | 32.9 KB |
auditsc.c | -rw-r--r-- | 64.2 KB |
backtracetest.c | -rw-r--r-- | 2.1 KB |
bounds.c | -rw-r--r-- | 773 bytes |
capability.c | -rw-r--r-- | 12.0 KB |
cgroup.c | -rw-r--r-- | 153.1 KB |
cgroup_freezer.c | -rw-r--r-- | 12.7 KB |
compat.c | -rw-r--r-- | 28.5 KB |
configs.c | -rw-r--r-- | 2.8 KB |
context_tracking.c | -rw-r--r-- | 6.8 KB |
cpu.c | -rw-r--r-- | 17.1 KB |
cpu_pm.c | -rw-r--r-- | 6.5 KB |
cpuset.c | -rw-r--r-- | 77.6 KB |
crash_dump.c | -rw-r--r-- | 1.2 KB |
cred.c | -rw-r--r-- | 21.2 KB |
delayacct.c | -rw-r--r-- | 5.0 KB |
dma.c | -rw-r--r-- | 3.6 KB |
elfcore.c | -rw-r--r-- | 396 bytes |
exec_domain.c | -rw-r--r-- | 4.3 KB |
exit.c | -rw-r--r-- | 42.6 KB |
extable.c | -rw-r--r-- | 3.9 KB |
fork.c | -rw-r--r-- | 45.7 KB |
freezer.c | -rw-r--r-- | 4.6 KB |
futex.c | -rw-r--r-- | 71.1 KB |
futex_compat.c | -rw-r--r-- | 4.5 KB |
groups.c | -rw-r--r-- | 6.0 KB |
hrtimer.c | -rw-r--r-- | 47.7 KB |
hung_task.c | -rw-r--r-- | 5.7 KB |
irq_work.c | -rw-r--r-- | 4.5 KB |
itimer.c | -rw-r--r-- | 7.3 KB |
jump_label.c | -rw-r--r-- | 11.0 KB |
kallsyms.c | -rw-r--r-- | 15.0 KB |
kcmp.c | -rw-r--r-- | 4.3 KB |
kexec.c | -rw-r--r-- | 42.5 KB |
kmod.c | -rw-r--r-- | 19.4 KB |
kprobes.c | -rw-r--r-- | 58.8 KB |
ksysfs.c | -rw-r--r-- | 5.5 KB |
kthread.c | -rw-r--r-- | 18.6 KB |
latencytop.c | -rw-r--r-- | 7.6 KB |
module-internal.h | -rw-r--r-- | 458 bytes |
module.c | -rw-r--r-- | 96.3 KB |
module_signing.c | -rw-r--r-- | 5.9 KB |
notifier.c | -rw-r--r-- | 16.0 KB |
nsproxy.c | -rw-r--r-- | 6.3 KB |
padata.c | -rw-r--r-- | 26.9 KB |
panic.c | -rw-r--r-- | 11.2 KB |
params.c | -rw-r--r-- | 22.1 KB |
pid.c | -rw-r--r-- | 14.9 KB |
pid_namespace.c | -rw-r--r-- | 9.0 KB |
posix-cpu-timers.c | -rw-r--r-- | 39.5 KB |
posix-timers.c | -rw-r--r-- | 30.2 KB |
profile.c | -rw-r--r-- | 16.1 KB |
ptrace.c | -rw-r--r-- | 29.9 KB |
range.c | -rw-r--r-- | 3.0 KB |
reboot.c | -rw-r--r-- | 9.6 KB |
relay.c | -rw-r--r-- | 32.6 KB |
res_counter.c | -rw-r--r-- | 4.4 KB |
resource.c | -rw-r--r-- | 31.7 KB |
seccomp.c | -rw-r--r-- | 13.9 KB |
signal.c | -rw-r--r-- | 95.0 KB |
smp.c | -rw-r--r-- | 18.1 KB |
smpboot.c | -rw-r--r-- | 6.9 KB |
smpboot.h | -rw-r--r-- | 564 bytes |
softirq.c | -rw-r--r-- | 18.3 KB |
stacktrace.c | -rw-r--r-- | 1.1 KB |
stop_machine.c | -rw-r--r-- | 17.1 KB |
sys.c | -rw-r--r-- | 50.2 KB |
sys_ni.c | -rw-r--r-- | 6.0 KB |
sysctl.c | -rw-r--r-- | 61.0 KB |
sysctl_binary.c | -rw-r--r-- | 51.0 KB |
system_certificates.S | -rw-r--r-- | 470 bytes |
system_keyring.c | -rw-r--r-- | 2.7 KB |
task_work.c | -rw-r--r-- | 3.4 KB |
taskstats.c | -rw-r--r-- | 16.2 KB |
test_kprobes.c | -rw-r--r-- | 8.5 KB |
time.c | -rw-r--r-- | 18.8 KB |
timeconst.bc | -rw-r--r-- | 2.7 KB |
timer.c | -rw-r--r-- | 46.4 KB |
tracepoint.c | -rw-r--r-- | 19.8 KB |
tsacct.c | -rw-r--r-- | 5.0 KB |
uid16.c | -rw-r--r-- | 5.0 KB |
up.c | -rw-r--r-- | 1.7 KB |
user-return-notifier.c | -rw-r--r-- | 1.3 KB |
user.c | -rw-r--r-- | 5.3 KB |
user_namespace.c | -rw-r--r-- | 23.0 KB |
utsname.c | -rw-r--r-- | 2.9 KB |
utsname_sysctl.c | -rw-r--r-- | 3.0 KB |
watchdog.c | -rw-r--r-- | 15.6 KB |
workqueue.c | -rw-r--r-- | 140.7 KB |
workqueue_internal.h | -rw-r--r-- | 2.1 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...