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: <1165588271.8686.8.camel@kleikamp.austin.ibm.com>
Date:	Fri, 08 Dec 2006 08:31:11 -0600
From:	Dave Kleikamp <shaggy@....vnet.ibm.com>
To:	Randy Dunlap <randy.dunlap@...cle.com>
Cc:	lkml <linux-kernel@...r.kernel.org>, akpm <akpm@...l.org>
Subject: Re: [PATCH] freezer.h uses task_struct fields

On Thu, 2006-12-07 at 22:13 -0800, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@...cle.com>
> 
> freezer.h uses task_struct fields so it should include sched.h.
> 
>   CC [M]  fs/jfs/jfs_txnmgr.o
> In file included from fs/jfs/jfs_txnmgr.c:49:
> include/linux/freezer.h: In function 'frozen':
> include/linux/freezer.h:9: error: dereferencing pointer to incomplete type
> include/linux/freezer.h:9: error: 'PF_FROZEN' undeclared (first use in this function)
> include/linux/freezer.h:9: error: (Each undeclared identifier is reported only once
> include/linux/freezer.h:9: error: for each function it appears in.)
> include/linux/freezer.h: In function 'freezing':
> include/linux/freezer.h:17: error: dereferencing pointer to incomplete type
> include/linux/freezer.h:17: error: 'PF_FREEZE' undeclared (first use in this function)
> include/linux/freezer.h: In function 'freeze':
> include/linux/freezer.h:26: error: dereferencing pointer to incomplete type
> include/linux/freezer.h:26: error: 'PF_FREEZE' undeclared (first use in this function)
> include/linux/freezer.h: In function 'do_not_freeze':
> include/linux/freezer.h:34: error: dereferencing pointer to incomplete type
> include/linux/freezer.h:34: error: 'PF_FREEZE' undeclared (first use in this function)
> include/linux/freezer.h: In function 'thaw_process':
> include/linux/freezer.h:43: error: dereferencing pointer to incomplete type
> include/linux/freezer.h:43: error: 'PF_FROZEN' undeclared (first use in this function)
> include/linux/freezer.h:44: warning: implicit declaration of function 'wake_up_process'
> include/linux/freezer.h: In function 'frozen_process':
> include/linux/freezer.h:55: error: dereferencing pointer to incomplete type
> include/linux/freezer.h:55: error: dereferencing pointer to incomplete type
> include/linux/freezer.h:55: error: 'PF_FREEZE' undeclared (first use in this function)
> include/linux/freezer.h:55: error: 'PF_FROZEN' undeclared (first use in this function)
> fs/jfs/jfs_txnmgr.c: In function 'freezing':
> include/linux/freezer.h:18: warning: control reaches end of non-void function
> make[2]: *** [fs/jfs/jfs_txnmgr.o] Error 1

Defining CONFIG_SMP or CONFIG_PREEMPT masks this problem (at least in
jfs), since smp_lock.h will include sched.h when CONFIG_LOCK_KERNEL is
defined, and smp_lock.h happens to be included by jfs_txngmr.c before
freezer.h.

> 
> Signed-off-by: Randy Dunlap <randy.dunlap@...cle.com>

Acked-by: Dave Kleikamp <shaggy@...ux.vnet.ibm.com>

> ---
>  include/linux/freezer.h |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- linux-2.6.19-git11.orig/include/linux/freezer.h
> +++ linux-2.6.19-git11/include/linux/freezer.h
> @@ -1,5 +1,7 @@
>  /* Freezer declarations */
> 
> +#include <linux/sched.h>
> +
>  #ifdef CONFIG_PM
>  /*
>   * Check if a process has been frozen
> 
> 


-
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