All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/5] icmp6: Free ra in icmp6_client_read_handler on ECANCELED
@ 2022-01-06 15:05 Andrew Zaborowski
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Zaborowski @ 2022-01-06 15:05 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 1202 bytes --]

Make sure we free @ra in in icmp6_client_read_handler even when
icmp6_client_handle_message returns -ECANCELED.

Fixes this:
==1088== 1,176 bytes in 9 blocks are definitely lost in loss record 28 of 29
==1088==    at 0x4843839: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==1088==    by 0x4808A1: l_malloc (util.c:62)
==1088==    by 0x4C0966: icmp6_client_read_handler (icmp6.c:659)
==1088==    by 0x4877AF: io_callback (io.c:120)
==1088==    by 0x48693C: l_main_iterate (main.c:478)
==1088==    by 0x486A0B: l_main_run (main.c:525)
==1088==    by 0x486A0B: l_main_run (main.c:507)
==1088==    by 0x486C3F: l_main_run_with_signal (main.c:647)
==1088==    by 0x404755: main (main.c:532)
---
 ell/icmp6.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/ell/icmp6.c b/ell/icmp6.c
index 6b1652c..87e46d1 100644
--- a/ell/icmp6.c
+++ b/ell/icmp6.c
@@ -401,9 +401,7 @@ static bool icmp6_client_read_handler(struct l_io *io, void *userdata)
 	}
 
 	r = icmp6_client_handle_message(client, ra, l, &src);
-	if (r == -ECANCELED)
-		return true;
-	else if (r < 0)
+	if (r < 0)
 		goto done;
 
 	/* Stop solicitations */
-- 
2.32.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/5] icmp6: Free ra in icmp6_client_read_handler on ECANCELED
@ 2022-01-06 18:58 Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2022-01-06 18:58 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]

Hi Andrew,

On 1/6/22 09:05, Andrew Zaborowski wrote:
> Make sure we free @ra in in icmp6_client_read_handler even when
> icmp6_client_handle_message returns -ECANCELED.
> 
> Fixes this:
> ==1088== 1,176 bytes in 9 blocks are definitely lost in loss record 28 of 29
> ==1088==    at 0x4843839: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==1088==    by 0x4808A1: l_malloc (util.c:62)
> ==1088==    by 0x4C0966: icmp6_client_read_handler (icmp6.c:659)
> ==1088==    by 0x4877AF: io_callback (io.c:120)
> ==1088==    by 0x48693C: l_main_iterate (main.c:478)
> ==1088==    by 0x486A0B: l_main_run (main.c:525)
> ==1088==    by 0x486A0B: l_main_run (main.c:507)
> ==1088==    by 0x486C3F: l_main_run_with_signal (main.c:647)
> ==1088==    by 0x404755: main (main.c:532)
> ---
>   ell/icmp6.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 

I added an additional Fixes tag:

8cef9c50c9f4 ("icmp6: Don't crash if client was stopped")

Applied, thanks.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-06 18:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-06 15:05 [PATCH 2/5] icmp6: Free ra in icmp6_client_read_handler on ECANCELED Andrew Zaborowski
2022-01-06 18:58 Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.