On Wednesday, August 07, 2013 02:21:15 Linus Lüssing wrote:
There are several functions which might reallocate skb data. Currently some places keep reusing their old ethhdr pointer regardless of whether they became invalid after such a reallocation or not. This potentially leads to kernel paging errors.
This patch fixes these by refetching the ethdr pointer after the potential reallocations.
Signed-off-by: Linus Lüssing linus.luessing@web.de
v4:
- Reassign new ethhdr correctly in batadv_unicast_generic_send_skb()
v3:
- Remove the change from 'Returns' to 'Return
- Avoid using eth_hdr(skb), using (struct ethhdr *)skb->data instead
- Added fix for batadv_gw_is_dhcp_target() too
bridge_loop_avoidance.c | 2 ++ gateway_client.c | 12 +++++++++++- gateway_client.h | 3 +-- soft-interface.c | 8 +++++++- unicast.c | 12 ++++++++++-- 5 files changed, 31 insertions(+), 6 deletions(-)
Applied in revision c98c3e5.
Thanks, Marek