Re: [PATCH 1/2] xhci: Fix invalid loop check in xhci_free_tt_info()

2012-06-07 Thread Sarah Sharp
On Fri, Jun 01, 2012 at 10:06:23AM +0200, Takashi Iwai wrote: xhci_free_tt_info() may access the invalid memory when it removes the last entry but the list is not empty. Then tt_next reaches to the list head but it still tries to check the tt_info of that entry. This patch fixes the bug and

[PATCH 1/2] xhci: Fix invalid loop check in xhci_free_tt_info()

2012-06-01 Thread Takashi Iwai
xhci_free_tt_info() may access the invalid memory when it removes the last entry but the list is not empty. Then tt_next reaches to the list head but it still tries to check the tt_info of that entry. This patch fixes the bug and cleans up the messy code by rewriting with a simple

Re: [PATCH 1/2] xhci: Fix invalid loop check in xhci_free_tt_info()

2012-06-01 Thread Sergei Shtylyov
Hello. On 01-06-2012 12:06, Takashi Iwai wrote: xhci_free_tt_info() may access the invalid memory when it removes the last entry but the list is not empty. Then tt_next reaches to the list head but it still tries to check the tt_info of that entry. This patch fixes the bug and cleans up