Fixes: commit
331b72922c5f58d48fd ("net: sched: RCU cls_tcindex")
Cc: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-By: John Fastabend <john.r.fastabend@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
* perfect hash and hash pointers from old data.
*/
cp = kzalloc(sizeof(*cp), GFP_KERNEL);
* perfect hash and hash pointers from old data.
*/
cp = kzalloc(sizeof(*cp), GFP_KERNEL);
- if (!cp)
- return -ENOMEM;
+ if (!cp) {
+ err = -ENOMEM;
+ goto errout;
+ }
cp->mask = p->mask;
cp->shift = p->shift;
cp->mask = p->mask;
cp->shift = p->shift;
sizeof(*r) * cp->hash, GFP_KERNEL);
if (!cp->perfect)
goto errout;
sizeof(*r) * cp->hash, GFP_KERNEL);
if (!cp->perfect)
goto errout;
if (cp->perfect) {
if (!valid_perfect_hash(cp) ||
cp->hash > cp->alloc_hash)
if (cp->perfect) {
if (!valid_perfect_hash(cp) ||
cp->hash > cp->alloc_hash)
} else if (cp->h && cp->hash != cp->alloc_hash) {
} else if (cp->h && cp->hash != cp->alloc_hash) {
*/
if (cp->perfect || valid_perfect_hash(cp))
if (handle >= cp->alloc_hash)
*/
if (cp->perfect || valid_perfect_hash(cp))
if (handle >= cp->alloc_hash)
cp->perfect = kcalloc(cp->hash, sizeof(*r), GFP_KERNEL);
if (!cp->perfect)
cp->perfect = kcalloc(cp->hash, sizeof(*r), GFP_KERNEL);
if (!cp->perfect)
for (i = 0; i < cp->hash; i++)
tcf_exts_init(&cp->perfect[i].exts,
TCA_TCINDEX_ACT,
for (i = 0; i < cp->hash; i++)
tcf_exts_init(&cp->perfect[i].exts,
TCA_TCINDEX_ACT,
cp->h = hash;
balloc = 2;
cp->h = hash;
balloc = 2;