From 2c76ad5455a472461ccbb36a0e6c3ad76129df4d Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 23 Nov 2007 15:10:00 -0500 Subject: [PATCH] Import 1.2.11 --- Makefile | 2 +- arch/i386/kernel/vm86.c | 24 ++++++++++++++++++------ drivers/block/sonycd535.c | 2 +- drivers/net/arcnet.c | 15 +++++++++++---- drivers/scsi/53c7,8xx.c | 4 ++-- drivers/scsi/u14-34f.c | 21 +++++++++++++++++---- drivers/scsi/u14-34f.h | 2 +- fs/proc/inode.c | 6 ++++-- include/linux/sbpcd.h | 2 +- kernel/exit.c | 2 +- net/inet/af_inet.c | 4 ++-- net/inet/icmp.c | 2 +- 12 files changed, 60 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index 2f2c17ea9c9f..405722080f1e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION = 1 PATCHLEVEL = 2 -SUBLEVEL = 10 +SUBLEVEL = 11 ARCH = i386 diff --git a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c index d55f8248f055..fe601d1afee7 100644 --- a/arch/i386/kernel/vm86.c +++ b/arch/i386/kernel/vm86.c @@ -217,6 +217,8 @@ static inline unsigned long get_vflags(struct vm86_regs * regs) static inline int is_revectored(int nr, struct revectored_struct * bitmap) { + if (verify_area(VERIFY_READ, bitmap, 256/8) < 0) + return 1; __asm__ __volatile__("btl %2,%%fs:%1\n\tsbbl %0,%0" :"=r" (nr) :"m" (*bitmap),"r" (nr)); @@ -298,22 +300,32 @@ __res; }) static void do_int(struct vm86_regs *regs, int i, unsigned char * ssp, unsigned long sp) { - unsigned short seg = get_fs_word((void *) ((i<<2)+2)); + unsigned short *intr_ptr, seg; - if (seg == BIOSSEG || regs->cs == BIOSSEG || - is_revectored(i, ¤t->tss.vm86_info->int_revectored)) - return_to_32bit(regs, VM86_INTx + (i << 8)); + if (regs->cs == BIOSSEG) + goto cannot_handle; + if (is_revectored(i, ¤t->tss.vm86_info->int_revectored)) + goto cannot_handle; if (i==0x21 && is_revectored(AH(regs),¤t->tss.vm86_info->int21_revectored)) - return_to_32bit(regs, VM86_INTx + (i << 8)); + goto cannot_handle; + intr_ptr = (unsigned short *) (i << 2); + if (verify_area(VERIFY_READ, intr_ptr, 4) < 0) + goto cannot_handle; + seg = get_fs_word(intr_ptr+1); + if (seg == BIOSSEG) + goto cannot_handle; pushw(ssp, sp, get_vflags(regs)); pushw(ssp, sp, regs->cs); pushw(ssp, sp, IP(regs)); regs->cs = seg; SP(regs) -= 6; - IP(regs) = get_fs_word((void *) (i<<2)); + IP(regs) = get_fs_word(intr_ptr+0); clear_TF(regs); clear_IF(regs); return; + +cannot_handle: + return_to_32bit(regs, VM86_INTx + (i << 8)); } void handle_vm86_debug(struct vm86_regs * regs, long error_code) diff --git a/drivers/block/sonycd535.c b/drivers/block/sonycd535.c index 0ab6f13aa2dd..e5f95a04e38a 100644 --- a/drivers/block/sonycd535.c +++ b/drivers/block/sonycd535.c @@ -28,7 +28,7 @@ * (Heiko Eissfeldt ) * * 1995-06-01 - * More chages to support CDU-510/515 series + * More changes to support CDU-510/515 series * (Claudio Porfiri) * * Things to do: diff --git a/drivers/net/arcnet.c b/drivers/net/arcnet.c index 2579f01936c3..17473cc05c39 100644 --- a/drivers/net/arcnet.c +++ b/drivers/net/arcnet.c @@ -2,7 +2,7 @@ Written 1994-95 by Avery Pennarun, derived from skeleton.c by Donald Becker. - Contact Avery at: apenwarr@tourism.807-city.on.ca or + Contact Avery at: apenwarr@foxnet.net or RR #5 Pole Line Road, Thunder Bay, ON, Canada P7C 5M9 ********************** @@ -15,6 +15,13 @@ ********************** + v1.02 (95/06/21) + - A fix to make "exception" packets sent from Linux receivable + on other systems. (The protocol_id byte was sometimes being set + incorrectly, and Linux wasn't checking it on receive so it + didn't show up) + - Updated my email address. Please use apenwarr@foxnet.net + from now on. v1.01 (95/03/24) - Fixed some IPX-related bugs. (Thanks to Tomasz Motylewski for the patches to make arcnet work @@ -79,7 +86,7 @@ * 8 times every second. * * This should no longer be necessary. if you experience "stuck" ARCnet - * drivers, please email apenwarr@tourism.807-city.on.ca or I will remove + * drivers, please email apenwarr@foxnet.net or I will remove * this feature in a future release. */ #undef USE_TIMER_HANDLER @@ -87,7 +94,7 @@ /**************************************************************************/ static char *version = - "arcnet.c:v1.01 95/03/24 Avery Pennarun \n"; + "arcnet.c:v1.02 95/06/21 Avery Pennarun \n"; /* Sources: @@ -1250,7 +1257,7 @@ arcnet_prepare_tx(struct device *dev,struct ClientData *hdr,short length, * make the packet long enough to fit in a 512-byte * frame. */ - arcpacket->raw[offset+0]=arcsoft->protocol_id; + arcpacket->raw[offset+0]=hdr->protocol_id; arcpacket->raw[offset+1]=0xFF; /* FF flag */ arcpacket->raw[offset+2]=0xFF; /* FF padding */ arcpacket->raw[offset+3]=0xFF; /* FF padding */ diff --git a/drivers/scsi/53c7,8xx.c b/drivers/scsi/53c7,8xx.c index 922f745616d6..0b8a2cf7f7b4 100644 --- a/drivers/scsi/53c7,8xx.c +++ b/drivers/scsi/53c7,8xx.c @@ -271,8 +271,8 @@ static Scsi_Host_Template *the_template = NULL; struct pci_chip { unsigned short pci_device_id; int chip; - int max_revision; int min_revision; + int max_revision; }; static struct pci_chip pci_chip_ids[] = { @@ -351,7 +351,7 @@ static void internal_setup(int board, int chip, char *str, int *ints) { } else { overrides[commandline_current].data.pci.bus = ints[1]; overrides[commandline_current].data.pci.device = ints[2]; - overrides[commandline_current].data.pci.device = ints[3]; + overrides[commandline_current].data.pci.function = ints[3]; overrides[commandline_current].options = (ints[0] >= 4) ? ints[4] : 0; } diff --git a/drivers/scsi/u14-34f.c b/drivers/scsi/u14-34f.c index 7ce244ab1c3c..933c9cbbfda1 100644 --- a/drivers/scsi/u14-34f.c +++ b/drivers/scsi/u14-34f.c @@ -1,6 +1,10 @@ /* * u14-34f.c - Low-level driver for UltraStor 14F/34F SCSI host adapters. * + * 13 Jun 1995 rev. 2.01 for linux 1.2.10 + * HAVE_OLD_UX4F_FIRMWARE should be defined for U34F boards when + * the firmware prom is not the lastest one (28008-006). + * * 11 Mar 1995 rev. 2.00 for linux 1.2.0 * Fixed a bug which prevented media change detection for removable * disk drives. @@ -53,11 +57,11 @@ * * Copyright (C) 1994, 1995 Dario Ballabio (dario@milano.europe.dg.com) * - * WARNING: if your 14F board has an old firmware revision (see below) + * WARNING: if your 14/34F board has an old firmware revision (see below) * you must change "#undef" into "#define" in the following * statement. */ -#undef HAVE_OLD_U14F_FIRMWARE +#undef HAVE_OLD_UX4F_FIRMWARE /* * The UltraStor 14F, 24F, and 34F are a family of intelligent, high * performance SCSI-2 host adapters. @@ -124,6 +128,10 @@ * * The new firmware has fixed all the above problems. * + * For U34F boards the latest bios prom is 38008-002 (BIOS rev. 2.01), + * the latest firmware prom is 28008-006. Older firmware 28008-005 has + * problems when using more then 16 scatter/gather lists. + * * In order to support multiple ISA boards in a reliable way, * the driver sets host->wish_block = TRUE for all ISA boards. */ @@ -449,6 +457,11 @@ static inline int port_detect(ushort *port_base, unsigned int j, irqlist[irq] = j; if (HD(j)->subversion == ESA) { + +#if defined (HAVE_OLD_UX4F_FIRMWARE) + sh[j]->sg_tablesize = MAX_SAFE_SGLIST; +#endif + sh[j]->dma_channel = NO_DMA; sh[j]->unchecked_isa_dma = FALSE; sprintf(BN(j), "U34F%d", j); @@ -456,7 +469,7 @@ static inline int port_detect(ushort *port_base, unsigned int j, else { sh[j]->wish_block = TRUE; -#if defined (HAVE_OLD_U14F_FIRMWARE) +#if defined (HAVE_OLD_UX4F_FIRMWARE) sh[j]->hostt->use_clustering = DISABLE_CLUSTERING; sh[j]->sg_tablesize = MAX_SAFE_SGLIST; #endif @@ -475,7 +488,7 @@ static inline int port_detect(ushort *port_base, unsigned int j, if (strcmp(&HD(j)->board_id[32], "06000600")) { printk("%s: %s.\n", BN(j), &HD(j)->board_id[8]); - printk("%s: firmware %s is outdated, BIOS rev. should be 2.01.\n", + printk("%s: firmware %s is outdated, FW PROM should be 28004-006.\n", BN(j), &HD(j)->board_id[32]); sh[j]->hostt->use_clustering = DISABLE_CLUSTERING; sh[j]->sg_tablesize = MAX_SAFE_SGLIST; diff --git a/drivers/scsi/u14-34f.h b/drivers/scsi/u14-34f.h index a4885efea06d..e53170299b02 100644 --- a/drivers/scsi/u14-34f.h +++ b/drivers/scsi/u14-34f.h @@ -10,7 +10,7 @@ int u14_34f_abort(Scsi_Cmnd *); int u14_34f_reset(Scsi_Cmnd *); int u14_34f_biosparam(Disk *, int, int *); -#define U14_34F_VERSION "2.00.00" +#define U14_34F_VERSION "2.01.00" #define ULTRASTOR_14_34F { \ NULL, /* Ptr for modules */ \ diff --git a/fs/proc/inode.c b/fs/proc/inode.c index f91eb28f5132..228f59dbdf7a 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -194,8 +194,10 @@ void proc_read_inode(struct inode * inode) return; } ino &= 0x0000ffff; - inode->i_uid = p->euid; - inode->i_gid = p->egid; + if (p->dumpable && p->uid == p->euid && p->gid == p->egid) { + inode->i_uid = p->uid; + inode->i_gid = p->gid; + } switch (ino) { case PROC_PID_INO: inode->i_nlink = 4; diff --git a/include/linux/sbpcd.h b/include/linux/sbpcd.h index ee7ec8d4c4c2..84fc19a8ba4a 100644 --- a/include/linux/sbpcd.h +++ b/include/linux/sbpcd.h @@ -121,7 +121,7 @@ #define _LINUX_SBPCD_H /*==========================================================================*/ /*==========================================================================*/ -#define LONG_TIMING 0 /* test against timeouts with "gold" CDs on CR-521 */ +#define LONG_TIMING 1 /* test against timeouts with "gold" CDs on CR-521 */ #undef FUTURE #define TEST_UPC 0 diff --git a/kernel/exit.c b/kernel/exit.c index 588c0e47fea0..75f5858057d2 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -4,7 +4,7 @@ * Copyright (C) 1991, 1992 Linus Torvalds */ -#define DEBUG_PROC_TREE +#undef DEBUG_PROC_TREE #include #include diff --git a/net/inet/af_inet.c b/net/inet/af_inet.c index 7f7dd9ec5302..48791b980ad5 100644 --- a/net/inet/af_inet.c +++ b/net/inet/af_inet.c @@ -474,8 +474,8 @@ static int inet_listen(struct socket *sock, int backlog) * somewhere. We might as well truncate it to what everybody * else does.. */ - if (backlog > 5) - backlog = 5; + if ((unsigned) backlog > 128) + backlog = 128; sk->max_ack_backlog = backlog; if (sk->state != TCP_LISTEN) { diff --git a/net/inet/icmp.c b/net/inet/icmp.c index c023eab2e715..d04541ff7f8a 100644 --- a/net/inet/icmp.c +++ b/net/inet/icmp.c @@ -125,7 +125,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, unsigned long info, s */ atype=ip_chk_addr(iph->daddr); - if(atype==IS_BROADCAST || IN_MULTICAST(iph->daddr)) + if(atype==IS_BROADCAST || atype==IS_MULTICAST) return; /* -- 2.39.5