lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 14 Apr 2012 19:42:31 +0900
From:	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:	netdev@...r.kernel.org
Subject: error path in __ip_vs_init()

Line 1880 cannot become true because net_generic() cannot return NULL.
Redundant check?

include/net/netns/generic.h:
 34 static inline void *net_generic(const struct net *net, int id)
 35 {
 36         struct net_generic *ng;
 37         void *ptr;
 38 
 39         rcu_read_lock();
 40         ng = rcu_dereference(net->gen);
 41         BUG_ON(id == 0 || id > ng->len);
 42         ptr = ng->ptr[id - 1];
 43         rcu_read_unlock();
 44 
 45         BUG_ON(!ptr);
 46         return ptr;
 47 }

net/netfilter/ipvs/ip_vs_core.c:
1875 static int __net_init __ip_vs_init(struct net *net)
1876 {
1877         struct netns_ipvs *ipvs;
1878 
1879         ipvs = net_generic(net, ip_vs_net_id);
1880         if (ipvs == NULL)
1881                 return -ENOMEM;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ