Re: [PATCH 16/21] USB: musb: host endpoint_disable() oops fixes

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

 



Greg Kroah-Hartman wrote:

From: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>

The musb_h_disable() routine can oops in some cases:

 - It's not safe to read hep->hcpriv outside musb->lock,
   since it gets changed on completion IRQ paths.

 - The list iterators aren't safe to use in that way;
   just remove the first element while !list_empty(),
   so deletions on other code paths can't make trouble.

   Neither of this names the true reason of oops: passing NULL to the iterator!

We need two "scrub the list" loops because only one branch
should touch hardware and advance the schedule.

[ dbrownell@xxxxxxxxxxxxxxxxxxxxx: massively simplify
  patch description; add key points as code comments ]

"Massively over-simplify" you should have said. My reworked patch with thwe clarified description (which you've chosen to ignore) contained your comment additions.

Signed-off-by: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>

   I cannot ACK this patch despite it being authored by me.

Signed-off-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>

David, I have to ask you again at least not to replace my patch description, as in this case you've ruined the description.

Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

WBR, Sergei
--
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