/* * Stack trace management functions * * Copyright IBM Corp. 2006 * Author(s): Heiko Carstens */ #include #include #include #include static int __save_address(void *data, unsigned long address, int nosched) { struct stack_trace *trace = data; if (nosched && in_sched_functions(address)) return 0; if (trace->skip > 0) { trace->skip--; return 0; } if (trace->nr_entries < trace->max_entries) { trace->entries[trace->nr_entries++] = address; return 0; } return 1; } static int save_address(void *data, unsigned long address, int reliable) { return __save_address(data, address, 0); } static int save_address_nosched(void *data, unsigned long address, int reliable) { return __save_address(data, address, 1); } void save_stack_trace(struct stack_trace *trace) { unsigned long sp; sp = current_stack_pointer(); dump_trace(save_address, trace, NULL, sp); if (trace->nr_entries < trace->max_entries) trace->entries[trace->nr_entries++] = ULONG_MAX; } EXPORT_SYMBOL_GPL(save_stack_trace); void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) { unsigned long sp; sp = tsk->thread.ksp; if (tsk == current) sp = current_stack_pointer(); dump_trace(save_address_nosched, trace, tsk, sp); if (trace->nr_entries < trace->max_entries) trace->entries[trace->nr_entries++] = ULONG_MAX; } EXPORT_SYMBOL_GPL(save_stack_trace_tsk); void save_stack_trace_regs(struct pt_regs *regs, struct stack_trace *trace) { unsigned long sp; sp = kernel_stack_pointer(regs); dump_trace(save_address, trace, NULL, sp); if (trace->nr_entries < trace->max_entries) trace->entries[trace->nr_entries++] = ULONG_MAX; } EXPORT_SYMBOL_GPL(save_stack_trace_regs); ef='/cgit.cgi/linux/net-next.git/tree/?h=nds-private-remove&id=4d8bbbff1227bbb27fdb02b6db17f080c06eedad'>treecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-11 12:52:05 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-11 12:52:05 -0700
commit4d8bbbff1227bbb27fdb02b6db17f080c06eedad (patch)
treed2c1a2bdc4eac9bdea2c03b088fdf58142e3d9c9
parent50c73890d314921e2097d47e98c2ca59b3876ec7 (diff)
parente271c7b4420ddbb9fae82a2b31a5ab3edafcf4fe (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "Hopefully the last round of fixes this release, fingers crossed :) 1) Initialize static nf_conntrack_locks_all_lock properly, from Florian Westphal. 2) Need to cancel pending work when destroying IDLETIMER entries, from Liping Zhang. 3) Fix TX param usage when sending TSO over iwlwifi devices, from Emmanuel Grumbach. 4) NFACCT quota params not validated properly, from Phil Turnbull. 5) Resolve more glibc vs. kernel header conflicts, from Mikko Tapeli. 6) Missing IRQ free in ravb_close(), from Geert Uytterhoeven. 7) Fix infoleak in x25, from Kangjie Lu. 8) Similarly in thunderx driver, from Heinrich Schuchardt. 9) tc_ife.h uapi header not exported properly, from Jamal Hadi Salim. 10) Don't reenable PHY interreupts if device is in polling mode, from Shaohui Xie. 11) Packet scheduler actions late binding was not being handled properly at all, from Jamal Hadi Salim. 12) Fix binding of conntrack entries to helpers in openvswitch, from Joe Stringer" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (21 commits) gre: do not keep the GRE header around in collect medata mode openvswitch: Fix cached ct with helper. net sched: ife action fix late binding net sched: skbedit action fix late binding net sched: simple action fix late binding net sched: mirred action fix late binding net sched: ipt action fix late binding net sched: vlan action fix late binding net: phylib: fix interrupts re-enablement in phy_start tcp: refresh skb timestamp at retransmit time net: nps_enet: bug fix - handle lost tx interrupts net: nps_enet: Tx handler synchronization export tc ife uapi header net: thunderx: avoid exposing kernel stack net: fix a kernel infoleak in x25 module ravb: Add missing free_irq() call to ravb_close() uapi glibc compat: fix compile errors when glibc net/if.h included before linux/if.h netfilter: nfnetlink_acct: validate NFACCT_QUOTA parameter iwlwifi: mvm: don't override the rate with the AMSDU len netfilter: IDLETIMER: fix race condition when destroy the target ...