The following commit has been merged in the merge/master branch:
commit 6219a1b400d38fbdce22ba252e68bc883b32c73c
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Tue Jan 5 12:06:17 2016 +0100
batman-adv: Fix list removal of batadv_hardif_neigh_node
The neigh_list with batadv_hardif_neigh_node objects is accessed with only
rcu_read_lock in batadv_hardif_neigh_get and batadv_iv_neigh_print. Thus it
is not allowed to kfree the object before the rcu grace period …
[View More]ends (which
may still protects context accessing this object). Therefore the object has
first to be removed from the neigh_list and then it has either wait with
synchronize_rcu or call_rcu till the grace period ends before it can be
freed.
Fixes: fed2826b490c ("batman-adv: add list of unique single hop neighbors per hard-interface")
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
Signed-off-by: Marek Lindner <mareklindner(a)neomailbox.ch>
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index 00b0437..2681c7d 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -217,10 +217,6 @@ static void batadv_hardif_neigh_free_rcu(struct rcu_head *rcu)
hardif_neigh = container_of(rcu, struct batadv_hardif_neigh_node, rcu);
- spin_lock_bh(&hardif_neigh->if_incoming->neigh_list_lock);
- hlist_del_init_rcu(&hardif_neigh->list);
- spin_unlock_bh(&hardif_neigh->if_incoming->neigh_list_lock);
-
batadv_hardif_free_ref_now(hardif_neigh->if_incoming);
kfree(hardif_neigh);
}
@@ -233,8 +229,13 @@ static void batadv_hardif_neigh_free_rcu(struct rcu_head *rcu)
static void
batadv_hardif_neigh_free_now(struct batadv_hardif_neigh_node *hardif_neigh)
{
- if (atomic_dec_and_test(&hardif_neigh->refcount))
+ if (atomic_dec_and_test(&hardif_neigh->refcount)) {
+ spin_lock_bh(&hardif_neigh->if_incoming->neigh_list_lock);
+ hlist_del_init_rcu(&hardif_neigh->list);
+ spin_unlock_bh(&hardif_neigh->if_incoming->neigh_list_lock);
+
batadv_hardif_neigh_free_rcu(&hardif_neigh->rcu);
+ }
}
/**
@@ -244,8 +245,13 @@ batadv_hardif_neigh_free_now(struct batadv_hardif_neigh_node *hardif_neigh)
*/
void batadv_hardif_neigh_free_ref(struct batadv_hardif_neigh_node *hardif_neigh)
{
- if (atomic_dec_and_test(&hardif_neigh->refcount))
+ if (atomic_dec_and_test(&hardif_neigh->refcount)) {
+ spin_lock_bh(&hardif_neigh->if_incoming->neigh_list_lock);
+ hlist_del_init_rcu(&hardif_neigh->list);
+ spin_unlock_bh(&hardif_neigh->if_incoming->neigh_list_lock);
+
call_rcu(&hardif_neigh->rcu, batadv_hardif_neigh_free_rcu);
+ }
}
/**
--
[View Less]
The annotated tag, batman-adv-for-davem has been deleted
was 2eaa668bfb4753583725ed50e9336a040ac0aac7
-----------------------------------------------------------------------
tag batman-adv-for-davem
Included changes:
- increase internal module version
- increase BLA wait periods to 6
- purge BLA backbone table when it is disabled
- make sure post function is invoked only if sysfs value is changed
- simplify code by removing useless NULL checks
- various corrections to existing …
[View More]kerneldoc
- minor cleanups
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJWkQVBAAoJENpFlCjNi1MRpPwP/2VrRpogpVsqTqLmidvmMqOQ
r7MOy3/W5hqXF6Iq9omVZ0jagdDzta35/QZCab8tE1YFQhW+4jIIMUNApXSJZ+Yc
dopXpLQNN/QSGFrQJFN897aYnXz+ABt834VyOhtLzktxYRBEdI4yKBoj3l39vXjL
d+O9MGfJkxos1cHr+ueGohr36Fk3+dnAQFVEYf5dq/G3HwRqVRdzR8ITiMPy8zCX
gRVFbzpg37r6nvYY93jW5VLGGFkmzuUG4SMzkQqQEp7eaUrIgrcukKF4oQahSfC9
C0wwg8SqwX56lh9fdo1n3MkuiwYDaW7wt4QRIgpiolWhebNJqBa8ExPZgfxl9QwF
WjkRUnGV65qY6M4AGENzIJ7JGESx66k95OnUGDpF9ZmBRWi2t/4gcwpwCjemka0A
MZ+lDgB060ksIVcsbXnGY2TOpiMRjo1nMinixFb3HueUA9mpr5edDwJpnFy5FvhN
lv2csEazQacmUj8KzM/5GXAvS0a8iABPSknwKOaTWX3SglGBc/H4mKYcggeD8XPG
9zfFgOyi2dW6S5d5qxHLNwVyw6O0rkfOj2BxE3Ew/FHGb5/00hVJVeqhXVxFBb6s
EOlZz8LrxA4DIxItFDHhiUzddqqsiTqbp7Q9JmtpEn11YZ/tQ3kTK5ilWdgkM8Vj
4z9wQN55BTrhYcTgsCp7
=eJvF
-----END PGP SIGNATURE-----
ed21d170e878b6b067a3216040b7b935c8007196 batman-adv: Add kerneldoc for batadv_neigh_node::refcount
-----------------------------------------------------------------------
--
[View Less]
The annotated tag, batman-adv-for-davem has been updated
to 2eaa668bfb4753583725ed50e9336a040ac0aac7 (tag)
from 7e387017bd46e520156d5c1b350b1c431874418b (which is now obsolete)
tagging ed21d170e878b6b067a3216040b7b935c8007196 (commit)
replaces v4.4-rc8
tagged by Antonio Quartulli
on Sat Jan 9 20:58:11 2016 +0800
- Shortlog ------------------------------------------------------------
Included changes:
- increase internal module version
- increase BLA wait …
[View More]periods to 6
- purge BLA backbone table when it is disabled
- make sure post function is invoked only if sysfs value is changed
- simplify code by removing useless NULL checks
- various corrections to existing kerneldoc
- minor cleanups
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJWkQVBAAoJENpFlCjNi1MRpPwP/2VrRpogpVsqTqLmidvmMqOQ
r7MOy3/W5hqXF6Iq9omVZ0jagdDzta35/QZCab8tE1YFQhW+4jIIMUNApXSJZ+Yc
dopXpLQNN/QSGFrQJFN897aYnXz+ABt834VyOhtLzktxYRBEdI4yKBoj3l39vXjL
d+O9MGfJkxos1cHr+ueGohr36Fk3+dnAQFVEYf5dq/G3HwRqVRdzR8ITiMPy8zCX
gRVFbzpg37r6nvYY93jW5VLGGFkmzuUG4SMzkQqQEp7eaUrIgrcukKF4oQahSfC9
C0wwg8SqwX56lh9fdo1n3MkuiwYDaW7wt4QRIgpiolWhebNJqBa8ExPZgfxl9QwF
WjkRUnGV65qY6M4AGENzIJ7JGESx66k95OnUGDpF9ZmBRWi2t/4gcwpwCjemka0A
MZ+lDgB060ksIVcsbXnGY2TOpiMRjo1nMinixFb3HueUA9mpr5edDwJpnFy5FvhN
lv2csEazQacmUj8KzM/5GXAvS0a8iABPSknwKOaTWX3SglGBc/H4mKYcggeD8XPG
9zfFgOyi2dW6S5d5qxHLNwVyw6O0rkfOj2BxE3Ew/FHGb5/00hVJVeqhXVxFBb6s
EOlZz8LrxA4DIxItFDHhiUzddqqsiTqbp7Q9JmtpEn11YZ/tQ3kTK5ilWdgkM8Vj
4z9wQN55BTrhYcTgsCp7
=eJvF
-----END PGP SIGNATURE-----
Andrew Lunn (1):
batman-adv: Act on NETDEV_*_TYPE_CHANGE events
David S. Miller (1):
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Jiri Pirko (2):
net: propagate upper priv via netdev_master_upper_dev_link
net: add possibility to pass information about upper device via notifier
Marek Lindner (5):
batman-adv: add list of unique single hop neighbors per hard-interface
batman-adv: add bat_hardif_neigh_init algo ops call
batman-adv: export single hop neighbor list via debugfs
batman-adv: update last seen field of single hop originators
batman-adv: remove leftovers of unused BATADV_PRIMARIES_FIRST_HOP flag
Markus Elfring (4):
batman-adv: Delete unnecessary checks before the function call "kfree_skb"
batman-adv: Less checks in batadv_tvlv_unicast_send()
batman-adv: Delete an unnecessary check before the function call "batadv_softif_vlan_free_ref"
batman-adv: Split a condition check
Simon Wunderlich (8):
batman-adv: rename equiv/equal or better to similar or better
batman-adv: detect local excess vlans in TT request
batman-adv: unify flags access style in tt global add
batman-adv: lock crc access in bridge loop avoidance
batman-adv: Start new development cycle
batman-adv: purge bridge loop avoidance when its disabled
batman-adv: increase BLA wait periods to 6
batman-adv: only call post function if something changed
Sven Eckelmann (8):
batman-adv: Use chain pointer when purging fragments
batman-adv: Fix typo 'wether' -> 'whether'
batman-adv: Fix lockdep annotation of batadv_tlv_container_remove
batman-adv: Add function to convert string to batadv throughput
batman-adv: Fix kernel-doc parsing of main structs
batman-adv: Fix kerneldoc member names in for main structs
batman-adv: Remove kerneldoc for missing struct members
batman-adv: Add kerneldoc for batadv_neigh_node::refcount
-----------------------------------------------------------------------
--
[View Less]
The annotated tag, batman-adv-for-davem has been created
at 7e387017bd46e520156d5c1b350b1c431874418b (tag)
tagging 672a53a728aec61ebffb107ec281a08fcf46d04c (commit)
replaces v4.4-rc8
tagged by Antonio Quartulli
on Sat Jan 9 20:51:42 2016 +0800
- Shortlog ------------------------------------------------------------
Included changes:
- extension of kerneldoc in different parts of the module
- various corrections to existing kerneldoc
- change ifconfig examples to …
[View More]iproute2 in documentation
- minor cleanups
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJWkQK+AAoJENpFlCjNi1MRLxAP/1ZfFsS9luO975uAO8DJNa0C
8xiCi8YZsS2rZvkmJgO/Dstt6+eQGAXqjxA+ace+MwFSAqzH8emi2WjUyc82/p8V
970UJNPexb4YgHDKNZQnjEHM0rhVOI8rMBzQLIgxQNTESSEUloYU5xYydoJYrNV8
cavWcii9T1brV7d7mw4w7hPFCBPltgcRqNl1DlONjTUMCVPIuWo4KUK/cMnjiDaM
LNYvP6d/Dk0QpBBdCIublSdoHQHGS6rK+kSoNZO3Dc4TtJACj87JEXyq3ohEuBj+
AZVnc1lXxpxRhHEY6AnEif1qIFPrp6XVYQITEUGXqBKk3Pe8QKXxAbqaERkIQQRD
hfWm/cUh8U/cu7g5UmdivcBQYQQ4L85ucK2C7RLYdmNPLnLWxkDTwIbR5uMFkQQX
C3fhZ9EK5+QEN1seD/tF6lRVsF/nyVZNL6Ek083qL6dQwzv+Wl93xK7JiJB1cge/
m7X77LQuCPYq4AS/EmP2ffGMlji+JkXnsRBafbuHqk1BINb1MSntyT9JJ+YEdekf
jlc3aQyQx0fw9olwzLsTNekSI6cAThhCfLtug2/9wCdqTPRgJMe39v5x3PZsJVPQ
c6DDYVoJjpZCEHlmZhmOF5BrXpZcxWOtf+mOcINlGD4WLuh8ef8QLbR1eKcMY26E
Bl1KuTAl0vv6d7Ym2Z55
=1Dpu
-----END PGP SIGNATURE-----
Andrew Lunn (1):
batman-adv: Act on NETDEV_*_TYPE_CHANGE events
Antonio Quartulli (3):
batman-adv: fix kerneldoc for DAT functions
batman-adv: fix kerneldoc for TT functions
batman-adv: add kernel doc for AP isolation attributes in bat_priv
David S. Miller (1):
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Jiri Pirko (2):
net: propagate upper priv via netdev_master_upper_dev_link
net: add possibility to pass information about upper device via notifier
Marek Lindner (6):
batman-adv: add list of unique single hop neighbors per hard-interface
batman-adv: add bat_hardif_neigh_init algo ops call
batman-adv: export single hop neighbor list via debugfs
batman-adv: update last seen field of single hop originators
batman-adv: remove leftovers of unused BATADV_PRIMARIES_FIRST_HOP flag
batman-adv: kernel doc readability updates
Simon Wunderlich (5):
batman-adv: rename equiv/equal or better to similar or better
batman-adv: detect local excess vlans in TT request
batman-adv: unify flags access style in tt global add
batman-adv: lock crc access in bridge loop avoidance
batman-adv: Update/repair bridge loop avoidance kerneldoc
Sven Eckelmann (16):
batman-adv: Use chain pointer when purging fragments
batman-adv: Fix typo 'wether' -> 'whether'
batman-adv: Fix kernel-doc parsing of main structs
batman-adv: Fix kerneldoc member names in for main structs
batman-adv: Remove kerneldoc for missing struct members
batman-adv: Add kerneldoc for batadv_neigh_node::refcount
batman-adv: Fix kerneldoc parsing of structs/enums
batman-adv: Remove kerneldoc for missing parameters
batman-adv: Fix names in kerneldoc of functions
batman-adv: Drop invalid kerneldoc for variable batadv_vlan_attrs
batman-adv: Place constant on right side of comparison
batman-adv: Fix kerneldoc parsing of return description
batman-adv: Fix kerneldoc of main functions
batman-adv: Fix kerneldoc of network-coding functions
batman-adv: Add function to convert string to batadv throughput
batman-adv: Fix lockdep annotation of batadv_tlv_container_remove
-----------------------------------------------------------------------
--
[View Less]
The annotated tag, batman-adv-for-davem has been deleted
was fa9054f3d84268a1353e2aa5f2b0632c7d6aa481
-----------------------------------------------------------------------
tag batman-adv-for-davem
Included changes:
- change my email in MAINTAINERS and Doc files
- create and export list of single hop neighs per interface
- protect CRC in the BLA code by means of its own lock
- minor fixes and code cleanups
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
…
[View More]iQIcBAABCAAGBQJWcRAcAAoJENpFlCjNi1MRxPQP/A8wAuHYUyMDu6ov5VRUR+24
TYKgCVI1evuYlkOdgHkTQfTlOILgV2NHvORzKwQRNToyvtsd4VIeXZfFJ0UXB0Wo
sMz9vrmmcndGkcYPWs+6IoVUbxMPZXjRGhme3Ig7nNTOQ4GvcSaQANbYWAMBfg61
h6pxez67el9jzso2acHEgvOyaldOLDcbbdwt4vY7bPRgD9VXpE3nazBymaZXLLxs
1ByXiCgJw32gXSWv8RQ/j13btjrbWCdmcEz9Ag1xO5i5u9BI1VJ8nmbLuNu63S0G
Ftgvk5QBeMAxs3xDiTmtQD3bmiS87Jy+1d5rFb581/arM5SnYq6GZIrb81tdVTU6
PMkMZ6/EUV2HSogq9PJ1ZDk/0oPYT5tqfLtJWcaAZplmWYt3ZUrQsPo4z5CtbBhU
6Ar29G5slkgLslcBqn6YB00LxwOmj7elyVdPtL+wMCojtut+Ds4O+FzPdvd/145F
hCtIe55b2ciBsfp1dDXP5P15HeEMjLiN2xWJKAPLhDCmGruJ6Pnly+ElzgV+zdKL
7Qe1mOXwticMy3pH+ST7CP47tp5uyT0ak27eo+oOn4LI/ppM2qW1P9bNUZ6RrVwf
dRRh0dzQruaLQauHK2Z6BWtA2Q36wY2anwmBONK34NH6VfRMB1GJMi3JF8gDgTds
SWwU5FGWTn/cnCejtsbh
=/Z+R
-----END PGP SIGNATURE-----
5a1dd8a4773d4c24e925cc6154826d555a85c370 batman-adv: lock crc access in bridge loop avoidance
-----------------------------------------------------------------------
--
[View Less]
The following commit has been merged in the merge/master branch:
commit d443dc86188ab38100f5d4220ffaef1efbcb7377
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sun Nov 29 01:48:57 2015 +0100
batman-adv: Fix invalid read while copying bat_iv.bcast_own
batadv_iv_ogm_orig_del_if removes a part of the bcast_own which previously
belonged to the now removed interface. This is done by copying all data
which comes before the removed interface and then appending all …
[View More]the data
which comes after the removed interface.
The address calculation for the position of the data which comes after the
removed interface assumed that the bat_iv.bcast_own is a pointer to a
single byte datatype. But it is a pointer to unsigned long and thus the
calculated position was wrong off factor sizeof(unsigned long).
Fixes: 83a8342678a0 ("more basic routing code added (forwarding packets /
bitarray added)")
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
Signed-off-by: Marek Lindner <mareklindner(a)neomailbox.ch>
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index ad678f0..a6d389b 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -185,7 +185,8 @@ unlock:
static int batadv_iv_ogm_orig_del_if(struct batadv_orig_node *orig_node,
int max_if_num, int del_if_num)
{
- int chunk_size, ret = -ENOMEM, if_offset;
+ int ret = -ENOMEM;
+ size_t chunk_size, if_offset;
void *data_ptr = NULL;
spin_lock_bh(&orig_node->bat_iv.ogm_cnt_lock);
@@ -203,8 +204,9 @@ static int batadv_iv_ogm_orig_del_if(struct batadv_orig_node *orig_node,
memcpy(data_ptr, orig_node->bat_iv.bcast_own, del_if_num * chunk_size);
/* copy second part */
+ if_offset = (del_if_num + 1) * chunk_size;
memcpy((char *)data_ptr + del_if_num * chunk_size,
- orig_node->bat_iv.bcast_own + ((del_if_num + 1) * chunk_size),
+ (uint8_t *)orig_node->bat_iv.bcast_own + if_offset,
(max_if_num - del_if_num) * chunk_size);
free_bcast_own:
--
[View Less]
The annotated tag, batman-adv-fix-for-davem has been deleted
was 0682d4c340b8ea98b8f292254d3a90eb1c10515e
-----------------------------------------------------------------------
tag batman-adv-fix-for-davem
Included changes:
- prevent compatibility issue between DAT and speedy join from creating
inconsistencies in the global translation table
- make sure temporary TT entries are purged out if not claimed
- fix comparison function used for TT hash table
- fix invalid stack access in …
[View More]batadv_dat_select_candidates()
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJWZZqMAAoJENpFlCjNi1MRPg4P/Rq04JLU51tzIYnC7dmkcKjY
L0qFTF4C4FjRzyeDH7d7GwfDJAu/AN/sCw/N0UzkBQ8qlGmtM5pkyTglr12w2axT
V2LalU8nR+VIqL/DvCmMAPthwRsXfAXAkwiKEPCbKp9GHOKuVF9uIC+UQP0V0HQE
6qKVii1j/IhVJWa30LrP8Uk/W4Ji55oB/oGBH4ggbWf0YWnaSldldfGGjtEY0JVd
dfcOyTCYX3NiGs9QB5HRz2NDhc0t1u0CWTTaM1n5w7l2ejlUH6JYwqOfAr5Q5STt
C265KonUeZCfq/ktzcEZ9c0NWHy8OePHA2anO1e5zPV/TwXNsSb50AnAHslaA7Fd
vgZ3svTjhxowU20P21gMYOJGlUpmjMx+klBEcd0rAKEZHjcq2IFLS4LA6I8en8o4
XtcJLj1Rrk/4XV9BntOlLVIfrA8TKH7B/vjAkbLa45WbH74B1V1sODmGxIv4mUVs
Vhe5lTyPktKFhducU0g4jDIg+Up07JIrMKs9/9TXWXuXf4tH255yg42dYSCOoqQD
4haKbUqQN90KvR1/cKGtkwpq0BlZq75RW4+SFtsUUZbdZyZNGx2zgR8g5e1owdN2
1I4c2XAsTbJMEaB86hsNWv/goy0H57dn4SNwi34BJr6OADfcorr2qGd4LRrTDUaL
hpwirVIN0SiaEz9krwDW
=tH3+
-----END PGP SIGNATURE-----
b7fe3d4f4a65bc675e737d88071300ea9c4bcddd batman-adv: Fix invalid stack access in batadv_dat_select_candidates
-----------------------------------------------------------------------
--
[View Less]
The following commit has been merged in the merge/master branch:
commit bbcbe0f900de7b0951eb02a783017868054a13fd
Author: Markus Elfring <elfring(a)users.sourceforge.net>
Date: Tue Nov 3 19:20:34 2015 +0100
batman-adv: Delete an unnecessary check before the function call "batadv_softif_vlan_free_ref"
The batadv_softif_vlan_free_ref() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.
This issue …
[View More]was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring(a)users.sourceforge.net>
Signed-off-by: Marek Lindner <mareklindner(a)neomailbox.ch>
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index 9114dad..42c9747 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -3382,8 +3382,7 @@ bool batadv_is_ap_isolated(struct batadv_priv *bat_priv, u8 *src, u8 *dst,
ret = true;
out:
- if (vlan)
- batadv_softif_vlan_free_ref(vlan);
+ batadv_softif_vlan_free_ref(vlan);
if (tt_global_entry)
batadv_tt_global_entry_free_ref(tt_global_entry);
if (tt_local_entry)
--
[View Less]