alistair23-linux/net/core
Nishank Trivedi 6af773e786 pktgen: fix crash with vlan and packet size less than 46
If vlan option is being specified in the pktgen and packet size
being requested is less than 46 bytes, despite being illogical
request, pktgen should not crash the kernel.

BUG: unable to handle kernel paging request at ffff88021fb82000
Process kpktgend_0 (pid: 1184, threadinfo ffff880215f1a000, task ffff880218544530)
Call Trace:
[<ffffffffa0637cd2>] ? pktgen_finalize_skb+0x222/0x300 [pktgen]
[<ffffffff814f0084>] ? build_skb+0x34/0x1c0
[<ffffffffa0639b11>] pktgen_thread_worker+0x5d1/0x1790 [pktgen]
[<ffffffffa03ffb10>] ? igb_xmit_frame_ring+0xa30/0xa30 [igb]
[<ffffffff8107ba20>] ? wake_up_bit+0x40/0x40
[<ffffffff8107ba20>] ? wake_up_bit+0x40/0x40
[<ffffffffa0639540>] ? spin+0x240/0x240 [pktgen]
[<ffffffff8107b4e3>] kthread+0x93/0xa0
[<ffffffff81615de4>] kernel_thread_helper+0x4/0x10
[<ffffffff8107b450>] ? flush_kthread_worker+0x80/0x80
[<ffffffff81615de0>] ? gs_change+0x13/0x13

The root cause of why pktgen is not able to handle this case is due
to comparison of signed (datalen) and unsigned data (sizeof), which
eventually passes a huge number to skb_put().

Signed-off-by: Nishank Trivedi <nistrive@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-13 17:10:00 -04:00
..
datagram.c net: skb_free_datagram_locked() doesnt drop all packets 2012-06-27 15:40:57 -07:00
dev.c net: small bug on rxhash calculation 2012-09-08 18:41:48 -04:00
dev_addr_lists.c
drop_monitor.c drop_monitor: dont sleep in atomic context 2012-06-04 11:42:01 -04:00
dst.c net: force dst_default_metrics to const section 2012-08-08 16:00:28 -07:00
ethtool.c ethtool: Make more commands available to unprivileged processes 2012-06-12 18:51:09 -07:00
fib_rules.c ipv4: Elide fib_validate_source() completely when possible. 2012-06-29 01:36:36 -07:00
filter.c netvm: allow skb allocation to use PFMEMALLOC reserves 2012-07-31 18:42:46 -07:00
flow.c
flow_dissector.c ipv6: add ipv6_addr_hash() helper 2012-07-18 11:28:46 -07:00
gen_estimator.c
gen_stats.c
iovec.c
link_watch.c
Makefile
neighbour.c neigh: Convert over to dst_neigh_lookup_skb(). 2012-07-05 01:12:00 -07:00
net-sysfs.c wireless: remove wext sysfs 2012-06-05 15:32:15 -04:00
net-sysfs.h
net-traces.c
net_namespace.c net: Statically initialize init_net.dev_base_head 2012-07-18 13:32:27 -07:00
netevent.c
netpoll.c netpoll: revert 6bdb7fe310 and fix be_poll() instead 2012-08-29 15:03:23 -04:00
netprio_cgroup.c net: netprio: fix cgrp create and write priomap race 2012-08-16 14:56:11 -07:00
pktgen.c pktgen: fix crash with vlan and packet size less than 46 2012-09-13 17:10:00 -04:00
request_sock.c
rtnetlink.c This patch series contains a major revamp of how we collect entropy 2012-07-31 19:07:42 -07:00
scm.c net: netprio: fd passed in SCM_RIGHTS datagram not set correctly 2012-08-16 14:56:11 -07:00
secure_seq.c
skbuff.c netvm: allow skb allocation to use PFMEMALLOC reserves 2012-07-31 18:42:46 -07:00
sock.c net: fix net/core/sock.c build error 2012-09-10 16:44:45 -04:00
sock_diag.c net: make sock diag per-namespace 2012-07-16 22:31:34 -07:00
stream.c
sysctl_net_core.c
timestamping.c
user_dma.c
utils.c