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] [day] [month] [year] [list]
Message-ID: <20230812080759.GB9469@wunner.de>
Date:   Sat, 12 Aug 2023 10:07:59 +0200
From:   Lukas Wunner <lukas@...ner.de>
To:     Alistair Francis <alistair23@...il.com>
Cc:     bhelgaas@...gle.com, linux-pci@...r.kernel.org,
        Jonathan.Cameron@...wei.com, alex.williamson@...hat.com,
        christian.koenig@....com, kch@...dia.com,
        gregkh@...uxfoundation.org, logang@...tatee.com,
        linux-kernel@...r.kernel.org, chaitanyak@...dia.com,
        rdunlap@...radead.org, Alistair Francis <alistair.francis@....com>
Subject: Re: [PATCH v5] PCI/DOE: Expose the DOE protocols via sysfs

On Fri, Aug 11, 2023 at 08:44:53PM -0400, Alistair Francis wrote:
> +	ret = devm_device_add_group(&pdev->dev, &pci_dev_doe_proto_group);
> +	if (ret) {
> +		pci_err(pdev, "can't create DOE goup: %d\n", ret);
> +		return ret;
> +	}

You cannot use devm_* functions in the PCI core.

Anything done through devm_* will be undone when the device's driver
unbinds.  User space can unbind and rebind the driver at any time
through sysfs.  They'll lose your DOE attributes the first time
they do this because of your use of devm_device_add_group().

Thanks,

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ