Re: [PATCH 1/1] usb: typec: tcpm: fix logbuffer index is wrong if _tcpm_log is re-entered

2018-06-12 Thread Guenter Roeck
On 06/11/2018 06:53 PM, Peter Chen wrote: The port->logbuffer_head may be wrong if the two processes enters _tcpm_log at the mostly same time. The 2nd process enters _tcpm_log before the 1st process update the index, then the 2nd process will not allocate logbuffer, when the 2nd process tries to

Re: [PATCH 1/1] usb: typec: tcpm: fix logbuffer index is wrong if _tcpm_log is re-entered

2018-06-12 Thread Heikki Krogerus
On Tue, Jun 12, 2018 at 09:53:01AM +0800, Peter Chen wrote: > The port->logbuffer_head may be wrong if the two processes enters > _tcpm_log at the mostly same time. The 2nd process enters _tcpm_log > before the 1st process update the index, then the 2nd process will > not allocate logbuffer, when

[PATCH 1/1] usb: typec: tcpm: fix logbuffer index is wrong if _tcpm_log is re-entered

2018-06-11 Thread Peter Chen
The port->logbuffer_head may be wrong if the two processes enters _tcpm_log at the mostly same time. The 2nd process enters _tcpm_log before the 1st process update the index, then the 2nd process will not allocate logbuffer, when the 2nd process tries to use log buffer, the index has already