Re: [PATCH v2] x86/xen: Add some null pointer checking to smp.c

2024-01-22 Thread Kunwu Chan
On 2024/1/22 16:30, Dan Carpenter wrote: On Fri, Jan 19, 2024 at 05:22:25PM +0800, Kunwu Chan wrote: On 2024/1/17 18:40, Markus Elfring wrote: kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking

Re: [PATCH v3] x86/xen: Add some null pointer checking to smp.c

2024-01-21 Thread Kunwu Chan
On 2024/1/19 18:40, Markus Elfring wrote: kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. … --- Changes in v3: - Remove rc initialization - Simply error paths by

Re: [PATCH v3] x86/xen: Add some null pointer checking to smp.c

2024-01-21 Thread Kunwu Chan
On 2024/1/20 22:45, Markus Elfring wrote: kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. How do you think about to refer to the function name instead of the file name in the

Re: [PATCH v2] x86/xen: Add some null pointer checking to smp.c

2024-01-20 Thread Kunwu Chan
On 2024/1/17 18:40, Markus Elfring wrote: kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. … +++ b/arch/x86/xen/smp.c @@ -61,10 +61,14 @@ void xen_smp_intr_free(unsigned int cpu)

[PATCH v3] x86/xen: Add some null pointer checking to smp.c

2024-01-20 Thread Kunwu Chan
kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Signed-off-by: Kunwu Chan Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401161119.iof6bqsf

[PATCH] x86/xen: Fix some null pointer dereference issues in smp.c

2024-01-17 Thread Kunwu Chan
kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Signed-off-by: Kunwu Chan --- arch/x86/xen/smp.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/x86/xen/smp.c b

[PATCH v2] x86/xen: Add some null pointer checking to smp.c

2024-01-17 Thread Kunwu Chan
kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Signed-off-by: Kunwu Chan Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401161119.iof6bqsf