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: <YhQO52cvzIo8prKi@lunn.ch>
Date:   Mon, 21 Feb 2022 23:15:03 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Mauri Sandberg <maukka@....kapsi.fi>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH] net: mv643xx_eth: handle EPROBE_DEFER

> > Please can you add code to remove the platform device when the probe
> > fails.
> 
> I am looking at the vector 'port_platdev' that holds pointers to already
> initialised ports. There is this mv643xx_eth_shared_of_remove(), which
> probably could be utilised to remove them. Should I remove the platform
> devices only in case of probe defer or always if probe fails?
 
In general, a failing probe should always undo anything it has done so
far. Sometimes you can call the release function, or its
helpers. Other times you do a goto out: and then release stuff in the
reverse order it was taken.

It looks like platform_device_del() can take a NULL pointer, so it is
probably O.K. to call mv643xx_eth_shared_of_remove().

	 Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ