diff options
author | Linus Lüssing <linus.luessing@web.de> | 2013-08-06 14:21:15 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-08-10 16:55:42 -0400 |
commit | 9d2c9488cedb666bc8206fbdcdc1575e0fbc5929 (patch) | |
tree | eef64eda7ea4985117e5a4ccefaa76578bded182 /net/batman-adv/bridge_loop_avoidance.c | |
parent | 645359930231d5e78fd3296a38b98c1a658a7ade (diff) |
batman-adv: fix potential kernel paging errors for unicast transmissions
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>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/bridge_loop_avoidance.c')
-rw-r--r-- | net/batman-adv/bridge_loop_avoidance.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index e14531f1ce1c..264de88db320 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c | |||
@@ -1529,6 +1529,8 @@ out: | |||
1529 | * in these cases, the skb is further handled by this function and | 1529 | * in these cases, the skb is further handled by this function and |
1530 | * returns 1, otherwise it returns 0 and the caller shall further | 1530 | * returns 1, otherwise it returns 0 and the caller shall further |
1531 | * process the skb. | 1531 | * process the skb. |
1532 | * | ||
1533 | * This call might reallocate skb data. | ||
1532 | */ | 1534 | */ |
1533 | int batadv_bla_tx(struct batadv_priv *bat_priv, struct sk_buff *skb, | 1535 | int batadv_bla_tx(struct batadv_priv *bat_priv, struct sk_buff *skb, |
1534 | unsigned short vid) | 1536 | unsigned short vid) |