[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: hidclass.sys: Properly quit hid_device_thread when bothcompletion event and halt event are signa
From:       "=?utf-8?B?Q2hhbmdodWkgTElV?=" <liuchanghui () linuxdeepin ! com>
Date:       2015-12-29 3:21:14
Message-ID: tencent_1B866E943A017B421A77BD6C () qq ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]

[Attachment #4 (text/plain)]

You are right, thank you. I have send a new patch now.






------------------
Regards,
Changhui Liu
 


 
 
 
------------------ Original ------------------
From:  "Aric Stewart"<aric@codeweavers.com>;
Date:  Mon, Dec 28, 2015 11:55 PM
To:  "wine-devel"<wine-devel@winehq.org>; "liuchanghui"<liuchanghui@linuxdeepin.com>; \


Subject:  Re: hidclass.sys: Properly quit hid_device_thread when bothcompletion event \
and halt event are signaled.

 
Sorry for the delayed review, I have been traveling.

I understand the issue your trying to fix, but I worry that you could get yourself \
into a bad state where if a driver is misbehaving and is blocked or crashes while \
processing an IRP then the halt event will never get processed as we will be waiting \
INFINITE on an event that may never come. 

I dont know which is the more likely or problematic case. 

What I may suggest is keep the WaitForMultipleObjects(2, events, FALSE, INFINITE) and \
instead of relying on the return code you could do an additional  \
WaitForSingleObject(ext->halt_event, 0) to determine if exit_now should be set. 

-aric


[Attachment #5 (text/html)]

<div>You are right, thank you.&nbsp;<span style="line-height: 1.5;">I have send a new \
patch now.</span></div><div><br></div><div><sign signid="0"><div \
style="color:#909090;font-family:Arial \
Narrow;font-size:12px"><br><br><br><br>------------------</div><div \
style="font-size:14px;font-family:Verdana;color:#000;"><div>Regards,</div><div>Changhui \
Liu</div> </div></sign></div><div><qzone></qzone></div><div>&nbsp;</div><div><includetail><div>&nbsp;</div><div>&nbsp;</div><div \
style="font:Verdana normal 14px;color:#000;"><div style="FONT-SIZE: 12px;FONT-FAMILY: \
Arial Narrow;padding:2px 0 2px \
0;">------------------&nbsp;Original&nbsp;------------------</div><div \
style="FONT-SIZE: 12px;background:#efefef;padding:8px;"><div \
id="menu_sender"><b>From: </b>&nbsp;"Aric \
Stewart"&lt;aric@codeweavers.com&gt;;</div><div><b>Date: </b>&nbsp;Mon, Dec 28, 2015 \
11:55 PM</div><div><b>To: </b>&nbsp;"wine-devel"&lt;wine-devel@winehq.org&gt;; \
"liuchanghui"&lt;liuchanghui@linuxdeepin.com&gt;; \
<wbr></div><div></div><div><b>Subject: </b>&nbsp;Re: hidclass.sys: Properly quit \
hid_device_thread when bothcompletion event and halt event are \
signaled.</div></div><div>&nbsp;</div>Sorry for the delayed review, I have been \
traveling.<br><br>I understand the issue your trying to fix, but I worry that you \
could get yourself into a bad state where if a driver is misbehaving and is blocked \
or crashes while processing an IRP then the halt event will never get processed as we \
will be waiting INFINITE on an event that may never come. <br><br>I dont know which \
is the more likely or problematic case. <br><br>What I may suggest is keep the \
WaitForMultipleObjects(2, events, FALSE, INFINITE) and instead of relying on the \
return code you could do an additional <br>WaitForSingleObject(ext-&gt;halt_event, 0) \
to determine if exit_now should be set. \
<br><br>-aric<br><br></div><!--<![endif]--></includetail></div>





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic