lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 17 Jan 2011 12:09:03 -0600
From:	Eric Sandeen <sandeen@...hat.com>
To:	Lukas Czerner <lczerner@...hat.com>
CC:	linux-ext4@...r.kernel.org, tytso@....edu
Subject: Re: [PATCH] ext4: Unregister features interface on module unload

On 01/17/2011 09:00 AM, Lukas Czerner wrote:
> Ext4 features interface was not properly unregistered which led to
> problems while unloading/reloading ext4 module. This commit fixes that by
> adding proper kobject unregistration code into ext4_exit_fs() as well as
> fail-path of ext4_init_fs()
> 
> Signed-off-by: Lukas Czerner <lczerner@...hat.com>
> Reported-by: Eric Sandeen <sandeen@...hat.com>

Works for me!

Tested-by: Eric Sandeen <sandeen@...hat.com>

Thanks - probably needs to go to .37-stable too right?

-Eric

> ---
>  fs/ext4/super.c |   12 ++++++++++--
>  1 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index cb10a06..124d304 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -4779,7 +4779,7 @@ static struct file_system_type ext4_fs_type = {
>  	.fs_flags	= FS_REQUIRES_DEV,
>  };
>  
> -int __init ext4_init_feat_adverts(void)
> +static int __init ext4_init_feat_adverts(void)
>  {
>  	struct ext4_features *ef;
>  	int ret = -ENOMEM;
> @@ -4803,6 +4803,13 @@ out:
>  	return ret;
>  }
>  
> +static void ext4_exit_feat_adverts(void)
> +{
> +	kobject_put(&ext4_feat->f_kobj);
> +	wait_for_completion(&ext4_feat->f_kobj_unregister);
> +	kfree(ext4_feat);
> +}
> +
>  static int __init ext4_init_fs(void)
>  {
>  	int err;
> @@ -4849,7 +4856,7 @@ out1:
>  out2:
>  	ext4_exit_mballoc();
>  out3:
> -	kfree(ext4_feat);
> +	ext4_exit_feat_adverts();
>  	remove_proc_entry("fs/ext4", NULL);
>  	kset_unregister(ext4_kset);
>  out4:
> @@ -4868,6 +4875,7 @@ static void __exit ext4_exit_fs(void)
>  	destroy_inodecache();
>  	ext4_exit_xattr();
>  	ext4_exit_mballoc();
> +	ext4_exit_feat_adverts();
>  	remove_proc_entry("fs/ext4", NULL);
>  	kset_unregister(ext4_kset);
>  	ext4_exit_system_zone();

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ