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-next>] [day] [month] [year] [list]
Date:	Tue, 15 Dec 2009 16:47:39 -0800
From:	Greg KH <greg@...ah.com>
To:	Milan Broz <mbroz@...hat.com>, Alasdair G Kergon <agk@...hat.com>
Cc:	linux-kernel@...r.kernel.org, dm-devel@...hat.com
Subject: Re: dm: sysfs add empty release function to avoid debug warning

On Tue, Dec 15, 2009 at 05:35:08PM +0000, James Bottomley wrote:
> commit: d2bb7df8cac647b92f51fb84ae735771e7adbfa7
> From: Milan Broz <mbroz@...hat.com>
> Date: Thu, 10 Dec 2009 23:51:53 +0000
> Subject: [PATCH] dm: sysfs add empty release function to avoid debug warning
> 
> This patch just removes an unnecessary warning:
>  kobject: 'dm': does not have a release() function,
>  it is broken and must be fixed.
> 
> The kobject is embedded in mapped device struct, so
> code does not need to release memory explicitly here.

Oh no you did not!

Come on people, do you think that the kernel is just randomly spitting
out warnings because it fricken feels like it!

No, please revert this patch now before someone does it for you.

Please, this is totally and completly wrong.  And if you feel that it is
needed, then your design is wrong and it needs to be fixed.

And note, as per the Documentation/kobject.txt file, you were warned
about this public mocking, next time it will be harsher.

Heh, and you tried to get this into a -stable kernel release, as if.

Patch left below so that others can mock.

bah,

greg k-h

> 
> Cc: stable@...nel.org
> Signed-off-by: Milan Broz <mbroz@...hat.com>
> Signed-off-by: Alasdair G Kergon <agk@...hat.com>
> ---
>  drivers/md/dm-sysfs.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/md/dm-sysfs.c b/drivers/md/dm-sysfs.c
> index 4b04590..b000de3 100644
> --- a/drivers/md/dm-sysfs.c
> +++ b/drivers/md/dm-sysfs.c
> @@ -80,12 +80,20 @@ static struct sysfs_ops dm_sysfs_ops = {
>  };
>  
>  /*
> + * The sysfs structure is embedded in md struct, nothing to do here
> + */
> +static void dm_sysfs_release(struct kobject *kobj)
> +{
> +}
> +
> +/*
>   * dm kobject is embedded in mapped_device structure
>   * no need to define release function here
>   */
>  static struct kobj_type dm_ktype = {
>  	.sysfs_ops	= &dm_sysfs_ops,
>  	.default_attrs	= dm_attrs,
> +	.release	= dm_sysfs_release
>  };
>  
>  /*
> 
> _______________________________________________
> stable mailing list
> stable@...ux.kernel.org
> http://linux.kernel.org/mailman/listinfo/stable
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ