]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commit
Staging: batman-adv: ensure that eth_type_trans gets linear memory
authorMarek Lindner <lindner_marek@yahoo.de>
Mon, 22 Nov 2010 11:34:49 +0000 (12:34 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 29 Nov 2010 18:53:14 +0000 (10:53 -0800)
commitb6faaae1a15a352d68b3e3cd8b840e56709820bf
tree744d812b905df6518c39c103511c6b16ad7bd328
parent9ee898739b7e4d292abed911008b3f91b442118a
Staging: batman-adv: ensure that eth_type_trans gets linear memory

eth_type_trans tries to pull data with the length of the ethernet header
from the skb. We only ensured that enough data for the first ethernet
header and the batman header is available in non-paged memory of the skb
and not for the ethernet after the batman header.

eth_type_trans would fail sometimes with drivers which don't ensure that
all there data is perfectly linearised.

The failure was noticed through a kernel bug Oops generated by the
skb_pull inside eth_type_trans.

Reported-by: Rafal Lesniak <lesniak@eresi-project.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/batman-adv/soft-interface.c