Re: enbd_ioctl 2.6.9 kernel fails to modprobe enbd - seg fault

"Peter T. Breuer" <[email protected]> Thu, 2 Mar 2006 00:29:46 +0100 (MET)
Newsgroups gmane.linux.enbd.general
Message-ID <[email protected]>
"Also sprach scunacc:"
> Dear Peter et al.
> 
> I am having a problem with building ebnd and a 2.6.9 kernel.

It shouldn't fail - I compile against 2.6.8 and 2.6.12 (for example)
with no problems. Is there something special about 2.6.9 that would
cause a problem?

> The compiler rev there is: gcc version 4.0.0 20050519 (Red Hat 4.0.0-8)

I wouldn't trust that an inch, but that said, it's probably just
complaining about something I don't notice. Can you show meteh compile
problem?


> which led me to move a couple of the static function definitions from
> their placement inside functions to just before them. gcc 4 is picky
> that way.

Can you let me see the error? There's nothing wrong with a local static
fn.

> Noting a couple of changes mentioned by others, I also put the 
> 
>  > #ifdef __KERNEL_STRICT_NAMES
>  >
>  > #ifdef __CHECKER__
>  > #define __bitwise __attribute__((bitwise))
>  > #else
>  > #define __bitwise
>  > #endif

I've  no idea about that. Never heard of it!

>  > typedef __u16 __bitwise __le16;
>  > typedef __u16 __bitwise __be16;
>  > typedef __u32 __bitwise __le32;
>  > typedef __u32 __bitwise __be32;
>  > typedef __u64 __bitwise __le64;
>  > typedef __u64 __bitwise __be64;

Uh ... none of those are used aywhere, are they? It sounds to me
like you have some RH adaptations in the kernel ... check the compile
against a non-RH kernel to make sure. And confirm that 2.6.8.1 compiles
OK ... I have that. We might as well check that we agree. And compile
with -O1 for luck.

Peter