[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220624142122.30528-2-zhangfei.gao@linaro.org>
Date: Fri, 24 Jun 2022 22:21:21 +0800
From: Zhangfei Gao <zhangfei.gao@...aro.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arnd Bergmann <arnd@...db.de>,
Herbert Xu <herbert@...dor.apana.org.au>,
jean-philippe <jean-philippe@...aro.org>,
Wangzhou <wangzhou1@...ilicon.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>
Cc: acc@...neuler.org, linux-kernel@...r.kernel.org,
linux-crypto@...r.kernel.org, iommu@...ts.linux.dev,
Zhangfei Gao <zhangfei.gao@...aro.org>,
Yang Shen <shenyang39@...wei.com>
Subject: [PATCH v2 1/2] uacce: Handle parent driver module removal
Change cdev owner to parent driver owner, which blocks rmmod parent
driver module once fd is opened.
Signed-off-by: Yang Shen <shenyang39@...wei.com>
Signed-off-by: Zhangfei Gao <zhangfei.gao@...aro.org>
---
drivers/misc/uacce/uacce.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c
index 281c54003edc..f82f2dd30e76 100644
--- a/drivers/misc/uacce/uacce.c
+++ b/drivers/misc/uacce/uacce.c
@@ -484,7 +484,7 @@ int uacce_register(struct uacce_device *uacce)
return -ENOMEM;
uacce->cdev->ops = &uacce_fops;
- uacce->cdev->owner = THIS_MODULE;
+ uacce->cdev->owner = uacce->parent->driver->owner;
return cdev_device_add(uacce->cdev, &uacce->dev);
}
--
2.36.1
Powered by blists - more mailing lists