2002-02-20 18:17:40

by Miles Lane

[permalink] [raw]
Subject: 2.5.5 -- filesystems.c:30: In function `sys_nfsservctl': dereferencing pointer to incomplete type

This has been reported by someone else, but the .config
information was not included in the report. Hopefully,
this will help.

Here you go:

CONFIG_QUOTA=y
CONFIG_AUTOFS4_FS=y
CONFIG_EXT3_FS=y
CONFIG_JBD=y
CONFIG_JBD_DEBUG=y
CONFIG_FAT_FS=m
CONFIG_VFAT_FS=m
CONFIG_RAMFS=y
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_PROC_FS=y
CONFIG_DEVPTS_FS=y
CONFIG_EXT2_FS=y

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common
-pipe -mpreferred-stack-boundary=2 -march=athlon
-DKBUILD_BASENAME=filesystems -DEXPORT_SYMTAB -c filesystems.c
filesystems.c: In function `sys_nfsservctl':
filesystems.c:30: dereferencing pointer to incomplete type
filesystems.c:30: dereferencing pointer to incomplete type
filesystems.c:30: warning: value computed is not used
filesystems.c:32: dereferencing pointer to incomplete type
filesystems.c:33: dereferencing pointer to incomplete type
filesystems.c:33: dereferencing pointer to incomplete type
filesystems.c:33: warning: value computed is not used
make[2]: *** [filesystems.o] Error 1
make[2]: Leaving directory `/usr/src/linux/fs'



2002-02-20 20:02:20

by Steven Cole

[permalink] [raw]
Subject: Re: 2.5.5 -- filesystems.c:30: In function `sys_nfsservctl': dereferencing pointer to incomplete type

On Wednesday 20 February 2002 11:13 am, Miles Lane wrote:
> This has been reported by someone else, but the .config
> information was not included in the report. Hopefully,
> this will help.

[Config info snipped]

>
> gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes
> -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common
> -pipe -mpreferred-stack-boundary=2 -march=athlon
> -DKBUILD_BASENAME=filesystems -DEXPORT_SYMTAB -c filesystems.c
> filesystems.c: In function `sys_nfsservctl':
> filesystems.c:30: dereferencing pointer to incomplete type

You could try this small patch. The 2.5.5-pre1 version of filesystems.c
used #if defined (CONFIG_NFSD_MODULE) around most of this code,
so perhaps this will be correct.

Steven

--- linux-2.5.5/fs/filesystems.c.orig Wed Feb 20 07:52:36 2002
+++ linux-2.5.5/fs/filesystems.c Wed Feb 20 12:35:42 2002
@@ -22,7 +22,7 @@
{
int ret = -ENOSYS;

-#if defined(CONFIG_MODULES)
+#if defined(CONFIG_NFSD_MODULE)
lock_kernel();

if (nfsd_linkage ||


2002-02-20 20:28:34

by NeilBrown

[permalink] [raw]
Subject: Re: 2.5.5 -- filesystems.c:30: In function `sys_nfsservctl': dereferencing pointer to incomplete type

On February 20, [email protected] wrote:
> This has been reported by someone else, but the .config
> information was not included in the report. Hopefully,
> this will help.
>
> Here you go:
....
>
> gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes
> -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common
> -pipe -mpreferred-stack-boundary=2 -march=athlon
> -DKBUILD_BASENAME=filesystems -DEXPORT_SYMTAB -c filesystems.c
> filesystems.c: In function `sys_nfsservctl':
> filesystems.c:30: dereferencing pointer to incomplete type
> filesystems.c:30: dereferencing pointer to incomplete type
...

Opps, my mistake.

Please try this.

NeilBrown



--- ./include/linux/nfsd/interface.h 2002/02/18 22:58:10 1.3
+++ ./include/linux/nfsd/interface.h 2002/02/20 20:25:55
@@ -138,7 +138,8 @@



-#ifdef CONFIG_NFSD_MODULE
+#ifndef CONFIG_NFSD
+#ifdef CONFIG_MODULE

extern struct nfsd_linkage {
long (*do_nfsservctl)(int cmd, void *argp, void *resp);
@@ -155,13 +156,11 @@
# define nfsd_find_fh_dentry (nfsd_linkage->find_fh_dentry)

#else
-# ifndef CONFIG_NFSD
# define nfsd_find_fh_dentry(a,b,c,d,e) *((char*)0)=0
/* filesystems can use "#ifndef NO_CONFIG_NFSD" to exclude code that is only needed
* by knfsd
*/
# define NO_CONFIG_NFSD
-# endif
#endif

#endif /* LINUX_NFSD_INTERFACE_H */

2002-02-20 20:51:36

by Robert Love

[permalink] [raw]
Subject: Re: 2.5.5 -- filesystems.c:30: In function `sys_nfsservctl': dereferencing pointer to incomplete type

On Wed, 2002-02-20 at 15:27, Neil Brown wrote:

> Opps, my mistake.
>
> Please try this.

This does not apply to my include/linux/nfsd/interface.h ?

In 2.5.5, that file is 24 lines long. The first hunk applies, but the
second, at line 155, obviously does not.

Robert Love

2002-02-20 21:06:58

by Miles Lane

[permalink] [raw]
Subject: Re: 2.5.5 -- filesystems.c:30: In function `sys_nfsservctl': dereferencing pointer to incomplete type

On Wed, 2002-02-20 at 12:51, Robert Love wrote:
> On Wed, 2002-02-20 at 15:27, Neil Brown wrote:
>
> > Opps, my mistake.
> >
> > Please try this.
>
> This does not apply to my include/linux/nfsd/interface.h ?
>
> In 2.5.5, that file is 24 lines long. The first hunk applies, but the
> second, at line 155, obviously does not.

FWIW, when I compiled using Steven Cole's patch, it compiles.
I haven't run the kernel yet, though.

--- linux-2.5.5/fs/filesystems.c.orig Wed Feb 20 07:52:36 2002
+++ linux-2.5.5/fs/filesystems.c Wed Feb 20 12:35:42 2002
@@ -22,7 +22,7 @@
{
int ret = -ENOSYS;

-#if defined(CONFIG_MODULES)
+#if defined(CONFIG_NFSD_MODULE)
lock_kernel();

if (nfsd_linkage ||



2002-02-20 23:44:07

by NeilBrown

[permalink] [raw]
Subject: Re: 2.5.5 -- filesystems.c:30: In function `sys_nfsservctl': dereferencing pointer to incomplete type

On February 20, [email protected] wrote:
> On Wed, 2002-02-20 at 15:27, Neil Brown wrote:
>
> > Opps, my mistake.
> >
> > Please try this.
>
> This does not apply to my include/linux/nfsd/interface.h ?
>
> In 2.5.5, that file is 24 lines long. The first hunk applies, but the
> second, at line 155, obviously does not.

Post in haste ... repent at leisure....

I made that patch against my current, heavily patches tree as I though
that the changes to interface.h wouldn't conflict... I was wrong.

The correct patch, which applies against 2.5.5 and compiles with out
errors for several combinationg of CONFIG_MODULES enabled or not, and
CONFIG_NFSD being Y, M, or N, is below.

NeilBrown



----------- Diffstat output ------------
./include/linux/nfsd/interface.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)

--- ./include/linux/nfsd/interface.h 2002/02/20 21:58:11 1.1
+++ ./include/linux/nfsd/interface.h 2002/02/20 23:35:19 1.2
@@ -12,13 +12,15 @@

#include <linux/config.h>

-#ifdef CONFIG_NFSD_MODULE
+#ifndef CONFIG_NFSD
+#ifdef CONFIG_MODULES

extern struct nfsd_linkage {
long (*do_nfsservctl)(int cmd, void *argp, void *resp);
struct module *owner;
} * nfsd_linkage;

+#endif
#endif

#endif /* LINUX_NFSD_INTERFACE_H */

>
> Robert Love

2002-02-21 00:51:35

by Robert Love

[permalink] [raw]
Subject: Re: 2.5.5 -- filesystems.c:30: In function `sys_nfsservctl': dereferencing pointer to incomplete type

On Wed, 2002-02-20 at 18:43, Neil Brown wrote:

> Post in haste ... repent at leisure....
>
> I made that patch against my current, heavily patches tree as I though
> that the changes to interface.h wouldn't conflict... I was wrong.
>
> The correct patch, which applies against 2.5.5 and compiles with out
> errors for several combinationg of CONFIG_MODULES enabled or not, and
> CONFIG_NFSD being Y, M, or N, is below.

Worked for me, at least in my combination (CONFIG_MODULE=y,
CONFIG_NFSD=n). Thanks.

Don't forget to pass it to Linus ;)

Robert Love