Commit 5992007d authored by Linus Torvalds's avatar Linus Torvalds

Import 1.2.9

parent be164636
VERSION = 1 VERSION = 1
PATCHLEVEL = 2 PATCHLEVEL = 2
SUBLEVEL = 8 SUBLEVEL = 9
ARCH = i386 ARCH = i386
......
...@@ -45,13 +45,15 @@ void enable_hlt(void) ...@@ -45,13 +45,15 @@ void enable_hlt(void)
asmlinkage int sys_idle(void) asmlinkage int sys_idle(void)
{ {
int i; int i;
pmd_t * pmd;
if (current->pid != 0) if (current->pid != 0)
return -EPERM; return -EPERM;
/* Map out the low memory: it's no longer needed */ /* Map out the low memory: it's no longer needed */
pmd = pmd_offset(swapper_pg_dir, 0);
for (i = 0 ; i < 768 ; i++) for (i = 0 ; i < 768 ; i++)
pgd_clear(swapper_pg_dir + i); pmd_clear(pmd++);
/* endless idle loop with no priority at all */ /* endless idle loop with no priority at all */
current->counter = -100; current->counter = -100;
......
#define THREE_LEVEL
/* ptrace.c */ /* ptrace.c */
/* By Ross Biro 1/23/92 */ /* By Ross Biro 1/23/92 */
/* edited by Linus Torvalds */ /* edited by Linus Torvalds */
......
...@@ -21,17 +21,35 @@ Major features of ide.c & ide-cd.c: ...@@ -21,17 +21,35 @@ Major features of ide.c & ide-cd.c:
- support for interrupt unmasking during I/O (better than hd.c) - support for interrupt unmasking during I/O (better than hd.c)
- improved handshaking and error detection/recovery - improved handshaking and error detection/recovery
- can co-exist with hd.c to control only the secondary interface - can co-exist with hd.c to control only the secondary interface
NEW! - support for reliable operation of buggy CMD-640 interfaces
- use kernel command line option: hda=serialize
NEW! - experimental support for DTC-2278D interfaces
- use kernel command line option: hda=dtc2278
NEW! - run-time selectible 32bit interface support (using hdparm-2.3)
Under construction: Under construction:
- improved CMD support: tech info is supposedly "in the mail"
- support for interface speed selection on jumperless interfaces - support for interface speed selection on jumperless interfaces
- improved detection of non-standard IDE ATAPI cdrom drives - improved detection of non-standard IDE ATAPI cdrom drives
- support for non-standard 3rd/4th drive interface on Promise cards - support for non-standard 3rd/4th drive interface on Promise cards
***
IMPORTANT NOTICE: "CMD" EIDE Interfaces will not (by default) work *reliably*
when drives are attached to the second interface. To "fix" this, supply the
special kernel "command line" parameter to LILO: hda=serialize
Failure to do so can cause severe data corruption!
***
To access devices on the second interface, device entries must first be To access devices on the second interface, device entries must first be
created in /dev for them. To create such entries, simply run the included created in /dev for them. To create such entries, simply run the included
shell script: MAKEDEV.ide1 shell script: MAKEDEV.ide1
Apparently the early releases of Slackware 2.2 have incorrect entries
in /dev for hdc* and hdd* -- this can also be corrected by running MAKEDEV.ide1
ide.c automatically probes for the primary and secondary interfaces, ide.c automatically probes for the primary and secondary interfaces,
for the drives/geometries attached to those interfaces, and for the for the drives/geometries attached to those interfaces, and for the
IRQ numbers being used by the interfaces (normally IRQ14 & IRQ15). IRQ numbers being used by the interfaces (normally IRQ14 & IRQ15).
......
...@@ -90,6 +90,7 @@ static void extended_partition(struct gendisk *hd, int dev) ...@@ -90,6 +90,7 @@ static void extended_partition(struct gendisk *hd, int dev)
!(hd->part[current_minor].nr_sects = p->nr_sects)) !(hd->part[current_minor].nr_sects = p->nr_sects))
goto done; /* no more logicals in this partition */ goto done; /* no more logicals in this partition */
hd->part[current_minor].start_sect = first_sector + p->start_sect; hd->part[current_minor].start_sect = first_sector + p->start_sect;
hd->sizes[current_minor] = p->nr_sects >> (BLOCK_SIZE_BITS - 9);
this_sector = first_sector + p->start_sect; this_sector = first_sector + p->start_sect;
dev = ((hd->major) << 8) | current_minor; dev = ((hd->major) << 8) | current_minor;
brelse(bh); brelse(bh);
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
* Thanks to Nick Saw <cwsaw@pts7.pts.mot.com> for * Thanks to Nick Saw <cwsaw@pts7.pts.mot.com> for
* help in figuring this out. Ditto for Acer and * help in figuring this out. Ditto for Acer and
* Aztech drives, which seem to have the same problem. * Aztech drives, which seem to have the same problem.
* * 2.04b May 30, 1995 -- Fix to match changes in ide.c version 3.16 -ml
* *
* ATAPI cd-rom driver. To be used with ide.c. * ATAPI cd-rom driver. To be used with ide.c.
* *
...@@ -41,8 +41,13 @@ ...@@ -41,8 +41,13 @@
#define MIN(a,b) ((a) < (b) ? (a) : (b)) #define MIN(a,b) ((a) < (b) ? (a) : (b))
#if 1 /* "old" method */
#define OUT_WORDS(b,n) outsw (IDE_PORT (HD_DATA, dev->hwif), (b), (n)) #define OUT_WORDS(b,n) outsw (IDE_PORT (HD_DATA, dev->hwif), (b), (n))
#define IN_WORDS(b,n) insw (IDE_PORT (HD_DATA, dev->hwif), (b), (n)) #define IN_WORDS(b,n) insw (IDE_PORT (HD_DATA, dev->hwif), (b), (n))
#else /* "new" method -- should really fix each instance instead of this */
#define OUT_WORDS(b,n) output_ide_data(dev,b,(n)/2)
#define IN_WORDS(b,n) input_ide_data(dev,b,(n)/2)
#endif
/* special command codes for strategy routine. */ /* special command codes for strategy routine. */
#define PACKET_COMMAND 4315 #define PACKET_COMMAND 4315
...@@ -196,7 +201,7 @@ static int cdrom_decode_status (ide_dev_t *dev, int good_stat, int *stat_ret) ...@@ -196,7 +201,7 @@ static int cdrom_decode_status (ide_dev_t *dev, int good_stat, int *stat_ret)
stat = GET_STAT (dev->hwif); stat = GET_STAT (dev->hwif);
*stat_ret = stat; *stat_ret = stat;
if (OK_STAT (stat, good_stat, BAD_RW_STAT)) if (OK_STAT (stat, good_stat, BAD_R_STAT))
return 0; return 0;
/* Got an error. */ /* Got an error. */
......
This diff is collapsed.
static char rcsid[] = static char rcsid[] =
"$Revision: 1.36.1.3 $$Date: 1995/03/23 22:15:35 $"; "$Revision: 1.36.1.4 $$Date: 1995/03/29 06:14:14 $";
/* /*
* linux/kernel/cyclades.c * linux/kernel/cyclades.c
* *
...@@ -18,6 +18,9 @@ static char rcsid[] = ...@@ -18,6 +18,9 @@ static char rcsid[] =
* int cy_open(struct tty_struct *tty, struct file *filp); * int cy_open(struct tty_struct *tty, struct file *filp);
* *
* $Log: cyclades.c,v $ * $Log: cyclades.c,v $
* Revision 1.36.1.4 1995/03/29 06:14:14 bentson
* disambiguate between Cyclom-16Y and Cyclom-32Ye;
*
* Revision 1.36.1.3 1995/03/23 22:15:35 bentson * Revision 1.36.1.3 1995/03/23 22:15:35 bentson
* add missing break in modem control block in ioctl switch statement * add missing break in modem control block in ioctl switch statement
* (discovered by Michael Edward Chastain <mec@jobe.shell.portal.com>); * (discovered by Michael Edward Chastain <mec@jobe.shell.portal.com>);
...@@ -2638,6 +2641,17 @@ cy_init_card(unsigned char *true_base_addr) ...@@ -2638,6 +2641,17 @@ cy_init_card(unsigned char *true_base_addr)
base_addr[CyGFRCR] = 0; base_addr[CyGFRCR] = 0;
udelay(10L); udelay(10L);
/* The Cyclom-16Y does not decode address bit 9 and therefore
cannot distinguish between references to chip 0 and a non-
existent chip 4. If the preceeding clearing of the supposed
chip 4 GFRCR register appears at chip 0, there is no chip 4
and this must be a Cyclom-16Y, not a Cyclom-32Ye.
*/
if (chip_number == 4
&& *(true_base_addr + cy_chip_offset[0] + CyGFRCR) == 0){
return chip_number;
}
base_addr[CyCCR] = CyCHIP_RESET; base_addr[CyCCR] = CyCHIP_RESET;
udelay(1000L); udelay(1000L);
......
...@@ -71,12 +71,6 @@ loopback_xmit(struct sk_buff *skb, struct device *dev) ...@@ -71,12 +71,6 @@ loopback_xmit(struct sk_buff *skb, struct device *dev)
dev->tbusy = 0; dev->tbusy = 0;
if (!intr_count && (bh_active & bh_mask)) {
start_bh_atomic();
do_bottom_half();
end_bh_atomic();
}
return(0); return(0);
} }
......
...@@ -2,7 +2,7 @@ Wed Apr 12 15:25:52 1995 Eric Youngdale (eric@andante) ...@@ -2,7 +2,7 @@ Wed Apr 12 15:25:52 1995 Eric Youngdale (eric@andante)
* Linux 1.2.5 released. * Linux 1.2.5 released.
* buslogic.c: Update to version 1.15 (From Dave G, I expect). * buslogic.c: Update to version 1.15 (From Leonard N. Zubkoff).
Fixed interrupt routine to avoid races when handling multiple Fixed interrupt routine to avoid races when handling multiple
complete commands per interrupt. Seems to come up with faster complete commands per interrupt. Seems to come up with faster
cards. cards.
......
...@@ -1555,7 +1555,7 @@ void buslogic_setup(char *str, int *ints) ...@@ -1555,7 +1555,7 @@ void buslogic_setup(char *str, int *ints)
bases[setup_idx] = 0; bases[setup_idx] = 0;
return; return;
} }
buslogic_printk("invalid base 0x%X specified.\n", ints[i]); buslogic_printk("invalid base 0x%X specified.\n", ints[1]);
} }
#ifdef MODULE #ifdef MODULE
......
...@@ -124,22 +124,22 @@ st_chk_result(Scsi_Cmnd * SCpnt) ...@@ -124,22 +124,22 @@ st_chk_result(Scsi_Cmnd * SCpnt)
SCpnt->request_bufflen); SCpnt->request_bufflen);
if (driver_byte(result) & DRIVER_SENSE) if (driver_byte(result) & DRIVER_SENSE)
print_sense("st", SCpnt); print_sense("st", SCpnt);
} else }
#endif #endif
scode = sense[2] & 0x0f; scode = sense[2] & 0x0f;
if (!(driver_byte(result) & DRIVER_SENSE) || if (!(driver_byte(result) & DRIVER_SENSE) ||
((sense[0] & 0x70) == 0x70 && ((sense[0] & 0x70) == 0x70 &&
scode != NO_SENSE && scode != NO_SENSE &&
scode != RECOVERED_ERROR && scode != RECOVERED_ERROR &&
scode != UNIT_ATTENTION && scode != UNIT_ATTENTION &&
scode != BLANK_CHECK && scode != BLANK_CHECK &&
scode != VOLUME_OVERFLOW)) { /* Abnormal conditions for tape */ scode != VOLUME_OVERFLOW)) { /* Abnormal conditions for tape */
printk("st%d: Error %x. ", dev, result); printk("st%d: Error %x. ", dev, result);
if (driver_byte(result) & DRIVER_SENSE) if (driver_byte(result) & DRIVER_SENSE)
print_sense("st", SCpnt); print_sense("st", SCpnt);
else else
printk("\n"); printk("\n");
} }
if ((sense[0] & 0x70) == 0x70 && if ((sense[0] & 0x70) == 0x70 &&
scode == RECOVERED_ERROR scode == RECOVERED_ERROR
......
NOTE!
This is an ALPHA TEST VERSION (pre 3.0). The latest
released version of this driver is now part of
Linux kernel distribution. For other operating systems
use the snd-driv-2.5.tar.gz package.
This particular version contains lots of new features
BUT THERE ARE NO APPLICATIONS WHICH USE THEM. So there
is no need to install this version as long as you are
not developing the driver or applications which use it.
All new features are in the /dev/sequencer and /dev/midi
parts of the driver.
This version is little bit incomplete. Some features have
not been implemented for each soundcards yet. All features
of v2.4 should work OK.
CAUTION!
This version of driver works with applications written and
compiled for v2.*. The problem is that APPLICATIONS COMPILED
WITH soundcard.h OF THIS VERSION WILL NOT WORK WITH OLDER DRIVER.
Be careful when distributing applications compiled with this
version (just the apps using /dev/sequencer are incompatible).
********************************************************* *********************************************************
* IF YOU HAVE ANY PROBLEMS WITH THE SOUND DRIVER, * * IF YOU HAVE ANY PROBLEMS WITH THE SOUND DRIVER, *
...@@ -30,5 +5,3 @@ CAUTION! ...@@ -30,5 +5,3 @@ CAUTION!
* NEAREST LINUX FTP SITE AND CONTAINS ANSWER TO YOUR * * NEAREST LINUX FTP SITE AND CONTAINS ANSWER TO YOUR *
* PROBLEM. * * PROBLEM. *
********************************************************* *********************************************************
Hannu
...@@ -973,7 +973,7 @@ static void read_buffers(struct buffer_head * bh[], int nrbuf) ...@@ -973,7 +973,7 @@ static void read_buffers(struct buffer_head * bh[], int nrbuf)
} }
if (bhnum) if (bhnum)
ll_rw_block(READ, bhnum, bhr); ll_rw_block(READ, bhnum, bhr);
for (i = 0 ; i < nrbuf ; i++) { for (i = nrbuf ; --i >= 0 ; ) {
if (bh[i]) { if (bh[i]) {
wait_on_buffer(bh[i]); wait_on_buffer(bh[i]);
} }
......
...@@ -277,6 +277,8 @@ asmlinkage int sys_fchmod(unsigned int fd, mode_t mode) ...@@ -277,6 +277,8 @@ asmlinkage int sys_fchmod(unsigned int fd, mode_t mode)
return -ENOENT; return -ENOENT;
if (IS_RDONLY(inode)) if (IS_RDONLY(inode))
return -EROFS; return -EROFS;
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
return -EPERM;
if (mode == (mode_t) -1) if (mode == (mode_t) -1)
mode = inode->i_mode; mode = inode->i_mode;
newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
...@@ -299,6 +301,10 @@ asmlinkage int sys_chmod(const char * filename, mode_t mode) ...@@ -299,6 +301,10 @@ asmlinkage int sys_chmod(const char * filename, mode_t mode)
iput(inode); iput(inode);
return -EROFS; return -EROFS;
} }
if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) {
iput(inode);
return -EPERM;
}
if (mode == (mode_t) -1) if (mode == (mode_t) -1)
mode = inode->i_mode; mode = inode->i_mode;
newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
...@@ -322,6 +328,8 @@ asmlinkage int sys_fchown(unsigned int fd, uid_t user, gid_t group) ...@@ -322,6 +328,8 @@ asmlinkage int sys_fchown(unsigned int fd, uid_t user, gid_t group)
return -ENOENT; return -ENOENT;
if (IS_RDONLY(inode)) if (IS_RDONLY(inode))
return -EROFS; return -EROFS;
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
return -EPERM;
if (user == (uid_t) -1) if (user == (uid_t) -1)
user = inode->i_uid; user = inode->i_uid;
if (group == (gid_t) -1) if (group == (gid_t) -1)
...@@ -362,6 +370,10 @@ asmlinkage int sys_chown(const char * filename, uid_t user, gid_t group) ...@@ -362,6 +370,10 @@ asmlinkage int sys_chown(const char * filename, uid_t user, gid_t group)
iput(inode); iput(inode);
return -EROFS; return -EROFS;
} }
if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) {
iput(inode);
return -EPERM;
}
if (user == (uid_t) -1) if (user == (uid_t) -1)
user = inode->i_uid; user = inode->i_uid;
if (group == (gid_t) -1) if (group == (gid_t) -1)
......
#define THREE_LEVEL
/* /*
* linux/fs/proc/array.c * linux/fs/proc/array.c
* *
......
#define THREE_LEVEL
/* /*
* linux/fs/proc/mem.c * linux/fs/proc/mem.c
* *
......
...@@ -21,12 +21,6 @@ extern char ignore_irq13; ...@@ -21,12 +21,6 @@ extern char ignore_irq13;
extern char wp_works_ok; /* doesn't work on a 386 */ extern char wp_works_ok; /* doesn't work on a 386 */
extern char hlt_works_ok; /* problems on some 486Dx4's and old 386's */ extern char hlt_works_ok; /* problems on some 486Dx4's and old 386's */
#define start_bh_atomic() \
__asm__ __volatile__("incl _intr_count")
#define end_bh_atomic() \
__asm__ __volatile__("decl _intr_count")
/* /*
* Bus types (default is ISA, but people can check others with these..) * Bus types (default is ISA, but people can check others with these..)
* MCA_bus hardcoded to 0 for now. * MCA_bus hardcoded to 0 for now.
......
...@@ -78,12 +78,14 @@ struct hd_geometry { ...@@ -78,12 +78,14 @@ struct hd_geometry {
#define HDIO_GET_MULTCOUNT 0x304 /* get current IDE blockmode setting */ #define HDIO_GET_MULTCOUNT 0x304 /* get current IDE blockmode setting */
#define HDIO_GET_IDENTITY 0x307 /* get IDE identification info */ #define HDIO_GET_IDENTITY 0x307 /* get IDE identification info */
#define HDIO_GET_KEEPSETTINGS 0x308 /* get keep-settings-on-reset flag */ #define HDIO_GET_KEEPSETTINGS 0x308 /* get keep-settings-on-reset flag */
#define HDIO_GET_CHIPSET 0x309 /* get current interface type setting */
#define HDIO_DRIVE_CMD 0x31f /* execute a special drive command */ #define HDIO_DRIVE_CMD 0x31f /* execute a special drive command */
/* hd/ide ctl's that pass (arg) non-ptr values are numbered 0x32n/0x33n */ /* hd/ide ctl's that pass (arg) non-ptr values are numbered 0x32n/0x33n */
#define HDIO_SET_MULTCOUNT 0x321 /* set IDE blockmode */ #define HDIO_SET_MULTCOUNT 0x321 /* set IDE blockmode */
#define HDIO_SET_UNMASKINTR 0x322 /* permit other irqs during I/O */ #define HDIO_SET_UNMASKINTR 0x322 /* permit other irqs during I/O */
#define HDIO_SET_KEEPSETTINGS 0x323 /* keep ioctl settings on reset */ #define HDIO_SET_KEEPSETTINGS 0x323 /* keep ioctl settings on reset */
#define HDIO_SET_CHIPSET 0x324 /* optimise driver for interface type */
/* structure returned by HDIO_GET_IDENTITY, as per ANSI ATA2 rev.2f spec */ /* structure returned by HDIO_GET_IDENTITY, as per ANSI ATA2 rev.2f spec */
struct hd_driveid { struct hd_driveid {
......
...@@ -45,6 +45,18 @@ extern inline void enable_bh(int nr) ...@@ -45,6 +45,18 @@ extern inline void enable_bh(int nr)
set_bit(nr, &bh_mask); set_bit(nr, &bh_mask);
} }
extern inline void start_bh_atomic(void)
{
intr_count++;
}
extern inline void end_bh_atomic(void)
{
if (intr_count == 1 && (bh_active & bh_mask))
do_bottom_half();
intr_count--;
}
/* /*
* Autoprobing for irqs: * Autoprobing for irqs:
* *
......
...@@ -388,7 +388,7 @@ struct pci_vendor_type { ...@@ -388,7 +388,7 @@ struct pci_vendor_type {
{PCI_VENDOR_ID_CONTAQ, "Contaq"}, \ {PCI_VENDOR_ID_CONTAQ, "Contaq"}, \
{PCI_VENDOR_ID_NS, "NS"}, \ {PCI_VENDOR_ID_NS, "NS"}, \
{PCI_VENDOR_ID_VIA, "VIA Technologies"}, \ {PCI_VENDOR_ID_VIA, "VIA Technologies"}, \
{PCI_VENDOR_ID_SI, "Silicon Integrated"}, \ {PCI_VENDOR_ID_SI, "Silicon Integrated Systems"}, \
{PCI_VENDOR_ID_LEADTEK, "Leadtek Research"}, \ {PCI_VENDOR_ID_LEADTEK, "Leadtek Research"}, \
{PCI_VENDOR_ID_IMS, "IMS"}, \ {PCI_VENDOR_ID_IMS, "IMS"}, \
{PCI_VENDOR_ID_ZEINET, "ZeiNet"}, \ {PCI_VENDOR_ID_ZEINET, "ZeiNet"}, \
......
#define THREE_LEVEL
/* /*
* linux/ipc/shm.c * linux/ipc/shm.c
* Copyright (C) 1992, 1993 Krishna Balasubramanian * Copyright (C) 1992, 1993 Krishna Balasubramanian
......
...@@ -745,7 +745,7 @@ register_symtab(struct symbol_table *intab) ...@@ -745,7 +745,7 @@ register_symtab(struct symbol_table *intab)
link && (link != &kernel_module); link && (link != &kernel_module);
link = link->next) { link = link->next) {
if (link->ref->module == mp) if (link->ref && (link->ref->module == mp))
link->ref = newref++; link->ref = newref++;
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#define IOTABLE_SIZE 32 #define IOTABLE_SIZE 64
typedef struct resource_entry_t { typedef struct resource_entry_t {
u_long from, num; u_long from, num;
......
#define THREE_LEVEL
/* /*
* linux/mm/filemmap.c * linux/mm/filemmap.c
* *
......
#define THREE_LEVEL
/* /*
* linux/mm/memory.c * linux/mm/memory.c
* *
......
#define THREE_LEVEL
/* /*
* linux/mm/mprotect.c * linux/mm/mprotect.c
* *
......
#define THREE_LEVEL
/* /*
* linux/mm/swap.c * linux/mm/swap.c
* *
......
#define THREE_LEVEL
/* /*
* linux/mm/vmalloc.c * linux/mm/vmalloc.c
* *
......
...@@ -815,8 +815,8 @@ static int inet_release(struct socket *sock, struct socket *peer) ...@@ -815,8 +815,8 @@ static int inet_release(struct socket *sock, struct socket *peer)
sk->inuse = 1; sk->inuse = 1;
/* This will destroy it. */ /* This will destroy it. */
release_sock(sk);
sock->data = NULL; sock->data = NULL;
release_sock(sk);
sk->socket = NULL; sk->socket = NULL;
return(0); return(0);
} }
...@@ -939,8 +939,12 @@ static int inet_connect(struct socket *sock, struct sockaddr * uaddr, ...@@ -939,8 +939,12 @@ static int inet_connect(struct socket *sock, struct sockaddr * uaddr,
return 0; /* Rock and roll */ return 0; /* Rock and roll */
} }
if (sock->state == SS_CONNECTING && sk->protocol == IPPROTO_TCP && (flags & O_NONBLOCK)) if (sock->state == SS_CONNECTING && sk->protocol == IPPROTO_TCP && (flags & O_NONBLOCK)) {
return -EALREADY; /* Connecting is currently in progress */ if (sk->err != 0)
return -sk->err; /* Connection must have failed */
else
return -EALREADY; /* Connecting is currently in progress */
}
if (sock->state != SS_CONNECTING) if (sock->state != SS_CONNECTING)
{ {
......
...@@ -337,7 +337,9 @@ void dev_queue_xmit(struct sk_buff *skb, struct device *dev, int pri) ...@@ -337,7 +337,9 @@ void dev_queue_xmit(struct sk_buff *skb, struct device *dev, int pri)
* Make sure we haven't missed an interrupt. * Make sure we haven't missed an interrupt.
*/ */
printk("dev_queue_xmit: worked around a missed interrupt\n"); printk("dev_queue_xmit: worked around a missed interrupt\n");
start_bh_atomic();
dev->hard_start_xmit(NULL, dev); dev->hard_start_xmit(NULL, dev);
end_bh_atomic();
return; return;
} }
...@@ -409,12 +411,15 @@ void dev_queue_xmit(struct sk_buff *skb, struct device *dev, int pri) ...@@ -409,12 +411,15 @@ void dev_queue_xmit(struct sk_buff *skb, struct device *dev, int pri)
} }
} }
} }
start_bh_atomic();
if (dev->hard_start_xmit(skb, dev) == 0) { if (dev->hard_start_xmit(skb, dev) == 0) {
end_bh_atomic();
/* /*
* Packet is now solely the responsibility of the driver * Packet is now solely the responsibility of the driver
*/ */
return; return;
} }
end_bh_atomic();
/* /*
* Transmission failed, put skb back into a list. Once on the list it's safe and * Transmission failed, put skb back into a list. Once on the list it's safe and
......
...@@ -1489,7 +1489,8 @@ int ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) ...@@ -1489,7 +1489,8 @@ int ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt)
* (4. We ought to check for IP multicast addresses and undefined types.. does this matter ?) * (4. We ought to check for IP multicast addresses and undefined types.. does this matter ?)
*/ */
if (skb->len<sizeof(struct iphdr) || iph->ihl<5 || iph->version != 4 || ip_fast_csum((unsigned char *)iph, iph->ihl) !=0) if (skb->len<sizeof(struct iphdr) || iph->ihl<5 || iph->version != 4 ||
skb->len<ntohs(iph->tot_len) || ip_fast_csum((unsigned char *)iph, iph->ihl) !=0)
{ {
ip_statistics.IpInHdrErrors++; ip_statistics.IpInHdrErrors++;
kfree_skb(skb, FREE_WRITE); kfree_skb(skb, FREE_WRITE);
...@@ -2090,8 +2091,6 @@ int ip_setsockopt(struct sock *sk, int level, int optname, char *optval, int opt ...@@ -2090,8 +2091,6 @@ int ip_setsockopt(struct sock *sk, int level, int optname, char *optval, int opt
unsigned char ucval; unsigned char ucval;
ucval=get_fs_byte((unsigned char *)optval); ucval=get_fs_byte((unsigned char *)optval);
if(ucval<1||ucval>255)
return -EINVAL;
sk->ip_mc_ttl=(int)ucval; sk->ip_mc_ttl=(int)ucval;
return 0; return 0;
} }
......
...@@ -934,6 +934,8 @@ static int tcp_select(struct sock *sk, int sel_type, select_table *wait) ...@@ -934,6 +934,8 @@ static int tcp_select(struct sock *sk, int sel_type, select_table *wait)
break; break;
case SEL_OUT: case SEL_OUT:
if (sk->err)
return 1;
if (sk->shutdown & SEND_SHUTDOWN) if (sk->shutdown & SEND_SHUTDOWN)
return 0; return 0;
if (sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV) if (sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV)
...@@ -948,7 +950,7 @@ static int tcp_select(struct sock *sk, int sel_type, select_table *wait) ...@@ -948,7 +950,7 @@ static int tcp_select(struct sock *sk, int sel_type, select_table *wait)
return 1; return 1;
case SEL_EX: case SEL_EX:
if (sk->err || sk->urg_data) if (sk->urg_data)
return 1; return 1;
break; break;
} }
......
...@@ -481,7 +481,7 @@ static int unix_proto_connect(struct socket *sock, struct sockaddr *uservaddr, ...@@ -481,7 +481,7 @@ static int unix_proto_connect(struct socket *sock, struct sockaddr *uservaddr,
fname[sockaddr_len-UN_PATH_OFFSET] = '\0'; fname[sockaddr_len-UN_PATH_OFFSET] = '\0';
old_fs = get_fs(); old_fs = get_fs();
set_fs(get_ds()); set_fs(get_ds());
i = open_namei(fname, 0, S_IFSOCK, &inode, NULL); i = open_namei(fname, 2, S_IFSOCK, &inode, NULL);
set_fs(old_fs); set_fs(old_fs);
if (i < 0) if (i < 0)
{ {
......
...@@ -11,12 +11,15 @@ TOPINCL := $(TOPDIR)/include/linux ...@@ -11,12 +11,15 @@ TOPINCL := $(TOPDIR)/include/linux
.SUFFIXES: .ver .SUFFIXES: .ver
.c.ver: .c.ver:
$(CC) $(CFLAGS) -E -D__GENKSYMS__ $< | genksyms -w $(TOPINCL)/modules @if [ ! -x /sbin/genksyms ]; then echo "Please read: README.modules"; fi
$(CC) $(CFLAGS) -E -DCONFIG_MODVERSIONS -D__GENKSYMS__ $< | /sbin/genksyms -w $(TOPINCL)/modules
@ln -sf $(TOPINCL)/modules/$@ . @ln -sf $(TOPINCL)/modules/$@ .
$(SYMTAB_OBJS): $(SYMTAB_OBJS):
$(CC) $(CFLAGS) -DEXPORT_SYMTAB -c $(@:.o=.c) $(CC) $(CFLAGS) -DEXPORT_SYMTAB -c $(@:.o=.c)
$(SYMTAB_OBJS:.o=.ver): $(TOPINCL)/autoconf.h
$(TOPINCL)/modversions.h: $(SYMTAB_OBJS:.o=.ver) $(TOPINCL)/modversions.h: $(SYMTAB_OBJS:.o=.ver)
@echo updating $(TOPINCL)/modversions.h @echo updating $(TOPINCL)/modversions.h
@(cd $(TOPINCL)/modules; for f in *.ver;\ @(cd $(TOPINCL)/modules; for f in *.ver;\
......
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