Re: [PATCH] hw/net: prevent potential NULL dereference

2024-05-30 Thread David Gibson
On Thu, May 30, 2024 at 10:03:51AM +0100, Peter Maydell wrote: > On Thu, 30 May 2024 at 01:52, David Gibson > wrote: > > > > On Wed, May 29, 2024 at 02:07:18PM +0300, Oleg Sviridov wrote: > > > Pointer, returned from function 'spapr_vio_find_by_reg', may be NULL and > > > is dereferenced

Re: [PATCH] hw/net: prevent potential NULL dereference

2024-05-30 Thread Олег Свиридов
Thanks for review. Would it be correct to use hcall_dprintf() as in other functions of the module? For example, in h_add_logical_lan_buffer(). Best regards, Oleg. 29.05.2024 16:52, Philippe Mathieu-Daudé пишет: On 29/5/24 13:07, Oleg Sviridov wrote: Pointer, returned from function

Re: [PATCH] hw/net: prevent potential NULL dereference

2024-05-30 Thread Peter Maydell
On Thu, 30 May 2024 at 01:52, David Gibson wrote: > > On Wed, May 29, 2024 at 02:07:18PM +0300, Oleg Sviridov wrote: > > Pointer, returned from function 'spapr_vio_find_by_reg', may be NULL and is > > dereferenced immediately after. > > > > Found by Linux Verification Center (linuxtesting.org)

Re: [PATCH] hw/net: prevent potential NULL dereference

2024-05-29 Thread David Gibson
On Wed, May 29, 2024 at 02:07:18PM +0300, Oleg Sviridov wrote: > Pointer, returned from function 'spapr_vio_find_by_reg', may be NULL and is > dereferenced immediately after. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Signed-off-by: Oleg Sviridov > --- >

Re: [PATCH] hw/net: prevent potential NULL dereference

2024-05-29 Thread Philippe Mathieu-Daudé
On 29/5/24 13:07, Oleg Sviridov wrote: Pointer, returned from function 'spapr_vio_find_by_reg', may be NULL and is dereferenced immediately after. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Oleg Sviridov --- hw/net/spapr_llan.c | 4 1 file

[PATCH] hw/net: prevent potential NULL dereference

2024-05-29 Thread Oleg Sviridov
Pointer, returned from function 'spapr_vio_find_by_reg', may be NULL and is dereferenced immediately after. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Oleg Sviridov --- hw/net/spapr_llan.c | 4 1 file changed, 4 insertions(+) diff --git