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: <Zbtks__SZIgoDTaj@nanopsycho>
Date: Thu, 1 Feb 2024 10:30:27 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH 1/3] net/sched: netem: use extack

Thu, Feb 01, 2024 at 04:45:58AM CET, stephen@...workplumber.org wrote:
>The error handling in netem predates introduction of extack,
>and was mostly using pr_info(). Use extack to put errors in
>result rather than console log.
>

[...]

>@@ -1068,18 +1073,16 @@ static int netem_init(struct Qdisc *sch, struct nlattr *opt,
> 		      struct netlink_ext_ack *extack)
> {
> 	struct netem_sched_data *q = qdisc_priv(sch);
>-	int ret;
> 
> 	qdisc_watchdog_init(&q->watchdog, sch);
> 
>-	if (!opt)
>+	if (!opt) {
>+		NL_SET_ERR_MSG_MOD(extack, "Netem missing required parameters");

Drop "Netem " here.

Otherwise, this looks fine.

> 		return -EINVAL;
>+	}
> 
> 	q->loss_model = CLG_RANDOM;
>-	ret = netem_change(sch, opt, extack);
>-	if (ret)
>-		pr_info("netem: change failed\n");
>-	return ret;
>+	return netem_change(sch, opt, extack);
> }
> 
> static void netem_destroy(struct Qdisc *sch)
>-- 
>2.43.0
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ