Merge tag ‘wireless-drivers-for-davem-2019-04-30’ of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers [Linux 5.1]

Merge tag ‘wireless-drivers-for-davem-2019-04-30’ of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers [Linux 5.1]

This Linux kernel change "Merge tag ‘wireless-drivers-for-davem-2019-04-30’ of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers" is included in the Linux 5.1 release. This change is authored by David S. Miller <davem [at] davemloft.net> on Tue Apr 30 11:52:17 2019 -0400. The commit for this change in Linux stable tree is 3425997 (patch). Other info about this change: Merge: a622b40 7a0f8ad

Merge tag 'wireless-drivers-for-davem-2019-04-30' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers

Kalle Valo says:

====================
wireless-drivers fixes for 5.1

Third set of fixes for 5.1.

iwlwifi

* fix an oops when creating debugfs entries

* fix bug when trying to capture debugging info while in rfkill

* prevent potential uninitialized memory dumps into debugging logs

* fix some initialization parameters for AX210 devices

* fix an oops with non-MSIX devices

* fix an oops when we receive a packet with bogus lengths

* fix a bug that prevented 5350 devices from working

* fix a small merge damage from the previous series

mwifiex

* fig regression with resume on SDIO

ath10k

* fix locking problem with crashdump

* fix warnings during suspend and resume

Also note that this pull conflicts with net-next. And I want to emphasie
that it's really net-next, so when you pull this to net tree it should
go without conflicts. Stephen reported the conflict here:

https://lkml.kernel.org/r/[email protected]

In iwlwifi oddly commit 154d4899e411 adds the IS_ERR_OR_NULL() in
wireless-drivers but commit c9af7528c331 removes the whole check in
wireless-drivers-next. The fix is easy, just drop the whole check for
mvmvif->dbgfs_dir in iwlwifi/mvm/debugfs-vif.c, it's unneeded anyway.
====================

Signed-off-by: David S. Miller <[email protected]>

There is no are 0 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 net/l2tp/l2tp_core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index aee33d1..52b5a27 100644
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -169,8 +169,8 @@ struct l2tp_tunnel *l2tp_tunnel_get(const struct net *net, u32 tunnel_id)

    rcu_read_lock_bh();
    list_for_each_entry_rcu(tunnel, &pn->l2tp_tunnel_list, list) {
-       if (tunnel->tunnel_id == tunnel_id) {
-           l2tp_tunnel_inc_refcount(tunnel);
+       if (tunnel->tunnel_id == tunnel_id &&
+           refcount_inc_not_zero(&tunnel->ref_count)) {
            rcu_read_unlock_bh();

            return tunnel;
@@ -190,8 +190,8 @@ struct l2tp_tunnel *l2tp_tunnel_get_nth(const struct net *net, int nth)

    rcu_read_lock_bh();
    list_for_each_entry_rcu(tunnel, &pn->l2tp_tunnel_list, list) {
-       if (++count > nth) {
-           l2tp_tunnel_inc_refcount(tunnel);
+       if (++count > nth &&
+           refcount_inc_not_zero(&tunnel->ref_count)) {
            rcu_read_unlock_bh();
            return tunnel;
        }

Leave a Reply

Your email address will not be published. Required fields are marked *