]> git.neil.brown.name Git - history.git/commitdiff
Import 1.2.12 1.2.12
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:10:00 +0000 (15:10 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:10:00 +0000 (15:10 -0500)
Makefile
drivers/net/ppp.c
drivers/scsi/buslogic.c
drivers/scsi/scsi.c
fs/exec.c
fs/proc/inode.c
kernel/ksyms.c
kernel/sys.c
net/inet/af_inet.c
net/inet/tcp.c

index 405722080f1ed94e6366cc342f3d7eca95d021d6..5532940c07baa6286ee5fc01265c58f56a83bb00 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 1
 PATCHLEVEL = 2
-SUBLEVEL = 11
+SUBLEVEL = 12
 
 ARCH = i386
 
index d89870224ce42a59c595cd37f8361452e5880507..52ef880decf6c81118f40198eda35eb6e2feb348 100644 (file)
@@ -505,6 +505,9 @@ ppp_close(struct tty_struct *tty)
     ppp_release (ppp);
 
     PRINTKN (2,(KERN_INFO "ppp: channel %s closing.\n", ppp->dev->name));
+#ifdef MODULE
+    MOD_DEC_USE_COUNT;
+#endif
   }
 }
 
@@ -613,9 +616,6 @@ ppp_dev_close(struct device *dev)
   PRINTKN (2,(KERN_INFO "ppp: channel %s going down for IP packets!\n",
              dev->name));
   CHECK_PPP(-ENXIO);
-#ifdef MODULE
-  MOD_DEC_USE_COUNT;
-#endif
   return 0;
 }
 
index a5824b04be091350032207da10c72973a0d9766b..c5864e1ad752609349d7f33805860b5aa6025725 100644 (file)
@@ -1515,8 +1515,8 @@ int buslogic_biosparam(Disk *disk, int dev, int *ip)
                ip[1] = 32;
            }
 #else
-           ip[0] = 256;
-           ip[1] = 64;
+           ip[0] = 255;
+           ip[1] = 63;
 #endif
        } else {
            ip[0] = 128;
index c7d03857dd926189470b9f3579b3cc7e3f000f0f..df61d9c41730cbc048b00dccbe73ab00c0930fcd 100644 (file)
@@ -457,7 +457,8 @@ void scan_scsis (struct Scsi_Host * shpnt)
 
              if (!strncmp(scsi_result+8,"NEC",3)) {
                  if (!strncmp(scsi_result+16,"CD-ROM DRIVE:84 ",16) ||
-                     !strncmp(scsi_result+16,"CD-ROM DRIVE:25",15))
+                     !strncmp(scsi_result+16,"CD-ROM DRIVE:25",15) ||
+                     !strncmp(scsi_result+16,"CD-ROM DRIVE:83",15))
                      SDpnt->manufacturer = SCSI_MAN_NEC_OLDCDR;
                  else
                      SDpnt->manufacturer = SCSI_MAN_NEC;
index 35ab4081df8ae165d9e2218729347dc1042af024..e5ad66a9478720d5bfceb0ff4d4331ba63dbc783 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -509,7 +509,8 @@ void flush_old_exec(struct linux_binprm * bprm)
        int ch;
        char * name;
 
-       current->dumpable = 1;
+       if (current->euid == current->uid && current->egid == current->gid)
+               current->dumpable = 1;
        name = bprm->filename;
        for (i=0; (ch = *(name++)) != '\0';) {
                if (ch == '/')
index 228f59dbdf7a41bfe61fadf49cfacc392ffc4e34..70e9a74b5ae44d20a08b64facdc8b0a68a9f9703 100644 (file)
@@ -194,7 +194,8 @@ void proc_read_inode(struct inode * inode)
                return;
        }
        ino &= 0x0000ffff;
-       if (p->dumpable && p->uid == p->euid && p->gid == p->egid) {
+       if (ino == PROC_PID_INO ||
+           (p->dumpable && p->uid == p->euid && p->gid == p->egid)) {
                inode->i_uid = p->uid;
                inode->i_gid = p->gid;
        }
index 6e54ecaf9cff887b4179f4cf9943ac60332e418d..2ea6d18a92e0e3fd8348ba3d374ba7438655eae0 100644 (file)
@@ -286,6 +286,7 @@ struct symbol_table symbol_table = {
        X(slhc_remember),
        X(slhc_compress),
        X(slhc_uncompress),
+       X(slhc_toss),
 #endif
 #endif
        /* Device callback registration */
index 1ac0c84756b2830fe764f15b05402b40d20a549f..771d8ae6a914dc217caaa5f49676d32caf5907f0 100644 (file)
@@ -195,6 +195,7 @@ void ctrl_alt_del(void)
 asmlinkage int sys_setregid(gid_t rgid, gid_t egid)
 {
        int old_rgid = current->gid;
+       int old_egid = current->egid;
 
        if (rgid != (gid_t) -1) {
                if ((old_rgid == rgid) ||
@@ -219,6 +220,8 @@ asmlinkage int sys_setregid(gid_t rgid, gid_t egid)
            (egid != (gid_t) -1 && egid != old_rgid))
                current->sgid = current->egid;
        current->fsgid = current->egid;
+       if (current->egid != old_egid)
+               current->dumpable = 0;
        return 0;
 }
 
@@ -227,12 +230,16 @@ asmlinkage int sys_setregid(gid_t rgid, gid_t egid)
  */
 asmlinkage int sys_setgid(gid_t gid)
 {
+       int old_egid = current->egid;
+
        if (suser())
                current->gid = current->egid = current->sgid = current->fsgid = gid;
        else if ((gid == current->gid) || (gid == current->sgid))
                current->egid = current->fsgid = gid;
        else
                return -EPERM;
+       if (current->egid != old_egid)
+               current->dumpable = 0;
        return 0;
 }
 
@@ -284,6 +291,7 @@ asmlinkage int sys_old_syscall(void)
 asmlinkage int sys_setreuid(uid_t ruid, uid_t euid)
 {
        int old_ruid = current->uid;
+       int old_euid = current->euid;
 
        if (ruid != (uid_t) -1) {
                if ((old_ruid == ruid) || 
@@ -308,6 +316,8 @@ asmlinkage int sys_setreuid(uid_t ruid, uid_t euid)
            (euid != (uid_t) -1 && euid != old_ruid))
                current->suid = current->euid;
        current->fsuid = current->euid;
+       if (current->euid != old_euid)
+               current->dumpable = 0;
        return 0;
 }
 
@@ -324,12 +334,16 @@ asmlinkage int sys_setreuid(uid_t ruid, uid_t euid)
  */
 asmlinkage int sys_setuid(uid_t uid)
 {
+       int old_euid = current->euid;
+
        if (suser())
                current->uid = current->euid = current->suid = current->fsuid = uid;
        else if ((uid == current->uid) || (uid == current->suid))
                current->fsuid = current->euid = uid;
        else
                return -EPERM;
+       if (current->euid != old_euid)
+               current->dumpable = 0;
        return(0);
 }
 
@@ -346,6 +360,8 @@ asmlinkage int sys_setfsuid(uid_t uid)
        if (uid == current->uid || uid == current->euid ||
            uid == current->suid || uid == current->fsuid || suser())
                current->fsuid = uid;
+       if (current->fsuid != old_fsuid)
+               current->dumpable = 0;
        return old_fsuid;
 }
 
@@ -359,6 +375,8 @@ asmlinkage int sys_setfsgid(gid_t gid)
        if (gid == current->gid || gid == current->egid ||
            gid == current->sgid || gid == current->fsgid || suser())
                current->fsgid = gid;
+       if (current->fsgid != old_fsgid)
+               current->dumpable = 0;
        return old_fsgid;
 }
 
index 48791b980ad51a217f1e82d1a502776f7aa4cb8a..65c404491679a7162c471abf89b244765bb86f5d 100644 (file)
@@ -1259,7 +1259,7 @@ static int inet_select(struct socket *sock, int sel_type, select_table *wait )
 static int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
 {
        struct sock *sk=(struct sock *)sock->data;
-       int err;
+       int err, pid;
 
        switch(cmd) 
        {
@@ -1268,7 +1268,11 @@ static int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
                        err=verify_area(VERIFY_READ,(int *)arg,sizeof(long));
                        if(err)
                                return err;
-                       sk->proc = get_fs_long((int *) arg);
+                       pid = get_fs_long((int *) arg);
+                       /* see inet_fcntl */
+                       if (current->pid != pid && current->pgrp != -pid && !suser())
+                               return -EPERM;
+                       sk->proc = pid;
                        return(0);
                case FIOGETOWN:
                case SIOCGPGRP:
index 7605511a49743ec904ab0e66e2aba8e94a8b8e79..05a1b6085c7fbd948beb10ac2e9c6eef82e4a0f4 100644 (file)
  *             Alan Cox        :       tcp_data() doesn't ack illegal PSH
  *                                     only frames. At least one pc tcp stack
  *                                     generates them.
+ *             Mark Yarvis     :       In tcp_read_wakeup(), don't send an
+ *                                     ack if stat is TCP_CLOSED.
  *
  *
  * To Fix:
@@ -1802,6 +1804,13 @@ static void tcp_read_wakeup(struct sock *sk)
        if (!sk->ack_backlog) 
                return;
 
+       /*
+        * If we're closed, don't send an ack, or we'll get a RST
+        * from the closed destination.
+        */
+       if ((sk->state == TCP_CLOSE) || (sk->state == TCP_TIME_WAIT))
+               return; 
+
        /*
         * FIXME: we need to put code here to prevent this routine from
         * being called.  Being called once in a while is ok, so only check