Patch "net: bridge: vlan: fix error return code in __vlan_add()" has been added to the 5.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: bridge: vlan: fix error return code in __vlan_add()

to the 5.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-bridge-vlan-fix-error-return-code-in-__vlan_add.patch
and it can be found in the queue-5.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From foo@baz Sat Dec 19 11:38:43 AM CET 2020
From: Zhang Changzhong <zhangchangzhong@xxxxxxxxxx>
Date: Fri, 4 Dec 2020 16:48:56 +0800
Subject: net: bridge: vlan: fix error return code in __vlan_add()

From: Zhang Changzhong <zhangchangzhong@xxxxxxxxxx>

[ Upstream commit ee4f52a8de2c6f78b01f10b4c330867d88c1653a ]

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: f8ed289fab84 ("bridge: vlan: use br_vlan_(get|put)_master to deal with refcounts")
Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
Signed-off-by: Zhang Changzhong <zhangchangzhong@xxxxxxxxxx>
Acked-by: Nikolay Aleksandrov <nikolay@xxxxxxxxxx>
Link: https://lore.kernel.org/r/1607071737-33875-1-git-send-email-zhangchangzhong@xxxxxxxxxx
Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 net/bridge/br_vlan.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/net/bridge/br_vlan.c
+++ b/net/bridge/br_vlan.c
@@ -266,8 +266,10 @@ static int __vlan_add(struct net_bridge_
 		}
 
 		masterv = br_vlan_get_master(br, v->vid, extack);
-		if (!masterv)
+		if (!masterv) {
+			err = -ENOMEM;
 			goto out_filt;
+		}
 		v->brvlan = masterv;
 		if (br_opt_get(br, BROPT_VLAN_STATS_PER_PORT)) {
 			v->stats = netdev_alloc_pcpu_stats(struct br_vlan_stats);


Patches currently in stable-queue which might be from zhangchangzhong@xxxxxxxxxx are

queue-5.9/net-bridge-vlan-fix-error-return-code-in-__vlan_add.patch
queue-5.9/net-ll_temac-fix-potential-null-dereference-in-temac_probe.patch
queue-5.9/ipv4-fix-error-return-code-in-rtm_to_fib_config.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux