Re: [PATCH v2] jbd2: fix potential double free

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

 



On Fri, May 10, 2019 at 06:36:48PM +0800, Chengguang Xu wrote:
> diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
> index 37e16d969925..0f1ac43d0560 100644
> --- a/fs/jbd2/journal.c
> +++ b/fs/jbd2/journal.c
> @@ -2299,7 +2299,7 @@ static void jbd2_journal_destroy_slabs(void)
>  	}
>  }
>  
> -static int jbd2_journal_create_slab(size_t size)
> +static int __init jbd2_journal_create_slab(size_t size)
>  {
>  	static DEFINE_MUTEX(jbd2_slab_create_mutex);
>  	int i = order_base_2(size) - 10;

I had to remove this hunk.  It's incorrect, since jbd2_journal_load
calls this function when mounting file systems.  So it can't be marked
__init.

						- Ted



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux