Re: how about SPX ?

From: Lorinczy Zsigmond (lzsiga@mail.ahiv.hu)
Date: Tue Jun 13 2000 - 05:08:50 EST


Lorinczy Zsigmond wrote:
 
> I tried to try SPX in 2.2.15, but I got kernel oops or
> strange messages:
>
> kmalloc: Size (4294967252) too large
> alloc_skb called nonatomically from interrupt 00000038

Dear All !

It would be great if one of you could give me some information
about af_spx.c:

- Should not `spx_accept' allocate a new `struct sock' for `newsk'?
Now `sock' and `newsk' shares the same `sk' - I think this is an error.

- Should not we worry about the `single port - multiple connection'
question? Or is this solved automagically - by who?

- Locking with cli()-sti() should not be changed (cf SMP)?
BTW: Is there any documentation about locking methods?

And finally, here is my first patch for af_spx.c:

--- af_spx.old.c Tue Jan 5 00:31:35 1999
+++ af_spx.new.c Tue Jun 13 10:53:45 2000
@@ -400,8 +400,10 @@
 
        if(skb == NULL)
        {
- int offset = ipx_if_offset(pdata->dest_addr.net);
- int size = offset + sizeof(struct ipxspxhdr);
+ int offset, size;
+ offset = ipx_if_offset(pdata->dest_addr.net);
+ if (offset<0) return offset;
+ size = offset + sizeof(struct ipxspxhdr);
 
                save_flags(flags);
                cli();
@@ -703,6 +705,7 @@
                 return (-EINVAL);
 
        offset = ipx_if_offset(sk->tp_pinfo.af_spx.dest_addr.net);
+ if (offset<0) return offset;
         size = offset + sizeof(struct ipxspxhdr) + len;
 
        cli();

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:27 EST