2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 06:34:11 +08:00

Included change:

- Fix invalid read while copying bat_iv.bcast_own by Sven Eckelmann
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJWjg79AAoJENpFlCjNi1MRS0gQAKFQ2K3fgNigYKCO+PDBy1QG
 19U3h0VedojubLt0EOJ+B/tuuj5uNjt+dG8FICUwFQblXhPRNX485Pd2/zuGyhva
 E1sh3bMqZZVc3u978n8j5iASxM83CLica1MJjFs9j01F0Yq7bmkaO3bNVy7pYWlv
 sZI1gS3u40JnkuoXer8m6w0wsvhNf96H20bmVuLGmaZE0IsPxwIX07hW72xozs/T
 x2lhUwgbmH4uJtE/On2+r7hW++wTaOkGptFBb8XgKnyO5uZ55uw6+zHMSZ26Y5b7
 vki3Ak+ujiS0BeQAamfPxJRNLdnNVdjW6Vtn1BZlbNnSZvFNnwEQoahOxVq4s2w2
 aHSjHalznbQsobn94JcvGJ6RCuMdw2FoQH4d8Vco9CECTczPqWDibddrphUhljPU
 fhvGz20LM+1coOorKWjx9OwCeoHfezOsm2m2vuRFP9haFktyUqtM/2X2FN864rCa
 SuFuJn3PIrhfXtw0HTgFixbLTBj3L2mUfJ/IuPmW6HsESoQoTgtKjGpVfmFEA35C
 pb08imApYnx3GQlwXk+xmQOeZQozx3RRpKASe/OwCn57RtlPXMyFnUU667sdEgcA
 T2REpBSZK7yl/nCQlWm/tOmUJUXXOV4l1MotV0zwRvdrQ+dqcQ99zdGczl7D4Zxi
 +xzRCYs2JL2eeSL94C3Y
 =+d6F
 -----END PGP SIGNATURE-----

Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge

Antonio Quartulli says:

====================
Included change:
- Fix invalid read while copying bat_iv.bcast_own by Sven Eckelmann
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2016-01-08 21:46:04 -05:00
commit b1c1f23ef0

View File

@ -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: