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

Re: [PATCH] xencontrol: Fix return values and simplify failure paths


  • To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Paul Durrant <xadimgnik@xxxxxxxxx>
  • Date: Mon, 25 Mar 2024 09:28:00 +0000
  • Delivery-date: Mon, 25 Mar 2024 09:28:09 +0000
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

On 15/03/2024 10:11, Rafał Wojdyła wrote:
XcGnttabRevokeForeignAccess() and XcGnttabUnmapForeignPages()
could return error values even when the calls succeeded. This was because
GetLastError() was used to get the return value even if the previous call
to DeviceIoControl() succeeded.

This commit also reworks all xencontrol functions to use simpler control
paths in failure cases.

Signed-off-by: Rafał Wojdyła <omeg@xxxxxxxxxxxxxxxxxxxxxx>
---
  src/xencontrol/xencontrol.c | 268 ++++++++++++++++--------------------
  1 file changed, 116 insertions(+), 152 deletions(-)


Acked-by: Paul Durrant <paul@xxxxxxx>




 


Rackspace

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