RE: [PATCH] [media] marvell-ccic: drop free_irq for devm_request_irq allocated irq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Wei Yongjun,

Thanks for finding the issue. It seems the last part code is missed when I submitted the patch. Please see the patch we submitted before in [REVIEW PATCH V4 07/12] [media] marvell-ccic: switch to resource managed allocation and request.

The last part patch is missed:

@@ -474,18 +461,10 @@ out_free:
 static int mmpcam_remove(struct mmp_camera *cam)  {
 	struct mcam_camera *mcam = &cam->mcam;
-	struct mmp_camera_platform_data *pdata;
 
 	mmpcam_remove_device(cam);
-	free_irq(cam->irq, mcam);
 	mccic_shutdown(mcam);
 	mmpcam_power_down(mcam);
-	pdata = cam->pdev->dev.platform_data;
-	gpio_free(pdata->sensor_reset_gpio);
-	gpio_free(pdata->sensor_power_gpio);
-	iounmap(cam->power_regs);
-	iounmap(mcam->regs);
-	kfree(cam);
 	return 0;
 }

It seems there was some mistake when Albert transferring the submit patch task to me. And I did not notice the patch was wrong when submitting the patches. It is my fault. I'm sorry for the inconvenient 

Regards,
Libin 

>-----Original Message-----
>From: linux-media-owner@xxxxxxxxxxxxxxx [mailto:linux-media-owner@xxxxxxxxxxxxxxx] On
>Behalf Of Jonathan Corbet
>Sent: Wednesday, September 25, 2013 3:12 PM
>To: Wei Yongjun
>Cc: m.chehab@xxxxxxxxxxx; yongjun_wei@xxxxxxxxxxxxxxxxx; linux-
>media@xxxxxxxxxxxxxxx; Libin Yang
>Subject: Re: [PATCH] [media] marvell-ccic: drop free_irq for devm_request_irq allocated irq
>
>On Tue, 24 Sep 2013 10:35:50 +0800
>Wei Yongjun <weiyj.lk@xxxxxxxxx> wrote:
>
>> irq allocated with devm_request_irq should not be freed using
>> free_irq, because doing so causes a dangling pointer, and a subsequent
>> double free.
>
>Makes sense.
>
>Acked-by: Jonathan Corbet <corbet@xxxxxxx>
>
>jon
>--
>To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message
>to majordomo@xxxxxxxxxxxxxxx More majordomo info at  http://vger.kernel.org/majordomo-
>info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux