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>] [day] [month] [year] [list]
Message-ID: <20210629130957.484f5c43@coco.lan>
Date:   Tue, 29 Jun 2021 13:09:57 +0200
From:   Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To:     Axel Lin <axel.lin@...ics.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linuxarm@...wei.com, mauro.chehab@...wei.com,
        Lee Jones <lee.jones@...aro.org>,
        Arnd Bergmann <arnd@...db.de>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-staging@...ts.linux.dev
Subject: Re: [PATCH v10 2/5] regulator: hi6421v600-regulator: fix platform
 drvdata

Em Tue, 29 Jun 2021 18:48:31 +0800
Axel Lin <axel.lin@...ics.com> escreveu:

> Mauro Carvalho Chehab <mchehab+huawei@...nel.org> 於 2021年6月29日 週二 下午6:31寫道:
> 
> > platform drvdata can't be used inside the regulator driver,
> > as this is already used by the MFD and SPMI drivers.
> >  
> 
> Could you point out which part of the code set the platform drvdata?
> My understanding is the mfd only set dev->platform_data rather than
> dev->driver_data.
> If you mean the dev_set_drvdata() call in hi6421_spmi_pmic_probe, it's the
> parent device of the regulator pdev.

It needs to be double-checked, but I guess the SPMI or the SPMI controller
driver already uses it.

See, there are 5 drivers involved, all of them using private data
and passing data to child drivers, called on the order below:

	spmi
	hisi-spmi-controller
	hi6421-spmi-pmic
	mfd drivers:
		hi6421v600-irq
		hi6421-regulator

If you're in doubt, try to apply this series, and then change the
driver again to use platform data. You'll see that it will stop
booting after initializing the first regulator.

Thanks,
Mauro

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ