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: <ZeLZ5UOVgVdVlFBD@x130>
Date: Fri, 1 Mar 2024 23:48:53 -0800
From: Saeed Mahameed <saeed@...nel.org>
To: Vegard Nossum <vegard.nossum@...cle.com>
Cc: Arnd Bergmann <arnd@...db.de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Leon Romanovsky <leonro@...dia.com>,
	Jason Gunthorpe <jgg@...dia.com>, Jiri Pirko <jiri@...dia.com>,
	Leonid Bloch <lbloch@...dia.com>, Itay Avraham <itayavr@...dia.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Saeed Mahameed <saeedm@...dia.com>,
	David Ahern <dsahern@...nel.org>,
	Aron Silverton <aron.silverton@...cle.com>,
	Christoph Hellwig <hch@...radead.org>,
	andrew.gospodarek@...adcom.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V4 4/5] misc: mlx5ctl: Add command rpc ioctl

On 29 Feb 12:49, Vegard Nossum wrote:
>
>On 07/02/2024 08:24, Saeed Mahameed wrote:
>>@@ -328,6 +420,11 @@ static int mlx5ctl_probe(struct auxiliary_device *adev,
>>  		goto abort;
>>  	}
>>+	err = sysfs_create_link_nowarn(&mcdev->miscdev.this_device->kobj,
>>+				       &mdev->device->kobj, "mdev");
>>+	if (err)
>>+		mlx5ctl_dbg(mcdev, "mlx5ctl: failed to create sysfs link err %d\n", err);
>>+
>
>Should this propagate the error to the caller?
>

this link is informational only and not necessary for the driver function,
it meant to help user-space apps to associate mlx5ctl driver with it parent 
mlx5_core device.

>What happens if/when mlx5ctl_remove()/sysfs_remove_link() gets called
>later for this kobj?
>

sysfs_remove_link() will eventually call kernfs_remove_by_name_ns()
and it will return -ENOENT; if not found, and it will be silently dropped.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ