* [PATCH v2] staging: vc04_services: vchiq_bus: Do not kfree device
@ 2023-10-09 10:47 Umang Jain
2023-10-15 16:17 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Umang Jain @ 2023-10-09 10:47 UTC (permalink / raw)
To: linux-staging, linux-media, linux-rpi-kernel
Cc: Stefan Wahren, Greg Kroah-Hartman, Dave Stevenson, Umang Jain
As per device_register() documentation, this kfree() on error path will
crash. The call to put_device() is all that is needed here to free the
memory.
Fixes: 027e5703de6b ("staging: vc04_services: vchiq_arm: Add new bus type and device type")
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c
index 4ac3491efe45..0076d091b9b2 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c
@@ -73,7 +73,6 @@ vchiq_device_register(struct device *parent, const char *name)
if (ret) {
dev_err(parent, "Cannot register %s: %d\n", name, ret);
put_device(&device->dev);
- kfree(device);
return NULL;
}
--
2.40.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] staging: vc04_services: vchiq_bus: Do not kfree device
2023-10-09 10:47 [PATCH v2] staging: vc04_services: vchiq_bus: Do not kfree device Umang Jain
@ 2023-10-15 16:17 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2023-10-15 16:17 UTC (permalink / raw)
To: Umang Jain
Cc: linux-staging, linux-media, linux-rpi-kernel, Stefan Wahren,
Dave Stevenson
On Mon, Oct 09, 2023 at 04:17:14PM +0530, Umang Jain wrote:
> As per device_register() documentation, this kfree() on error path will
> crash. The call to put_device() is all that is needed here to free the
> memory.
>
> Fixes: 027e5703de6b ("staging: vc04_services: vchiq_arm: Add new bus type and device type")
> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
> ---
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c
> index 4ac3491efe45..0076d091b9b2 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c
> @@ -73,7 +73,6 @@ vchiq_device_register(struct device *parent, const char *name)
> if (ret) {
> dev_err(parent, "Cannot register %s: %d\n", name, ret);
> put_device(&device->dev);
> - kfree(device);
> return NULL;
> }
>
> --
> 2.40.1
>
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- This looks like a new version of a previously submitted patch, but you
did not list below the --- line any changes from the previous version.
Please read the section entitled "The canonical patch format" in the
kernel file, Documentation/process/submitting-patches.rst for what
needs to be done here to properly describe this.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] staging: vc04_services: vchiq_bus: Do not kfree device
@ 2023-10-18 5:52 Umang Jain
2023-10-19 18:18 ` Stefan Wahren
0 siblings, 1 reply; 4+ messages in thread
From: Umang Jain @ 2023-10-18 5:52 UTC (permalink / raw)
To: linux-staging, linux-rpi-kernel, linux-media
Cc: Stefan Wahren, Greg Kroah-Hartman, Dave Stevenson, Umang Jain
As per device_register() documentation, this kfree() on error path will
crash. The call to put_device() is all that is needed here to free the
memory.
Fixes: 027e5703de6b ("staging: vc04_services: vchiq_arm: Add new bus type and device type")
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
---
Changes in v2:
- Add a Fixes: tag
---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c
index 4ac3491efe45..0076d091b9b2 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c
@@ -73,7 +73,6 @@ vchiq_device_register(struct device *parent, const char *name)
if (ret) {
dev_err(parent, "Cannot register %s: %d\n", name, ret);
put_device(&device->dev);
- kfree(device);
return NULL;
}
base-commit: a2fc3e8215313c8e4e42d4b2062830aaf1ef49c0
--
2.40.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] staging: vc04_services: vchiq_bus: Do not kfree device
2023-10-18 5:52 Umang Jain
@ 2023-10-19 18:18 ` Stefan Wahren
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Wahren @ 2023-10-19 18:18 UTC (permalink / raw)
To: Umang Jain, linux-staging, linux-rpi-kernel, linux-media
Cc: Greg Kroah-Hartman, Dave Stevenson
Am 18.10.23 um 07:52 schrieb Umang Jain:
> As per device_register() documentation, this kfree() on error path will
> crash. The call to put_device() is all that is needed here to free the
> memory.
>
> Fixes: 027e5703de6b ("staging: vc04_services: vchiq_arm: Add new bus type and device type")
> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-19 18:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-09 10:47 [PATCH v2] staging: vc04_services: vchiq_bus: Do not kfree device Umang Jain
2023-10-15 16:17 ` Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2023-10-18 5:52 Umang Jain
2023-10-19 18:18 ` Stefan Wahren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox