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: <20181211101828.GG4497@dell>
Date:   Tue, 11 Dec 2018 10:18:28 +0000
From:   Lee Jones <lee.jones@...aro.org>
To:     Enric Balletbo i Serra <enric.balletbo@...labora.com>
Cc:     groeck@...omium.org, gwendal@...omium.org, kernel@...labora.com,
        bleung@...omium.org, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org
Subject: Re: [PATCH] mfd: cros_ec_dev: Add missing mfd_remove_devices() call
 in remove

On Tue, 11 Dec 2018, Enric Balletbo i Serra wrote:

> Hi Lee,
> 
> On 11/12/18 7:12, Lee Jones wrote:
> > On Mon, 10 Dec 2018, Enric Balletbo i Serra wrote:
> > 
> >> The driver adds different MFD child devices via mfd_add_devices() and
> >> hence it is required to call mfd_remove_devices() to remove MFD child
> >> devices.
> >>
> >> Fixes: 5e0115581bbc ("cros_ec: Move cros_ec_dev module to drivers/mfd")
> >> Cc: stable@...r.kernel.org
> >> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@...labora.com>
> >> ---
> >> Hi Lee,
> >>
> >> I saw that you send a mfd-fixes pull request this morning, so sorry in
> >> advance for sending this too late. This was broken since the driver
> >> moved from platform/chrome to mfd (and probably before that), so
> >> it's an old problem. Note that I plan to send a patch series that depends
> >> on this to apply cleanly. If the patch is fine with you and there is any
> >> possibility to go in this version that will be good, if not, let me know
> >> if you prefer queue this in your for-next branch or if you prefer I
> >> include the patch on the series I plan to send on top of it to not mess
> >> things.
> > 
> > It wouldn't have made the v4.20-rcs anyway.  Even if you did send it
> > earlier.  I only send fixes to that -rcs which fix issues introduced
> > during the current release cycle.
> > 
> 
> Ok.
> 
> > If memory serves, doesn't this driver now (or will in the very near
> > future) use devm_* for device creation?  That would make this patch
> > either incorrect (should be devm_mfd_remove_devices() if really
> > required) or moot?
> > 
> 
> I think you have in mind this patch [1], right? Note that in this patch we're
> using devm_* for cros_ec driver, _not_ cros_ec_dev driver which is different.

Ah yes, that was it.

> For the cros_ec_dev driver we need to take care with device managed allocations
> as explained in the last fix merged [2]. For the cros_ec_dev I was trying to no
> mix device managed allocations with non-device managed allocations, and as we
> can't use devm_kzalloc in this case, I thought that was worth use the
> mfd_add/mfd_remove functions like is now. Makes sense? What are your thoughts here?

The patch is fine then.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ