svn commit: r307518 - in head/sys: arm/allwinner arm/at91 arm/cavium/cns11xx arm/samsung/exynos arm/ti/am335x arm/ti/usb arm/xilinx boot/kshim dev/bhnd/cores/usb dev/puc dev/usb dev/usb/controller ...

John Baldwin jhb at freebsd.org
Mon Oct 17 18:20:07 UTC 2016


On Monday, October 17, 2016 10:20:39 AM Hans Petter Selasky wrote:
> Author: hselasky
> Date: Mon Oct 17 10:20:38 2016
> New Revision: 307518
> URL: https://svnweb.freebsd.org/changeset/base/307518
> 
> Log:
>   Fix device delete child function.
>   
>   When detaching device trees parent devices must be detached prior to
>   detaching its children. This is because parent devices can have
>   pointers to the child devices in their softcs which are not
>   invalidated by device_delete_child(). This can cause use after free
>   issues and panic().
>   
>   Device drivers implementing trees, must ensure its detach function
>   detaches or deletes all its children before returning.
>   
>   While at it remove now redundant device_detach() calls before
>   device_delete_child() and device_delete_children(), mostly in
>   the USB controller drivers.
>   
>   Tested by:		Jan Henrik Sylvester <me at janh.de>
>   Reviewed by:		jhb
>   Differential Revision:	https://reviews.freebsd.org/D8070
>   MFC after:		2 weeks

Thanks.

-- 
John Baldwin


More information about the svn-src-all mailing list