[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH] Fix div by zero in xenvif if no queues.
- To: "paul@xxxxxxx" <paul@xxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Martin Harvey <martin.harvey@xxxxxxxxxx>
- Date: Mon, 21 Mar 2022 16:18:52 +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=C9vFh7eDYDzDmbYhtEIZeYsPxpsf6ZdkEThYUdsyom4=; b=gXmbr3BdTsq05/gSN/eRLA1/XPmNINtWvdkIIPy+6Cbm5OgoFWBgRtsPH6zgzVCmVKp9giAA3+lUXb7Y+wNwvbISQ+v0HTWzgvkeaAOEAMbaS2JAco2wt8aSetUdEA35XpUD4hCooPM/tD4G2SY4HA3hrPZWrEePQ2UTBI4y+VA83e80baYgYH58IpGrBtc8Mdr0TmvijM9pj+6EHdFCUdulVVBviQeMc0pPHSTvcvAfhPixWhAqKssnnfUt9TUJMhWGMXscgLn9g9TzSwjjmZ4kPUPnpaMzi4jzvLD5JEIJVKtryOYH+qKxwWVgCRk3dVVjM3Q7zhVwZ+c+g69DTg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IO86fPWx80l8R7ImNNV3/Q7bE2yHvLqPI+To5ImHMNZBcVKZowCHJ8uqVA0hxwQVNTXTAF1rAapBBS8KzVw6xUhos5fePLJNwrFO48E6R68fBy+WOPSZS+VO9HUbV+QSgRh54nc3KcLB402aLODCBYuB1RngbCtTykvVJLB39lbbE4/AVLTAh4OBBqnJZ4mBtXKsxtL9GMBxGegpZGeLaH9DxSs7qb7vgaPSM1GZ2mZ57eerE60MS92gGYr1Mha9vYjefX00Q8Dw1uMpS1I6Bh0aLxS2hOzSWkI+s5aGL+hOH3Xwb2Sx+i/SXO2Xa0LnX5Zn4bpXAGxp32w5iUZDrw==
- Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Delivery-date: Mon, 21 Mar 2022 16:19:03 +0000
- Ironport-data: A9a23:JeaWLqvQQknTHPP2nHe4joHpqefnVC9eMUV32f8akzHdYApBsoF/q tZmKWGBM/ncNzOneYx+bIvn9UMD6MfTyNJhT1Bt/i43Ri4T+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZhSAgk/nOHNIQMcacUsxLbVYMpBwJ1FQyw4bVvqYy2YLjW1jX4 IuoyyHiEATNNwBcYzp8B52r8HuDjNyq0N/PlgVjDRzjlAa2e0g9VPrzF4noR5fLatA88tqBb /TC1NmEElbxpH/BPD8HfoHTKSXmSpaKVeSHZ+E/t6KK2nCurQRquko32WZ1he66RFxlkvgoo Oihu6BcRi8MBIPmnvQmdCBZLAd5fvBAx5PrIX+W5Jn7I03uKxMAwt1rBUAye4YZ5vx2ESdF8 vlwxDIlN07ZwbjsmfTiF7cq1p9LwMrDZevzvlllxCvFDPBgQZnZXajbzdRZwC0xloZFGvO2i 88xN2s2MU2eO0Qn1lE/OL9jh7rxiCXDb2N7rWnP+YUqzm/Y9VkkuFTqGIWMIYHbLSlPpW6Hp 2SD53q8DhwEOdi3zTue7mnqluLJhTn8Wo8ZCPu/7PECqEWa22g7GBAQE1yhrpGEZlWWAowFb RZOo2x38PZ0pBfDosTBswOQhUSqlBgMYP1pEtIc70LQzJX4zwaeLz1RJtJeU+AOuMgzTD0s8 1aGmdL1GDBi2IGopWKhGqS89m3rZ3VMRYMWTW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q9MFlVBw6du/22z6IJyYHBeA==
- List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
- Thread-index: AQHYOHVErur6M9Oay0m6lfwVxs2ql6zG/w8AgAMM6lA=
- Thread-topic: [PATCH] Fix div by zero in xenvif if no queues.
-----Original Message-----
From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of
Durrant, Paul
> There is locking that is supposed to stop that from happening.
> VifTransmitterQueuePacketVersion() calls AcquireMrswLockShared() to make sure
> that state is not changing underneath it.
Ah, yes, I see what you mean. The various frontend state changes are meant to
be synchronised under the VIF lock. (However I note that we may not be the only
VIF ....). And then there's a little bit of extra sync to do with the suspend /
resume early/late callbacks.
> It really should not happen at all.
OK. I'll look back through the logs a bit more carefully. I suspect that after
resuming from suspend, the frontend state is getting set to UNKNOWN outside the
VIF Mrsw lock. Possible candidates I shall take a look at:
1. VIF mrsw lock not correctly shared between all users of frontend state.
2. Any frontend state changes commanded by VBD? (Not looked yet).
3. Some error path which bypasses the VIF lock.
4. Some corner case / race condition with early/late suspend callbacks.
5. Changes to the frontend state commanded by other power callbacks which have
bypassed the VIF lock.
Those are all the potential holes I can think of off the top of my head ...
MH.
|