Re: [Suggestion] drivers/usb/renesas_usbhs: pkt is still in use, after it was already free.

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

 



Hi Chen

> Hello Greg Kroah-Hartman:
> 
> in drivers/usb/renesas_usbhs/mod_host.c, in function usbhsh_queue_done:
> 
>     get ureq from pkt, by using the macro usbhsh_pkt_to_ureq (at line 637)
>         pkt is the sub-object of ureq (line 73..76, line 157..158)
> 
>     free ureq, by calling function usbhsh_ureq_free (at line 655)
>         use kfree to free ureq in function usbhsh_ureq_free (line 184..191)
>         originally ureq is call kzalloc in function usbhsh_ureq_alloc (line 171..179)
>         so pkt also free, too.
> 
>     still use pkt, by calling function usbhsh_endpoint_sequence_save (at line 657)
>         use pkt->zero in funcion usbhsh_endpoint_sequence_save (at line 243)
> 
> 
>   I find it through code review, please help to check this suggestion whether valid.
> 
>   if it was valid:
>     I prefer the relative member to provide relative patch.
>     if can not find relative member, I should try (although it seems not a good idea)

Thank you for your review, and nice catch !
I think this is bug, and I didn't notice it.

Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux