On 2022/11/23 22:57, Marcelo Ricardo Leitner wrote: > On Wed, Nov 23, 2022 at 07:36:00PM +0900, Tetsuo Handa wrote: >> syzbot is reporting memory leak on sctp_stream_priorities , for >> sctp_stream_outq_migrate() is resetting SCTP_SO(stream, i)->ext to NULL >> without clearing SCTP_SO(new, i)->ext->prio_head list allocated by >> sctp_sched_prio_new_head(). Since sctp_sched_prio_free() is too late to >> clear if stream->outcnt was already shrunk or SCTP_SO(stream, i)->ext >> was already NULL, add a callback for clearing that list before shrinking >> stream->outcnt and/or resetting SCTP_SO(stream, i)->ext. >> >> Link: https://syzkaller.appspot.com/bug?exrid=29c402e56c4760763cc0  >> Reported-by: syzbot <syzbot+29c402e56c4760763cc0@xxxxxxxxxxxxxxxxxxxxxxxxx> >> Signed-off-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> >> --- >> I can observe that the reproducer no longer reports memory leak. But >> is this change correct and sufficient? Are there similar locations? > > Thanks, but please see my email from yesterday. This is on the right > way but a cleanup then is possible: > https://lore.kernel.org/linux-sctp/Y31ct%2FlSXNTm9ev9@t14s.localdomain/ Oops, duplicated work again. Googling with this address did not hit, and a thread at syzkaller-bugs group did not have your patch. Please consider including syzbot+XXXXXXXXXXXXXXXXXXXX@xxxxxxxxxxxxxxxxxxxxxxxxx and syzkaller-bugs@xxxxxxxxxxxxxxxx into the Cc: list so that we can google for your patch.