Re: [PATCH] dccp: Fix possible memleak in dccp_init and dccp_fini

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Wang Hai <wanghai38@xxxxxxxxxx>
Date: Tue, 9 Jun 2020 22:18:16 +0800

> There are some memory leaks in dccp_init() and dccp_fini().
> 
> In dccp_fini() and the error handling path in dccp_init(), free lhash2
> is missing. Add inet_hashinfo2_free_mod() to do it.
> 
> If inet_hashinfo2_init_mod() failed in dccp_init(),
> percpu_counter_destroy() should be called to destroy dccp_orphan_count.
> It need to goto out_free_percpu when inet_hashinfo2_init_mod() failed.
> 
> Fixes: c92c81df93df ("net: dccp: fix kernel crash on module load")
> Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
> Signed-off-by: Wang Hai <wanghai38@xxxxxxxxxx>

Applied and queued up for -stable, thank you.



[Index of Archives]     [Linux Kernel]     [IETF DCCP]     [Linux Networking]     [Git]     [Security]     [Linux Assembly]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux