The annotated tag, v2.6.36-rc3 has been created
at 40f7ec041a61c6b6d419e418818c79f7c23a1007 (tag)
tagging 2bfc96a127bc1cc94d26bfaa40159966064f9c8c (commit)
replaces v2.6.36-rc2
tagged by Linus Torvalds
on Sun Aug 29 08:36:18 2010 -0700
- Shortlog ------------------------------------------------------------
Linux 2.6.36-rc3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEABECAAYFAkx6fncACgkQF3YsRnbiHLuq5ACfSOoCBvpMoNPl4Zbcx/aLs86V
7wsAnRV0q6sHiPY94VasJTpGSJp371as
=MKVZ
-----END PGP SIGNATURE-----
Marek Lindner (4):
Staging: batman-adv: unify orig_hash_lock spinlock handling to avoid deadlocks
Staging: batman-adv: fix batman icmp originating from secondary interface
Staging: batman-adv: always reply batman icmp packets with primary mac
Staging: batman-adv: fix own mac address detection
Sven Eckelmann (4):
Staging: batman-adv: Fix merge of linus tree
Staging: batman-adv: Create batman_if only on register event
Staging: batman-adv: Don't use net_dev after dev_put
Staging: batman-adv: Don't write in not allocated packet_buff
-----------------------------------------------------------------------
--
linux integration
Author: marek
Date: 2010-08-29 02:02:14 +0200 (Sun, 29 Aug 2010)
New Revision: 1780
Modified:
trunk/batman-adv/hard-interface.c
Log:
batman-adv: Don't rely on NF_HOOKs return value
If a hook returns NF_STOLEN, neither batman_skb_recv nor
batman_skb_recv_finish free the skb due to the asynchronous netfilter
handling in the kernel. Therefore not batman_skb_recv but the ok
function batman_skb_recv_finish should do the freeing when a recv
subfunction returns NET_RX_DROP instead.
Reported-by: Vasiliy Kulikov <segooon(a)gmail.com>
Signed-off-by: Linus L?\195?\188ssing <linus.luessing(a)web.de>
Modified: trunk/batman-adv/hard-interface.c
===================================================================
--- trunk/batman-adv/hard-interface.c 2010-08-29 00:02:13 UTC (rev 1779)
+++ trunk/batman-adv/hard-interface.c 2010-08-29 00:02:14 UTC (rev 1780)
@@ -497,56 +497,27 @@
static int batman_skb_recv_finish(struct sk_buff *skb)
{
- return NF_ACCEPT;
-}
-
-/* receive a packet with the batman ethertype coming on a hard
- * interface */
-int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
- struct packet_type *ptype, struct net_device *orig_dev)
-{
- struct bat_priv *bat_priv;
struct batman_packet *batman_packet;
struct batman_if *batman_if;
+ struct bat_priv *bat_priv;
int ret;
- batman_if = container_of(ptype, struct batman_if, batman_adv_ptype);
- skb = skb_share_check(skb, GFP_ATOMIC);
-
- /* skb was released by skb_share_check() */
- if (!skb)
- goto err_out;
-
- /* if netfilter/ebtables wants to block incoming batman
- * packets then give them a chance to do so here */
- ret = NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, dev, NULL,
- batman_skb_recv_finish);
- if (ret != 1)
- goto err_out;
-
- /* packet should hold at least type and version */
- if (unlikely(!pskb_may_pull(skb, 2)))
+ batman_if = get_batman_if_by_netdev(skb->dev);
+ if (!batman_if)
goto err_free;
- /* expect a valid ethernet header here. */
- if (unlikely(skb->mac_len != sizeof(struct ethhdr)
- || !skb_mac_header(skb)))
+ if (!batman_if->soft_iface)
goto err_free;
- if (!batman_if->soft_iface)
+ /* discard frames on not active interfaces */
+ if (batman_if->if_status != IF_ACTIVE)
goto err_free;
bat_priv = netdev_priv(batman_if->soft_iface);
-
if (atomic_read(&bat_priv->mesh_state) != MESH_ACTIVE)
goto err_free;
- /* discard frames on not active interfaces */
- if (batman_if->if_status != IF_ACTIVE)
- goto err_free;
-
batman_packet = (struct batman_packet *)skb->data;
-
if (batman_packet->version != COMPAT_VERSION) {
bat_dbg(DBG_BATMAN, bat_priv,
"Drop packet: incompatible batman version (%i)\n",
@@ -592,18 +563,42 @@
}
if (ret == NET_RX_DROP)
- kfree_skb(skb);
+ goto err_free;
- /* return NET_RX_SUCCESS in any case as we
- * most probably dropped the packet for
- * routing-logical reasons. */
+ return 0;
- return NET_RX_SUCCESS;
+err_free:
+ kfree_skb(skb);
+ return 0;
+}
+/* receive a packet with the batman ethertype coming on a hard
+ * interface */
+int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
+ struct packet_type *ptype, struct net_device *orig_dev)
+{
+ skb = skb_share_check(skb, GFP_ATOMIC);
+
+ /* skb was released by skb_share_check() */
+ if (!skb)
+ return 0;
+
+ /* packet should hold at least type and version */
+ if (unlikely(!pskb_may_pull(skb, 2)))
+ goto err_free;
+
+ /* expect a valid ethernet header here. */
+ if (unlikely(skb->mac_len != sizeof(struct ethhdr) ||
+ !skb_mac_header(skb)))
+ goto err_free;
+
+ /* if netfilter/ebtables wants to block incoming batman
+ * packets then give them a chance to do so here */
+ return NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, dev,
+ NULL, batman_skb_recv_finish);
err_free:
kfree_skb(skb);
-err_out:
- return NET_RX_DROP;
+ return 0;
}
struct notifier_block hard_if_notifier = {
Author: marek
Date: 2010-08-29 02:02:13 +0200 (Sun, 29 Aug 2010)
New Revision: 1779
Modified:
trunk/batman-adv/bat_sysfs.c
trunk/batman-adv/hard-interface.c
trunk/batman-adv/soft-interface.c
Log:
batman-adv: Don't call unregister_netdev with locked rtnl semaphore
We currently try to call unregister_netdev when we can destroy a softif
after all corresponding hard-interfaces announced that they will be
removed.
This will be done when we receive a hard_if_event which already takes
the rtnl semaphore and thus we try to get it again in unregister_netdev.
This results in a deadlock. This call to unregister_netdev cannot easily
replaced by unregister_netdevice, because other parts of the batman-adv
module still call that code indirectly without holding the rtnl
semaphore.
(needs rtln_unlocked)
unregister_netdev
^
|
softif_destroy
^
|
hardif_disable_interface
^ ^
/ |
store_mesh_iface hardif_remove_interface
(rtln_unlocked) ^ ^
| \
hardif_remove_interfaces hard_if_event
^ (rtln_locked)
|
batman_exit
(rtln_unlocked)
A consistent workaround is to change store_mesh_iface and
hardif_remove_interfaces to call rtnl_lock before they call the
mentioned child function, release the semaphore afterwards and change
unregister_netdev in softif_destroy to unregister_netdevice.
Reported-by: Kazuki Shimada <zukky(a)bb.banban.jp>
Signed-off-by: Sven Eckelmann <sven.eckelmann(a)gmx.de>
Modified: trunk/batman-adv/bat_sysfs.c
===================================================================
--- trunk/batman-adv/bat_sysfs.c 2010-08-23 17:45:22 UTC (rev 1778)
+++ trunk/batman-adv/bat_sysfs.c 2010-08-29 00:02:13 UTC (rev 1779)
@@ -492,13 +492,18 @@
return count;
if (status_tmp == IF_NOT_IN_USE) {
+ rtnl_lock();
hardif_disable_interface(batman_if);
+ rtnl_unlock();
return count;
}
/* if the interface already is in use */
- if (batman_if->if_status != IF_NOT_IN_USE)
+ if (batman_if->if_status != IF_NOT_IN_USE) {
+ rtnl_lock();
hardif_disable_interface(batman_if);
+ rtnl_unlock();
+ }
return hardif_enable_interface(batman_if, buff);
}
Modified: trunk/batman-adv/hard-interface.c
===================================================================
--- trunk/batman-adv/hard-interface.c 2010-08-23 17:45:22 UTC (rev 1778)
+++ trunk/batman-adv/hard-interface.c 2010-08-29 00:02:13 UTC (rev 1779)
@@ -441,8 +441,11 @@
{
struct batman_if *batman_if, *batman_if_tmp;
- list_for_each_entry_safe(batman_if, batman_if_tmp, &if_list, list)
+ list_for_each_entry_safe(batman_if, batman_if_tmp, &if_list, list) {
+ rtnl_lock();
hardif_remove_interface(batman_if);
+ rtnl_unlock();
+ }
}
static int hard_if_event(struct notifier_block *this,
Modified: trunk/batman-adv/soft-interface.c
===================================================================
--- trunk/batman-adv/soft-interface.c 2010-08-23 17:45:22 UTC (rev 1778)
+++ trunk/batman-adv/soft-interface.c 2010-08-29 00:02:13 UTC (rev 1779)
@@ -351,7 +351,7 @@
debugfs_del_meshif(soft_iface);
sysfs_del_meshif(soft_iface);
mesh_free(soft_iface);
- unregister_netdev(soft_iface);
+ unregister_netdevice(soft_iface);
}
/* ethtool */
The annotated tag, v2.6.36-rc2 has been created
at 58d3707b8891f71d4891e6b36129eeacd3ba63f4 (tag)
tagging 76be97c1fc945db08aae1f1b746012662d643e97 (commit)
replaces v2.6.36-rc1
tagged by Linus Torvalds
on Sun Aug 22 17:45:36 2010 -0700
- Shortlog ------------------------------------------------------------
Linux 2.6.36-rc2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAkxxxL4ACgkQF3YsRnbiHLtdAACfX4fbXLdqw7VCtMEfkJhPsxg2
QjUAnjXacm+jqBMiIYgmLqY8LLNlN1W/
=moxk
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
Author: simon
Date: 2010-08-22 20:46:27 +0200 (Sun, 22 Aug 2010)
New Revision: 1777
Modified:
trunk/batman-adv/soft-interface.c
Log:
batman-adv: Count Ethernet header for incoming packets
The Ethernet header is counted when transmitting a packet, so it should also
be counted when receiving a packet. With this patch, the rx_bytes and tx_bytes
statistics behave like an ordinary Ethernet interface.
Signed-off-by: Simon Wunderlich <siwu(a)hrz.tu-chemnitz.de>
Modified: trunk/batman-adv/soft-interface.c
===================================================================
--- trunk/batman-adv/soft-interface.c 2010-08-20 20:42:22 UTC (rev 1776)
+++ trunk/batman-adv/soft-interface.c 2010-08-22 18:46:27 UTC (rev 1777)
@@ -222,7 +222,7 @@
* PACKET_OTHERHOST or PACKET_HOST */
priv->stats.rx_packets++;
- priv->stats.rx_bytes += skb->len;
+ priv->stats.rx_bytes += skb->len + sizeof(struct ethhdr);
soft_iface->last_rx = jiffies;
The tag, GregKH-20100821 has been created
at 7fb26b6de8848c84a8064941e2cd3287a616b2fb (commit)
- Shortlog ------------------------------------------------------------
commit 7fb26b6de8848c84a8064941e2cd3287a616b2fb
Merge: e2ce755 e3a0cc9
Author: Sven Eckelmann <sven.eckelmann(a)gmx.de>
Date: Sat Aug 21 13:34:27 2010 +0200
Merge remote branch 'origin/next' into linux
-----------------------------------------------------------------------
--
linux integration
Author: marek
Date: 2010-08-20 21:16:14 +0200 (Fri, 20 Aug 2010)
New Revision: 1775
Modified:
trunk/batman-adv/hard-interface.c
Log:
batman-adv: Update mtu of bat device by changing mtu of slave device
We must reduce our own mtu when we reduce the mtu of any device we use
to transfer our packets. Otherwise we may accept to large packets which
gets dropped by the actual device.
Reported-by: Vasiliy Kulikov <segooon(a)gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann(a)gmx.de>
Modified: trunk/batman-adv/hard-interface.c
===================================================================
--- trunk/batman-adv/hard-interface.c 2010-08-20 19:16:11 UTC (rev 1774)
+++ trunk/batman-adv/hard-interface.c 2010-08-20 19:16:14 UTC (rev 1775)
@@ -469,6 +469,10 @@
case NETDEV_UNREGISTER:
hardif_remove_interface(batman_if);
break;
+ case NETDEV_CHANGEMTU:
+ if (batman_if->soft_iface)
+ update_min_mtu(batman_if->soft_iface);
+ break;
case NETDEV_CHANGEADDR:
if (batman_if->if_status == IF_NOT_IN_USE)
goto out;