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]
Message-Id: <20091230152958.9b6e174e.akpm@linux-foundation.org>
Date:	Wed, 30 Dec 2009 15:29:58 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Rakib Mullick <rakib.mullick@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Lee Schermerhorn <lee.schermerhorn@...com>
Subject: Re: [PATCH] hugetlb: Fix section mismatch warning in hugetlb.c

On Thu, 24 Dec 2009 09:05:48 +0600
Rakib Mullick <rakib.mullick@...il.com> wrote:

>     The patch titled hugetlb-add-per-node-hstate-attributes.patch introduces
>  the following section mismatch warning, due to a reference form non-init
> function hugetlb_register_node to a init function hugetlb_sysfs_add_hstate.
> 
> LD      mm/built-in.o
> WARNING: mm/built-in.o(.text+0x5396d): Section mismatch in reference
> from the function hugetlb_register_node() to the function
> .init.text:hugetlb_sysfs_add_hstate()
> The function hugetlb_register_node() references
> the function __init hugetlb_sysfs_add_hstate().
> This is often because hugetlb_register_node lacks a __init
> annotation or the annotation of hugetlb_sysfs_add_hstate is wrong.
> 
> ---
> Signed-off-by: Rakib Mullick <rakib.mullick@...il.com>
> 
> --- linus/mm/hugetlb.c	2009-12-18 15:52:35.000000000 +0600
> +++ rakib/mm/hugetlb.c	2009-12-23 20:37:16.000000000 +0600
> @@ -1515,7 +1515,7 @@ static struct attribute_group hstate_att
>  	.attrs = hstate_attrs,
>  };
> 
> -static int __init hugetlb_sysfs_add_hstate(struct hstate *h,
> +static int hugetlb_sysfs_add_hstate(struct hstate *h,
>  				struct kobject *parent,
>  				struct kobject **hstate_kobjs,
>  				struct attribute_group *hstate_attr_group)

I would be better to fix it the other way.  AFACIT,
hugetlb_register_node() and both versions of
hugetlb_register_all_nodes() should be marked __init.

--
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