[Devel] [PATCH RHEL7 COMMIT] vzprivnet: Check that vzprivnet6_lookup() returns not NULL

Konstantin Khorenko khorenko at virtuozzo.com
Thu Mar 24 08:53:43 PDT 2016


The commit is pushed to "branch-rh7-3.10.0-327.10.1.vz7.12.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.10.1.vz7.12.3
------>
commit abc294b4a841889b3dac52b143f16111a95935d8
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date:   Thu Mar 24 19:53:43 2016 +0400

    vzprivnet: Check that vzprivnet6_lookup() returns not NULL
    
    Port diff-vzprivnet-classify-pne-NULL-checks-fix
      vzprivnet: check that vzprivnet6_lookup() returns not NULL
    
      but pne (priv net entry)->pn (private network) can't be NULL
    
      https://jira.sw.ru:9443/browse/PSBM-8734
    
      Signed-off-by: Andrey Vagin <avagin at openvz.org>
    
    Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
 net/ipv6/netfilter/ip6_vzprivnet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/netfilter/ip6_vzprivnet.c b/net/ipv6/netfilter/ip6_vzprivnet.c
index f8924e9..7a542018 100644
--- a/net/ipv6/netfilter/ip6_vzprivnet.c
+++ b/net/ipv6/netfilter/ip6_vzprivnet.c
@@ -813,14 +813,14 @@ static int classify6_seq_show(struct seq_file *s, void *v)
 
 	read_lock(&vzpriv6lock);
 	pne = vzprivnet6_lookup(&sparse6_root_node, ip);
-	if (pne->pn != NULL) {
+	if (pne != NULL) {
 		seq_printf(s, "net %u, ", pne->pn->netid);
 		seq_printf(s, "rule %pI6/%u\n", pne->ip, pne->preflen);
 		goto out;
 	}
 
 	pne = vzprivnet6_lookup(&legacy6_root_node, ip);
-	if (pne->pn != NULL) {
+	if (pne != NULL) {
 		seq_printf(s, "legacy %pI6/%u/%u\n",
 				pne->ip, pne->preflen, pne->pn->subnet_preflen);
 


More information about the Devel mailing list