From patchwork Sun Feb 2 14:53:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 3781 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=178.209.62.157; helo=s3.neomailbox.net; envelope-from=mareklindner@neomailbox.ch; receiver=b.a.t.m.a.n@lists.open-mesh.org Received: from s3.neomailbox.net (s3.neomailbox.net [178.209.62.157]) by open-mesh.org (Postfix) with ESMTPS id 68C0F60224F for ; Sun, 2 Feb 2014 15:53:33 +0100 (CET) From: Marek Lindner To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 2 Feb 2014 22:53:11 +0800 Message-Id: <1391352791-19305-1-git-send-email-mareklindner@neomailbox.ch> MIME-Version: 1.0 Cc: Marek Lindner Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: backport eth_hdr() compat fix to avoid kernel oops X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Feb 2014 14:53:33 -0000 From: Linus Lüssing Introduced by 41b38727749a94c1a65cf0f4be9bfe1cbaf0adeb ("batman-adv: fix potential kernel paging error for unicast transmissions") Signed-off-by: Marek Lindner CC: Linus Lüssing --- compat.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/compat.h b/compat.h index a4ab202..deea92b 100644 --- a/compat.h +++ b/compat.h @@ -289,6 +289,17 @@ static int batadv_interface_set_mac_addr(struct net_device *dev, void *p) \ }\ static int __batadv_interface_set_mac_addr(x, y) +#define batadv_interface_tx(x, y) \ +__batadv_interface_tx(struct sk_buff *skb, struct net_device *soft_iface); \ +static int batadv_interface_tx(struct sk_buff *skb, \ + struct net_device *soft_iface) \ +{ \ + skb_reset_mac_header(skb); \ + return __batadv_interface_tx(skb, soft_iface); \ +} \ +static int __batadv_interface_tx(struct sk_buff *skb, \ + struct net_device *soft_iface) + #define netdev_master_upper_dev_link netdev_set_master #define netdev_upper_dev_unlink(slave, master) netdev_set_master(slave, NULL) #define netdev_master_upper_dev_get(dev) \