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

RE: [PATCH] Correct return codes during racy destruction.


  • To: Paul Durrant <xadimgnik@xxxxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Martin Harvey <martin.harvey@xxxxxxxxxx>
  • Date: Tue, 8 Nov 2022 13:40:00 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L3RYAsztGI1kLmPbWa0Q2YJuPCzC3dVj16DWmNqpLhA=; b=BzcIE10eQsdeXDEsuBWhqwFT2lpuxhSOL5rr1g3cIqjWAPOTxi1gKA5/hweYZwQDuku8fJSrsXa/lK1p9OeHwOYUPByzUkFQdFrPJHrXJ1EX5cWQBLxhzS7Infs9s5YviU+gp53fJ3STJ3TdftTL/M3ISYGNJ/zKI0VR98dt+NQYGdFte0rGr3DtxcLxYnA8h8hCow2NKtQPbiY8TbgP1o50ypXhzLM9r241m34wGVTLKQAzdla4K7LnxVnQuzPXpJliNWf1Ofd6+rnddYzbLNQtO0oEskUA2rNB0gvbexXuClL3fXDeQ3a6hWJ5vxZi9eKKI1ft2A/4d6DRVD0Ydg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=by/jRiL1BR5t5BfstNe1Exlw9imPiAK/NmJxVFyN8lHDIF4D+ZgAslWMcjVQiiysY+XGdYHTTvd9kpkiQHyTKmydnGhtLPakoXBzu+7lfe/1+8tIa6dD3lTJO0+iCKCzILYdyIbnGDV+KNaCfEzkEX+dttHwwNeOF1oNUNd9n4w6B7XEWj+tDNvxHTWKdeeteBrUX1s2M9+25RLEPKKIGcJKvUql0n8JyIrgPlOS5heHGDFh+XPmy0gGoQ2BFReUciDJOzpixEMXS/FmEQm2cMv/nBLHMzSxqBBWM80Y7iNejJAf5I/EDoEE0ciNMW0Wqyb6syZMiA5u/5Pri3a/Vw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Delivery-date: Tue, 08 Nov 2022 13:40:12 +0000
  • Ironport-data: A9a23:CMHMCqB0JmJxkxVW/zPiw5YqxClBgxIJ4kV8jS/XYbTApG8mgWQGn zBNWGmBPvyLamD3L4gkaYnl80wBupHVm4NjQQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8nk/nNHuCnYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbyRFtcpvlDs15K6o4WpA7gRnDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3kW0aZuoNcrLZUj2CA6IoKvn3bEmp1T4E8K0YIw4ct7OU0Nx cEhMGpccUiMu93o8pXrVbw57igjBJGD0II3nFhFlGicJ9B2BJfJTuPN+MNS2yo2ioZWB/HCa sEFaD1pKhPdfxlIPVRRA5U79AuqriCnL3sE9xTI9exuvTi7IA9ZidABNPLQc8aWRMMTnk+Cu G/X12/4HgsbJJqUzj/tHneE1rOTxX+nCdh6+LuQ1dBWw0GI3WEvOSYtSACbj/6zskjncocKQ 6AT0m90xUQoz2S7R9X8WhK+oX2ssRsVWt4WGOo/gCmSy6yR+xjcCmUaQzppbN09qNRwVTEsz kWOnd7iGXpoqrL9dJ6G3rKdrDf3My5FK2YHPHYAVVFcvYmlp5wvhBXSSNolCLSyktD+BTD3x XaNsTQ6gLIQy8UM0s1X4Gz6vt5lnbCRJiZd2+kddjvNAt9RDGJ9W7GV1A==
  • Ironport-hdrordr: A9a23:NgcAfqDU170H4BXlHegSsceALOsnbusQ8zAXPh9KJCC9I/bzqy nxpp8mPEfP+U4ssQIb6Ku90c67MDjhHP9OkMEs1NKZMDUO11HYSL2KgbGC/9SkIVyGygc/79 YrT0EdMqyWMbESt6+Tj2eF+pQbsb+6GcuT9ITjJgJWPGRXgtZbnmVE42igcnFedU1jP94UBZ Cc7s1Iq36LYnIMdPm2AXEDQqzqu8DLvIiOW29LOzcXrC21yR+44r/zFBaVmj0EVSlU/Lsk+W /Z1yTk+6SYte2hwBO07R6d030Woqqu9jJwPr3NtiEnEESutu9uXvUiZ1S2hkF1nAho0idurD CDmWZlAy050QKqQoj8m2qR5+Cn6kdi15aq8y7lvVLz5cP+Xz40EMxHmMZQdQbY8VMpuJVm3L tMxH/xjeshMfrsplWJ2zHzbWAfqmOk5X451eIDhX1WVoUTLLdXsIwE5UtQVJMNBjjz5owrGP RnSJi03oceTXqKK3TC+mV/yt2lWXo+Wh+AX0gZo8SQlzxbhmpwwUcUzNEW2n0A6JU+QZ9Z4P msCNUfqJheCssNKa5tDuYIRsW6TmTLXBLXKWqXZU/qEakWUki92aIfII9Fl91CVKZ4vafawq 6xL2+wnVRCBX7GGImJwIBB9AzLTSG0QSnto/sul6REhg==
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
  • Thread-index: AQHY81+9qLsOJ2hQ9EGiZ4lsMUPqyq403zSAgAAlRoA=
  • Thread-topic: [PATCH] Correct return codes during racy destruction.


-----Original Message-----
From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of 
Paul Durrant
Sent: 08 November 2022 11:12
To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
Subject: Re: [PATCH] Correct return codes during racy destruction.

> [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments 
> unless you have verified the sender and know the content is safe.
>
>
> Can we have an explanatory commit comment? How did you discover the races 
> (since the HLK/WLK has not complained before AFAIK)? What is the fall-out of 
> the race? BSOD?

Sure - If you're happy with this, I'll amend the commit messages and resubmit 
the patches (third time lucky!)

Citrix are now testing PV drivers with checked builds and driver verifier. This 
checks return codes for PnP IRP's. Drivers must complete IRP_MN_REMOVE_DEVICE 
and IRP_MN_SURPRISE_REMOVAL with STATUS_SUCCESS.

Unfortunately, it is possible to receive later PnP requests for these IRPs 
after  __FdoSetDevicePnpState(Fdo, Deleted), and before IoDeleteDevice for the 
FDO, possibly during the call to lower level drivers. Since the FDO is 
irrevocably on the deletion path, we fail these requests with 
STATUS_NO_SUCH_DEVICE, however, MSDN indicates we should always succeed these 
requests (even if they are a duplicate), and failure to do so results in a 
driver verifier bugcheck.

MH.

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.