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]
Message-ID: <f44cc093-2199-7e94-561a-a9450511293a@gmail.com>
Date:   Sun, 29 Nov 2020 14:15:51 -0700
From:   David Ahern <dsahern@...il.com>
To:     Moshe Shemesh <moshe@...lanox.com>,
        Stephen Hemminger <stephen@...workplumber.org>,
        Jakub Kicinski <kuba@...nel.org>, Jiri Pirko <jiri@...dia.com>,
        netdev@...r.kernel.org
Subject: Re: [PATCH iproute2-net 2/3] devlink: Add pr_out_dev() helper
 function

On 11/26/20 4:14 AM, Moshe Shemesh wrote:
> diff --git a/devlink/devlink.c b/devlink/devlink.c
> index a9ba0072..bd588869 100644
> --- a/devlink/devlink.c
> +++ b/devlink/devlink.c
> @@ -2974,17 +2974,11 @@ static int cmd_dev_param(struct dl *dl)
>  	pr_err("Command \"%s\" not found\n", dl_argv(dl));
>  	return -ENOENT;
>  }
> -static int cmd_dev_show_cb(const struct nlmsghdr *nlh, void *data)
> +
> +static void pr_out_dev(struct dl *dl, struct nlattr **tb)

why 'pr_out_dev'? there is no 'dev' argument.

>  {
> -	struct dl *dl = data;
> -	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
> -	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
>  	uint8_t reload_failed = 0;
>  
> -	mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
> -	if (!tb[DEVLINK_ATTR_BUS_NAME] || !tb[DEVLINK_ATTR_DEV_NAME])
> -		return MNL_CB_ERROR;
> -
>  	if (tb[DEVLINK_ATTR_RELOAD_FAILED])
>  		reload_failed = mnl_attr_get_u8(tb[DEVLINK_ATTR_RELOAD_FAILED]);
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ