From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423691AbcFMWxX (ORCPT ); Mon, 13 Jun 2016 18:53:23 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:45573 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423458AbcFMWxQ (ORCPT ); Mon, 13 Jun 2016 18:53:16 -0400 Message-ID: <1465858386.3529.225.camel@decadent.org.uk> Subject: Re: [PATCH 3.16 046/114] batman-adv: Fix broadcast/ogm queue limit on a removed interface From: Ben Hutchings To: Sven Eckelmann Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, akpm@linux-foundation.org, Marek Lindner , Linus =?ISO-8859-1?Q?L=FCssing?= , Antonio Quartulli Date: Mon, 13 Jun 2016 23:53:06 +0100 In-Reply-To: <4657746.cKVj6RgzQ6@sven-edge> References: <4657746.cKVj6RgzQ6@sven-edge> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-sOQL+722rsu/1So14Jhz" X-Mailer: Evolution 3.20.2-2 Mime-Version: 1.0 X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-sOQL+722rsu/1So14Jhz Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2016-06-13 at 21:33 +0200, Sven Eckelmann wrote: > Hi, >=20 > looks like the patch is broken (at least it does something different than= the=C2=A0 > non-stable patch does). >=20 > On Monday 13 June 2016 19:36:37 Ben Hutchings wrote: > > 3.16.36-rc1 review patch.=C2=A0=C2=A0If anyone has any objections, plea= se let me know. > [...] > > --- a/net/batman-adv/send.c > > +++ b/net/batman-adv/send.c > > @@ -638,6 +638,12 @@ batadv_purge_outstanding_packets(struct > >=20 > > =C2=A0 if (pending) { > > =C2=A0 hlist_del(&forw_packet->list); > > + if (!forw_packet->own) > > + atomic_inc(&bat_priv->bcast_queue_left); > > + > > + if (!forw_packet->own) > > + atomic_inc(&bat_priv->batman_queue_left); > > + > > =C2=A0 batadv_forw_packet_free(forw_packet); > > =C2=A0 } > > =C2=A0 } >=20 > It seems to be a problem with the way GNU patch solved the conflicts with= the=C2=A0 > slightly different orig file (moved the hunks together when it shouldn't= =C2=A0 > have). GregKH also had this problem [1] Yes, I recognise this bug. I've updated this patch to the version below. Ben. --- batman-adv: Fix broadcast/ogm queue limit on a removed interface commit c4fdb6cff2aa0ae740c5f19b6f745cbbe786d42f upstream. When removing a single interface while a broadcast or ogm packet is still pending then we will free the forward packet without releasing the queue slots again. This patch is supposed to fix this issue. Fixes: 6d5808d4ae1b ("batman-adv: Add missing hardif_free_ref in forw_packe= t_free") Signed-off-by: Linus L=C3=BCssing [sven@narfation.org: fix conflicts with current version] Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli Signed-off-by: Ben Hutchings --- net/batman-adv/send.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/net/batman-adv/send.c +++ b/net/batman-adv/send.c @@ -611,6 +611,9 @@ batadv_purge_outstanding_packets(struct =20 if (pending) { hlist_del(&forw_packet->list); + if (!forw_packet->own) + atomic_inc(&bat_priv->bcast_queue_left); + batadv_forw_packet_free(forw_packet); } } @@ -638,6 +641,9 @@ batadv_purge_outstanding_packets(struct =20 if (pending) { hlist_del(&forw_packet->list); + if (!forw_packet->own) + atomic_inc(&bat_priv->batman_queue_left); + batadv_forw_packet_free(forw_packet); } } --=C2=A0 Ben Hutchings One of the nice things about standards is that there are so many of them. --=-sOQL+722rsu/1So14Jhz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCgAGBQJXXzlSAAoJEOe/yOyVhhEJJPsQALOHuY6vtnvyNapcMmVyeinZ PzRd157p5mBd66JvH7Tg4fnlJ0lk0/134wT/viwNDgidmfYVcPemZ56dxhVLRIXS WopnFvxTh42SGBZ3Z5V4QWpJvJt+W0cZC+jcQa2or+iFMT/w5fpWWMgHhS7D6yUe rnFGx97GOBzohQn37M4HOHLDq8Szo4626QwvIe4seGgemu1AneAkbcn9Ni9ge0RT XbPfLG3GhzOnpuJDSPLI0mg5kIDyF0ffOhcy7jaooxJwsr60TwG4edVDNqfOjd15 S0ZOf9XGs7EmKiEb23XBdbjvlsTuQy+G9JUou3s4bVBtgaHRyvMWTgSJKZQ3N6Sz jQmuPCsI9b3v1FZt2Ma0IQnGFlZctxEo57HaTzzpdrcumQcVkMwMcQTi+JJGsySl xq2A6wl2BCFkPtbZfDqYg9oTgeWsSvp0pU2rcRz4W4cJC++wtjMigiwavFwm9xZx wPBRQpH4SHS5w8KVziaHGUUexE+SGpX7Z0AV+gF2JRoBYmwsGwXM9U3QhtU5q8CO yqyMMDM0bXdGOWbJEcOBj37g8c1nMEO2YjrIeFYpEhTz95MZMkA5Onfl1U43swdw YG0+2ozeRtdS//J9j3fVaEMI6QXXhJS4BRO7GFGcOyeuo4vngiqRgwmM01Y0N97y /HePk7rH6p5b0wYumR9X =B5kj -----END PGP SIGNATURE----- --=-sOQL+722rsu/1So14Jhz--