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, 24 Aug 2023 10:50:07 +0200
From: Simon Horman <horms@...nel.org>
To: Zhengchao Shao <shaozhengchao@...wei.com>
Cc: netdev@...r.kernel.org, linux-kselftest@...r.kernel.org,
	shuah@...nel.org, j.vosburgh@...il.com, andy@...yhouse.net,
	weiyongjun1@...wei.com, yuehaibing@...wei.com
Subject: Re: [PATCH net-next] selftests: bonding: delete link1_1 in the
 cleanup path

On Wed, Aug 23, 2023 at 11:26:40AM +0800, Zhengchao Shao wrote:
> If failed to set link1_1 to netns client, we should delete link1_1 in the
> cleanup path. But if set link1_1 to netns client successfully, delete
> link1_1 will report warning. So delete link1_1 in the cleanup path and
> drop any warning message.

Hi Zhengchao Shao,

It seems unfortunate to drop all warning and error messages.
What if the message is about something other than link1_1 not existing?

Would it be practical to check if link1_1 exists,
say by looking in sysfs, before trying to delete it?

> Reported-by: Hangbin Liu <liuhangbin@...il.com>
> Closes: https://lore.kernel.org/all/ZNyJx1HtXaUzOkNA@Laptop-X1/
> Signed-off-by: Zhengchao Shao <shaozhengchao@...wei.com>
> ---
>  .../drivers/net/bonding/bond-arp-interval-causes-panic.sh        | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/drivers/net/bonding/bond-arp-interval-causes-panic.sh b/tools/testing/selftests/drivers/net/bonding/bond-arp-interval-causes-panic.sh
> index 7b2d421f09cf..2b3c678c5205 100755
> --- a/tools/testing/selftests/drivers/net/bonding/bond-arp-interval-causes-panic.sh
> +++ b/tools/testing/selftests/drivers/net/bonding/bond-arp-interval-causes-panic.sh
> @@ -11,6 +11,7 @@ finish()
>  {
>  	ip netns delete server || true
>  	ip netns delete client || true
> +	ip link del link1_1 >/dev/null 2>&1
>  }
>  
>  trap finish EXIT
> -- 
> 2.34.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ