public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] misc/pvpanic: fix set driver data
@ 2021-08-19 13:41 Mihai Carabas
  2021-08-19 13:41 ` Mihai Carabas
  0 siblings, 1 reply; 3+ messages in thread
From: Mihai Carabas @ 2021-08-19 13:41 UTC (permalink / raw)
  To: arnd, gregkh, andriy.shevchenko, christophe.jaillet,
	mihai.carabas, linux-kernel

Commit 394febc9d0a6 ("misc/pvpanic: Make 'pvpanic_probe()' resource managed")
removed dev_set_drvdata() from the probe function and accessing sysfs entries
from userspace is causing a panic in the kernel (pi = dev_get_drvdata(dev) ->
pi is NULL).

v2:
- fixes a compile issue with CONFIG_PVPANIC_PCI
- move dev_set_drvdata() to devm_pvpanic_probe()

Mihai Carabas (1):
  misc/pvpanic: fix set driver data

 drivers/misc/pvpanic/pvpanic.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-19 15:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-19 13:41 [PATCH v2] misc/pvpanic: fix set driver data Mihai Carabas
2021-08-19 13:41 ` Mihai Carabas
2021-08-19 15:47   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox