diff options
-rw-r--r-- | genetlink-fix-counting-regression-on-ctrl_dumpfamily.patch | 55 | ||||
-rw-r--r-- | kernel.spec | 46 |
2 files changed, 58 insertions, 43 deletions
diff --git a/genetlink-fix-counting-regression-on-ctrl_dumpfamily.patch b/genetlink-fix-counting-regression-on-ctrl_dumpfamily.patch new file mode 100644 index 000000000..ab048d1c9 --- /dev/null +++ b/genetlink-fix-counting-regression-on-ctrl_dumpfamily.patch @@ -0,0 +1,55 @@ +From: Stanislaw Gruszka <sgruszka@redhat.com> +Date: 2017-03-22 15:08:33 +Subject: [PATCH 4.11] genetlink: fix counting regression on ctrl_dumpfamily() + +Commit 2ae0f17df1cd ("genetlink: use idr to track families") replaced + + if (++n < fams_to_skip) + continue; +into: + + if (n++ < fams_to_skip) + continue; + +This subtle change cause that on retry ctrl_dumpfamily() call we omit +one family that failed to do ctrl_fill_info() on previous call, because +cb->args[0] = n number counts also family that failed to do +ctrl_fill_info(). + +Patch fixes the problem and avoid confusion in the future just decrease +n counter when ctrl_fill_info() fail. + +User visible problem caused by this bug is failure to get access to +some genetlink family i.e. nl80211. However problem is reproducible +only if number of registered genetlink families is big enough to +cause second call of ctrl_dumpfamily(). + +Cc: Xose Vazquez Perez <xose.vazquez@gmail.com> +Cc: Larry Finger <Larry.Finger@lwfinger.net> +Cc: Johannes Berg <johannes@sipsolutions.net> +Fixes: 2ae0f17df1cd ("genetlink: use idr to track families") +Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> +--- +Dave, please also target this for 4.10+ -stable. + + net/netlink/genetlink.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c +index fb6e10f..92e0981 100644 +--- a/net/netlink/genetlink.c ++++ b/net/netlink/genetlink.c +@@ -783,8 +783,10 @@ static int ctrl_dumpfamily(struct sk_buff *skb, struct netlink_callback *cb) + + if (ctrl_fill_info(rt, NETLINK_CB(cb->skb).portid, + cb->nlh->nlmsg_seq, NLM_F_MULTI, +- skb, CTRL_CMD_NEWFAMILY) < 0) ++ skb, CTRL_CMD_NEWFAMILY) < 0) { ++ n--; + break; ++ } + } + + cb->args[0] = n; +-- +1.7.1 diff --git a/kernel.spec b/kernel.spec index 31d64193d..ca8986516 100644 --- a/kernel.spec +++ b/kernel.spec @@ -2313,59 +2313,19 @@ fi * Mon Apr 03 2017 Laura Abbott <labbott@fedoraproject.org> - 4.11.0-0.rc5.git0.1 - Linux v4.11-rc5 - Disable 64K pages on aarch64 - -* Mon Apr 03 2017 Laura Abbott <labbott@fedoraproject.org> -- Disable debugging options. - -* Sun Apr 2 2017 Peter Robinson <pbrobinson@fedoraproject.org> -- Enable STi DRM driver - -* Thu Mar 30 2017 Laura Abbott <labbott@fedoraproject.org> - 4.11.0-0.rc4.git3.1 -- Linux v4.11-rc4-64-g89970a0 - -* Wed Mar 29 2017 Dan Horák <dan@danny.cz> - Enable THP on Power (rhbz 1434007) - -* Wed Mar 29 2017 Laura Abbott <labbott@fedoraproject.org> - 4.11.0-0.rc4.git2.1 -- Linux v4.11-rc4-40-gfe82203 - -* Tue Mar 28 2017 Laura Abbott <labbott@fedoraproject.org> - 4.11.0-0.rc4.git1.1 -- Linux v4.11-rc4-18-gad0376e - -* Tue Mar 28 2017 Laura Abbott <labbott@fedoraproject.org> -- Reenable debugging options. - -* Mon Mar 27 2017 Justin M. Forbes <jforbes@fedoraproject.org> -- CVE-2017-7261 vmwgfx: check that number of mip levels is above zero (rhbz 1435719 1435740) +- Enable STi DRM driver * Mon Mar 27 2017 Laura Abbott <labbott@fedoraproject.org> - 4.11.0-0.rc4.git0.1 - Linux v4.11-rc4 - -* Mon Mar 27 2017 Laura Abbott <labbott@fedoraproject.org> -- Disable debugging options. - -* Sun Mar 26 2017 Peter Robinson <pbrobinson@fedoraproject.org> +- CVE-2017-7261 vmwgfx: check that number of mip levels is above zero (rhbz 1435719 1435740) - Fix null pointer dereference in bcm2835 MMC driver - Minor ARM updates -* Fri Mar 24 2017 Laura Abbott <labbott@fedoraproject.org> - 4.11.0-0.rc3.git2.1 -- Linux v4.11-rc3-161-gebe6482 - -* Thu Mar 23 2017 Justin M. Forbes <jforbes@fedoraproject.org> +* Thu Mar 23 2017 Justin M. Forbes <jforbes@fedoraproject.org> 4.11.0-0.rc3.git0.2 - Fix virtio devices (rhbz 1430297) - -* Wed Mar 22 2017 Justin M. Forbes <jforbes@fedoraproject.org> - Fix crda (rhbz 1422247) -* Wed Mar 22 2017 Laura Abbott <labbott@fedoraproject.org> - 4.11.0-0.rc3.git1.1 -- Linux v4.11-rc3-35-g093b995 - -* Wed Mar 22 2017 Laura Abbott <labbott@fedoraproject.org> -- Reenable debugging options. - -* Tue Mar 21 2017 Peter Robinson <pbrobinson@fedoraproject.org> -- Add initial support for vc4 HDMI Audio - * Mon Mar 20 2017 Laura Abbott <labbott@fedoraproject.org> - 4.11.0-0.rc3.git0.1 - Linux v4.11-rc3 - Fix for debuginfo conflicts (rhbz 1431296) |