• Pavankumar Kondeti's avatar
    EHCI: Update qTD next pointer in QH overlay region during unlink · 3d037774
    Pavankumar Kondeti authored
    There is a possibility of QH overlay region having reference to a stale
    qTD pointer during unlink.
    
    Consider an endpoint having two pending qTD before unlink process begins.
    The endpoint's QH queue looks like this.
    
    qTD1 --> qTD2 --> Dummy
    
    To unlink qTD2, QH is removed from asynchronous list and Asynchronous
    Advance Doorbell is programmed.  The qTD1's next qTD pointer is set to
    qTD2'2 next qTD pointer and qTD2 is retired upon controller's doorbell
    interrupt.  If QH's current qTD pointer points to qTD1, transfer overlay
    region still have reference to qTD2. But qtD2 is just unlinked and freed.
    This may cause EHCI system error.  Fix this by updating qTD next pointer
    in QH overlay region with the qTD next pointer of the current qTD.
    Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
    Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    3d037774
ehci-q.c 37.7 KB