|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 1/3] xenbus/dma: fail on unknown DMA operations version
On 10/09/2026 18:13, david ambu wrote:
> Return STATUS_NOT_SUPPORTED instead of ASSERT(FALSE) when an unknown
> DMA operations size is encountered, preventing copy with unvalidated size.
>
> Assisted-by: ClaudeCode:claude-sonnet-4-6
> Signed-off-by: david ambu <david.preetham@xxxxxxxxxx>
I'm not too familiar with this code but it looks OK at first glance.
Acked-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
> ---
> src/xenbus/dma.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/src/xenbus/dma.c b/src/xenbus/dma.c
> index 206143e..07d4540 100644
> --- a/src/xenbus/dma.c
> +++ b/src/xenbus/dma.c
> @@ -1657,7 +1657,10 @@ DmaGetAdapter(
> break;
>
> default:
> - ASSERT(FALSE);
> + Error("Unknown DMA operations size %lu\n",
> + Context->LowerOperations->Size);
> + status = STATUS_NOT_SUPPORTED;
> + goto fail3;
> }
>
> // Copy in the requisite number of operations
> @@ -1688,6 +1691,11 @@ DmaGetAdapter(
> done:
> return Adapter;
>
> +fail3:
> + Error("fail3\n");
> +
> + DmaDestroyContext(Context);
> +
> fail2:
> Error("fail2\n");
>
--
Ngoc Tu Dinh | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |