linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: inside-secure - Fix null ptr derefence on rmmod for macchiatobin
@ 2019-07-26 15:31 Pascal van Leeuwen
  2019-07-30  8:12 ` Antoine Tenart
  0 siblings, 1 reply; 5+ messages in thread
From: Pascal van Leeuwen @ 2019-07-26 15:31 UTC (permalink / raw)
  To: linux-crypto; +Cc: antoine.tenart, herbert, davem, Pascal van Leeuwen

This small patch fixes a null pointer derefence panic that occurred when
unloading the driver (using rmmod) on macchiatobin due to not setting
the platform driver data properly in the probe routine.

Signed-off-by: Pascal van Leeuwen <pvanleeuwen@verimatrix.com>
---
 drivers/crypto/inside-secure/safexcel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c
index 45443bf..423ea2d 100644
--- a/drivers/crypto/inside-secure/safexcel.c
+++ b/drivers/crypto/inside-secure/safexcel.c
@@ -1274,6 +1274,8 @@ static int safexcel_probe(struct platform_device *pdev)
 	priv->dev = dev;
 	priv->version = (enum safexcel_eip_version)of_device_get_match_data(dev);
 
+	platform_set_drvdata(pdev, priv);
+
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	priv->base = devm_ioremap_resource(dev, res);
 	if (IS_ERR(priv->base)) {
-- 
1.8.3.1


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

end of thread, other threads:[~2019-07-30 12:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-26 15:31 [PATCH] crypto: inside-secure - Fix null ptr derefence on rmmod for macchiatobin Pascal van Leeuwen
2019-07-30  8:12 ` Antoine Tenart
2019-07-30 10:27   ` Pascal Van Leeuwen
2019-07-30 11:34     ` Herbert Xu
2019-07-30 12:24       ` Pascal Van Leeuwen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).