Merge tag 'ieee802154-for-net-2023-06-19' of git://git.kernel.org/pub/scm/linux/kerne...
authorDavid S. Miller <davem@davemloft.net>
Tue, 20 Jun 2023 08:32:33 +0000 (09:32 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Jun 2023 08:32:33 +0000 (09:32 +0100)
Stefan Schmidt says:

====================
An update from ieee802154 for your *net* tree:

Two small fixes and MAINTAINERS update this time.

Azeem Shaikh ensured consistent use of strscpy through the tree and fixed
the usage in our trace.h.

Chen Aotian fixed a potential memory leak in the hwsim simulator for
ieee802154.

Miquel Raynal updated the MAINATINERS file with the new team git tree
locations and patchwork URLs.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
MAINTAINERS
drivers/net/ieee802154/mac802154_hwsim.c
net/ieee802154/trace.h
net/mac802154/trace.h

index 6992b7c..8220335 100644 (file)
@@ -9972,8 +9972,9 @@ M:        Miquel Raynal <miquel.raynal@bootlin.com>
 L:     linux-wpan@vger.kernel.org
 S:     Maintained
 W:     https://linux-wpan.org/
-T:     git git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan.git
-T:     git git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next.git
+Q:     https://patchwork.kernel.org/project/linux-wpan/list/
+T:     git git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan.git
+T:     git git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan-next.git
 F:     Documentation/networking/ieee802154.rst
 F:     drivers/net/ieee802154/
 F:     include/linux/ieee802154.h
index 8445c21..31cba9a 100644 (file)
@@ -685,7 +685,7 @@ static int hwsim_del_edge_nl(struct sk_buff *msg, struct genl_info *info)
 static int hwsim_set_edge_lqi(struct sk_buff *msg, struct genl_info *info)
 {
        struct nlattr *edge_attrs[MAC802154_HWSIM_EDGE_ATTR_MAX + 1];
-       struct hwsim_edge_info *einfo;
+       struct hwsim_edge_info *einfo, *einfo_old;
        struct hwsim_phy *phy_v0;
        struct hwsim_edge *e;
        u32 v0, v1;
@@ -723,8 +723,10 @@ static int hwsim_set_edge_lqi(struct sk_buff *msg, struct genl_info *info)
        list_for_each_entry_rcu(e, &phy_v0->edges, list) {
                if (e->endpoint->idx == v1) {
                        einfo->lqi = lqi;
-                       rcu_assign_pointer(e->info, einfo);
+                       einfo_old = rcu_replace_pointer(e->info, einfo,
+                                                       lockdep_is_held(&hwsim_phys_lock));
                        rcu_read_unlock();
+                       kfree_rcu(einfo_old, rcu);
                        mutex_unlock(&hwsim_phys_lock);
                        return 0;
                }
index e5d8439..c16db0b 100644 (file)
@@ -13,7 +13,7 @@
 
 #define MAXNAME                32
 #define WPAN_PHY_ENTRY __array(char, wpan_phy_name, MAXNAME)
-#define WPAN_PHY_ASSIGN        strlcpy(__entry->wpan_phy_name,  \
+#define WPAN_PHY_ASSIGN        strscpy(__entry->wpan_phy_name,  \
                                wpan_phy_name(wpan_phy), \
                                MAXNAME)
 #define WPAN_PHY_PR_FMT        "%s"
index 689396d..1574ecc 100644 (file)
@@ -14,7 +14,7 @@
 
 #define MAXNAME                32
 #define LOCAL_ENTRY    __array(char, wpan_phy_name, MAXNAME)
-#define LOCAL_ASSIGN   strlcpy(__entry->wpan_phy_name, \
+#define LOCAL_ASSIGN   strscpy(__entry->wpan_phy_name, \
                                wpan_phy_name(local->hw.phy), MAXNAME)
 #define LOCAL_PR_FMT   "%s"
 #define LOCAL_PR_ARG   __entry->wpan_phy_name