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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <MN0PR12MB5953B7A04D4B9C9D92D210B8B7C72@MN0PR12MB5953.namprd12.prod.outlook.com>
Date: Tue, 11 Jun 2024 19:05:30 +0000
From: "Pandey, Radhey Shyam" <radhey.shyam.pandey@....com>
To: Sean Anderson <sean.anderson@...ux.dev>, Andrew Lunn <andrew@...n.ch>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: Jakub Kicinski <kuba@...nel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, Russell King <linux@...linux.org.uk>, "Simek,
 Michal" <michal.simek@....com>, Paolo Abeni <pabeni@...hat.com>, Eric Dumazet
	<edumazet@...gle.com>, "David S . Miller" <davem@...emloft.net>,
	"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>
Subject: RE: [PATCH net-next v2] net: xilinx: axienet: Use NL_SET_ERR_MSG
 instead of netdev_err

> -----Original Message-----
> From: Sean Anderson <sean.anderson@...ux.dev>
> Sent: Tuesday, June 11, 2024 9:11 PM
> To: Pandey, Radhey Shyam <radhey.shyam.pandey@....com>; Andrew
> Lunn <andrew@...n.ch>; netdev@...r.kernel.org
> Cc: Jakub Kicinski <kuba@...nel.org>; linux-kernel@...r.kernel.org; Russell
> King <linux@...linux.org.uk>; Simek, Michal <michal.simek@....com>;
> Paolo Abeni <pabeni@...hat.com>; Eric Dumazet <edumazet@...gle.com>;
> David S . Miller <davem@...emloft.net>; linux-arm-
> kernel@...ts.infradead.org; Sean Anderson <sean.anderson@...ux.dev>
> Subject: [PATCH net-next v2] net: xilinx: axienet: Use NL_SET_ERR_MSG
> instead of netdev_err
> 
> This error message can be triggered by userspace. Use NL_SET_ERR_MSG so
> the message is returned to the user and to avoid polluting the kernel
> logs. Additionally, change the return value from EFAULT to EBUSY to
> better reflect the error (which has nothing to do with addressing).
> 
> Signed-off-by: Sean Anderson <sean.anderson@...ux.dev>

Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@....com>
Thanks!
> ---
> 
> Changes in v2:
> - Split off from stats series
> - Document return value change
> 
>  drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> index c29809cd9201..5f98daa5b341 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> @@ -1945,9 +1945,9 @@ axienet_ethtools_set_coalesce(struct net_device
> *ndev,
>  	struct axienet_local *lp = netdev_priv(ndev);
> 
>  	if (netif_running(ndev)) {
> -		netdev_err(ndev,
> -			   "Please stop netif before applying
> configuration\n");
> -		return -EFAULT;
> +		NL_SET_ERR_MSG(extack,
> +			       "Please stop netif before applying
> configuration");
> +		return -EBUSY;
>  	}
> 
>  	if (ecoalesce->rx_max_coalesced_frames)
> --
> 2.35.1.1320.gc452695387.dirty


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ