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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 14 Dec 2017 13:08:09 -0700
From:   David Ahern <dsahern@...il.com>
To:     Alexander Aring <aring@...atatu.com>, jhs@...atatu.com
Cc:     xiyou.wangcong@...il.com, jiri@...nulli.us, davem@...emloft.net,
        netdev@...r.kernel.org, kernel@...atatu.com,
        David Ahern <dsahern@...il.com>
Subject: Re: [PATCHv2 net-next 10/15] net: sch: api: add extack support in
 tcf_block_get

On 12/14/17 11:39 AM, Alexander Aring wrote:
> diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
> index 446ef956a79c..173107ed3726 100644
> --- a/net/sched/cls_api.c
> +++ b/net/sched/cls_api.c
> @@ -282,20 +282,24 @@ static void tcf_block_offload_unbind(struct tcf_block *block, struct Qdisc *q,
>  }
>  
>  int tcf_block_get_ext(struct tcf_block **p_block, struct Qdisc *q,
> -		      struct tcf_block_ext_info *ei)
> +		      struct tcf_block_ext_info *ei,
> +		      struct netlink_ext_ack *extack)
>  {
>  	struct tcf_block *block = kzalloc(sizeof(*block), GFP_KERNEL);
>  	struct tcf_chain *chain;
>  	int err;
>  
> -	if (!block)
> +	if (!block) {
> +		NL_SET_ERR_MSG(extack, "No tcf block given");

Wrong message for the failure. !block means kzalloc failed.

>  		return -ENOMEM;
> +	}
>  	INIT_LIST_HEAD(&block->chain_list);
>  	INIT_LIST_HEAD(&block->cb_list);
>  
>  	/* Create chain 0 by default, it has to be always present. */
>  	chain = tcf_chain_create(block, 0);
>  	if (!chain) {
> +		NL_SET_ERR_MSG(extack, "Failed to create new tcf chain");
>  		err = -ENOMEM;
>  		goto err_chain_create;
>  	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ