Commit ab249d46 authored by Linus Torvalds's avatar Linus Torvalds

Import 1.1.7

parent de0eab26
VERSION = 1
PATCHLEVEL = 1
SUBLEVEL = 6
SUBLEVEL = 7
all: Version zImage
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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);
}
......
......@@ -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 */
......
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