]> git.neil.brown.name Git - history.git/commitdiff
Import 1.1.7 1.1.7
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:09:28 +0000 (15:09 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:09:28 +0000 (15:09 -0500)
Makefile
mm/memory.c
net/inet/raw.c
net/inet/sock.c
net/inet/udp.c

index d2c13c7c45df081d4760251fbdcfe1508ab0edc6..ee548aa9e11eaa8b6bdcc9dcfefd224343efa75a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 1
 PATCHLEVEL = 1
-SUBLEVEL = 6
+SUBLEVEL = 7
 
 all:   Version zImage
 
index d3914af85e7cb33c8ecd09bdd6666acde9c26d33..0732b1cbb853dcf6eed127a9822eae2ee3d2503a 100644 (file)
@@ -916,11 +916,23 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
                return;
        }
        if (address < PAGE_SIZE) {
-               printk("Unable to handle kernel NULL pointer dereference");
+               printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
                pg0[0] = PAGE_SHARED;
        } else
-               printk("Unable to handle kernel paging request");
-       printk(" at address %08lx\n",address);
+               printk(KERN_ALERT "Unable to handle kernel paging request");
+       printk(" at kernel address %08lx\n",address);
+       address += TASK_SIZE;
+       __asm__("movl %%cr3,%0" : "=r" (user_esp));
+       printk(KERN_ALERT "current->tss.cr3 = %08lx, %%cr3 = %08lx\n",
+               current->tss.cr3, user_esp);
+       user_esp = ((unsigned long *) user_esp)[address >> 22];
+       printk(KERN_ALERT "*pde = %08lx\n", user_esp);
+       if (user_esp & PAGE_PRESENT) {
+               user_esp &= PAGE_MASK;
+               address &= 0x003ff000;
+               user_esp = ((unsigned long *) user_esp)[address >> PAGE_SHIFT];
+               printk(KERN_ALERT "*pte = %08lx\n", user_esp);
+       }
        die_if_kernel("Oops", regs, error_code);
        do_exit(SIGKILL);
 }
index 958378cdf4e7dd4a21ce0ae14145fb40fc0e15bc..4aa36fecc225cf365369e3e567cf91aa6e519787 100644 (file)
@@ -197,6 +197,9 @@ static int raw_sendto(struct sock *sk, unsigned char *from,
        if (sin.sin_port == 0) 
                sin.sin_port = sk->protocol;
   
+       if (sin.sin_addr.s_addr == INADDR_ANY)
+               sin.sin_addr.s_addr = ip_my_addr();
+
        if (sk->broadcast == 0 && ip_chk_addr(sin.sin_addr.s_addr)==IS_BROADCAST)
                return -EACCES;
 
index dd7c008b53ac2f97a0a5d87db8d3d3ea79ca52d4..de345ac8fe6ab359aa4fca5a3d1d44eb96ad756e 100644 (file)
@@ -1144,6 +1144,7 @@ inet_accept(struct socket *sock, struct socket *newsock, int flags)
   {
        struct sock *sk=(struct sock *)newsock->data;
        newsock->data=NULL;
+       sk->dead = 1;
        destroy_sock(sk);
   }
   
index da63bc9f0f3b4ca3521409ad8af86bbdf31d566d..2d63a4b1db2721087b880ce704d08b0b0a01e073 100644 (file)
@@ -35,6 +35,7 @@
  *             Alan Cox        :       No wakeup calls. Instead we now use the callbacks.
  *             Alan Cox        :       Use ip_tos and ip_ttl
  *             Alan Cox        :       SNMP Mibs
+ *             Alan Cox        :       MSG_DONTROUTE, and 0.0.0.0 support.
  *
  *
  *             This program is free software; you can redistribute it and/or
@@ -395,6 +396,10 @@ static int udp_sendto(struct sock *sk, unsigned char *from, int len, int noblock
         *      BSD socket semantics. You must set SO_BROADCAST to permit
         *      broadcasting of data.
         */
+        
+       if(sin.sin_addr.s_addr==INADDR_ANY)
+               sin.sin_addr.s_addr=ip_my_addr();
+               
        if(!sk->broadcast && ip_chk_addr(sin.sin_addr.s_addr)==IS_BROADCAST)
                return -EACCES;                 /* Must turn broadcast on first */