Commit a6b61aab authored by Linus Torvalds's avatar Linus Torvalds

Import 0.99.15j

parent 9300725c
VERSION = 0.99
PATCHLEVEL = 15
ALPHA = i
ALPHA = j
all: Version zImage
......
......@@ -391,6 +391,12 @@ int sys_shmat (int shmid, char *shmaddr, int shmflg, ulong *raddr)
if (shmid < 0)
return -EINVAL;
if (raddr) {
err = verify_area(VERIFY_WRITE, raddr, sizeof(long));
if (err)
return err;
}
shp = shm_segs[id = shmid % SHMMNI];
if (shp == IPC_UNUSED || shp == IPC_NOID)
return -EINVAL;
......
......@@ -17,10 +17,10 @@
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
* Stephen A. Wood, <saw@hallc1.cebaf.gov>
* Arnt Gulbrandsen, <agulbra@pvv.unit.no>
*
* Fixes:
* Stephen A. Wood : arp problems
* 'Mr Linux' : arp problems.
* Alan Cox : arp_ioctl now checks memory areas with verify_area.
* Alan Cox : Non IP arp message now only appears with debugging on.
......
......@@ -88,7 +88,7 @@ get__netinfo(struct proto *pro, char *buffer, int format)
sp->timer.expires = 0;
pos+=sprintf(pos, "%2d: %08lX:%04X %08lX:%04X %02X %08lX:%08lX %02X:%08lX %08X %d\n",
i, src, srcp, dest, destp, sp->state,
format==0?sp->send_seq-sp->rcv_ack_seq:sp->rmem_alloc,
format==0?sp->write_seq-sp->rcv_ack_seq:sp->rmem_alloc,
format==0?sp->acked_seq-sp->copied_seq:sp->wmem_alloc,
timer_active, sp->timer.expires, (unsigned) sp->retransmits,
SOCK_INODE(sp->socket)->i_uid);
......
......@@ -119,8 +119,8 @@ print_sk(struct sock *sk)
printk(" daddr = %lX, saddr = %lX\n", sk->daddr,sk->saddr);
printk(" num = %d", sk->num);
printk(" next = %p\n", sk->next);
printk(" send_seq = %ld, acked_seq = %ld, copied_seq = %ld\n",
sk->send_seq, sk->acked_seq, sk->copied_seq);
printk(" write_seq = %ld, acked_seq = %ld, copied_seq = %ld\n",
sk->write_seq, sk->acked_seq, sk->copied_seq);
printk(" rcv_ack_seq = %ld, window_seq = %ld, fin_seq = %ld\n",
sk->rcv_ack_seq, sk->window_seq, sk->fin_seq);
printk(" prot = %p\n", sk->prot);
......@@ -838,7 +838,7 @@ inet_create(struct socket *sock, int protocol)
sk->rcvbuf = SK_RMEM_MAX;
sk->pair = NULL;
sk->opt = NULL;
sk->send_seq = 0;
sk->write_seq = 0;
sk->acked_seq = 0;
sk->copied_seq = 0;
sk->fin_seq = 0;
......
......@@ -55,7 +55,8 @@ struct sock {
struct options *opt;
volatile unsigned long wmem_alloc;
volatile unsigned long rmem_alloc;
unsigned long send_seq;
unsigned long write_seq;
unsigned long sent_seq;
unsigned long acked_seq;
unsigned long copied_seq;
unsigned long rcv_ack_seq;
......
This diff is collapsed.
......@@ -80,13 +80,12 @@
*/
static inline int before(unsigned long seq1, unsigned long seq2)
{
seq2 -= seq1+1;
return (seq2 < 65536);
return (long)(seq1-seq2) < 0;
}
static inline int after(unsigned long seq1, unsigned long seq2)
{
return before(seq2, seq1);
return (long)(seq1-seq2) > 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment