linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ralf@linux-mips.org
Date: Wed, 01 Jun 2005 15:15:34 +0100
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ralf@ftp.linux-mips.org 05/06/01 15:15:27

Modified files:
        .              : Tag: linux_2_4 Makefile 
        arch/i386/kernel: Tag: linux_2_4 mtrr.c 
        net/ipv4/ipvs  : Tag: linux_2_4 ip_vs_ctl.c ip_vs_sched.c 
                         ip_vs_sync.c 

Log message:
        Merge with Linux 2.4.31.

diff -urN linux/Makefile linux/Makefile
--- linux/Makefile      2005/05/25 17:14:22     1.119.2.38
+++ linux/Makefile      2005/06/01 14:15:27     1.119.2.39
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 31
-EXTRAVERSION = -rc1
+EXTRAVERSION =
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux/arch/i386/kernel/mtrr.c linux/arch/i386/kernel/mtrr.c
--- linux/arch/i386/kernel/Attic/mtrr.c 2004/08/14 18:38:45     1.34.2.4
+++ linux/arch/i386/kernel/Attic/mtrr.c 2005/06/01 14:15:27     1.34.2.5
@@ -1674,6 +1674,7 @@
     char *ptr;
     char line[LINE_SIZE];
 
+    if (!len) return -EINVAL;
     if ( !suser () ) return -EPERM;
     /*  Can't seek (pwrite) on this device  */
     if (ppos != &file->f_pos) return -ESPIPE;
diff -urN linux/net/ipv4/ipvs/ip_vs_ctl.c linux/net/ipv4/ipvs/ip_vs_ctl.c
--- linux/net/ipv4/ipvs/ip_vs_ctl.c     2005/01/20 02:19:25     1.6.2.4
+++ linux/net/ipv4/ipvs/ip_vs_ctl.c     2005/06/01 14:15:27     1.6.2.5
@@ -1842,7 +1842,8 @@
                        entry.addr = svc->addr;
                        entry.port = svc->port;
                        entry.fwmark = svc->fwmark;
-                       strcpy(entry.sched_name, svc->scheduler->name);
+                       strncpy(entry.sched_name, svc->scheduler->name, 
sizeof(entry.sched_name));
+                       entry.sched_name[sizeof(entry.sched_name) - 1] = 0;
                        entry.flags = svc->flags;
                        entry.timeout = svc->timeout / HZ;
                        entry.netmask = svc->netmask;
@@ -1866,7 +1867,8 @@
                        entry.addr = svc->addr;
                        entry.port = svc->port;
                        entry.fwmark = svc->fwmark;
-                       strcpy(entry.sched_name, svc->scheduler->name);
+                       strncpy(entry.sched_name, svc->scheduler->name, 
sizeof(entry.sched_name));
+                       entry.sched_name[sizeof(entry.sched_name) - 1] = 0;
                        entry.flags = svc->flags;
                        entry.timeout = svc->timeout / HZ;
                        entry.netmask = svc->netmask;
@@ -2020,7 +2022,8 @@
                        svc = __ip_vs_service_get(get.protocol,
                                                  get.addr, get.port);
                if (svc) {
-                       strcpy(get.sched_name, svc->scheduler->name);
+                       strncpy(get.sched_name, svc->scheduler->name, 
sizeof(get.sched_name));
+                       get.sched_name[sizeof(get.sched_name) - 1] = 0;
                        get.flags = svc->flags;
                        get.timeout = svc->timeout / HZ;
                        get.netmask = svc->netmask;
@@ -2083,10 +2086,14 @@
                        goto out;
                }
                u.state = ip_vs_sync_state;
-               if (ip_vs_sync_state & IP_VS_STATE_MASTER)
-                       strcpy(u.mcast_master_ifn, ip_vs_mcast_master_ifn);
-               if (ip_vs_sync_state & IP_VS_STATE_BACKUP)
-                       strcpy(u.mcast_backup_ifn, ip_vs_mcast_backup_ifn);
+               if (ip_vs_sync_state & IP_VS_STATE_MASTER) {
+                       strncpy(u.mcast_master_ifn, ip_vs_mcast_master_ifn, 
sizeof(u.mcast_master_ifn));
+                       u.mcast_master_ifn[sizeof(u.mcast_master_ifn) - 1] = 0;
+               }
+               if (ip_vs_sync_state & IP_VS_STATE_BACKUP) {
+                       strncpy(u.mcast_backup_ifn, ip_vs_mcast_backup_ifn, 
sizeof(u.mcast_backup_ifn));
+                       u.mcast_backup_ifn[sizeof(u.mcast_backup_ifn) - 1] = 0;
+               }
                if (copy_to_user(user, &u, sizeof(u)) != 0)
                        ret = -EFAULT;
        }
diff -urN linux/net/ipv4/ipvs/ip_vs_sched.c linux/net/ipv4/ipvs/ip_vs_sched.c
--- linux/net/ipv4/ipvs/ip_vs_sched.c   2004/04/16 03:14:22     1.3.2.2
+++ linux/net/ipv4/ipvs/ip_vs_sched.c   2005/06/01 14:15:27     1.3.2.3
@@ -156,7 +156,7 @@
         */
        if (sched == NULL) {
                char module_name[IP_VS_SCHEDNAME_MAXLEN+8];
-               sprintf(module_name,"ip_vs_%s", sched_name);
+               snprintf(module_name, sizeof(module_name), "ip_vs_%s", 
sched_name);
                request_module(module_name);
                sched = ip_vs_sched_getbyname(sched_name);
        }
diff -urN linux/net/ipv4/ipvs/ip_vs_sync.c linux/net/ipv4/ipvs/ip_vs_sync.c
--- linux/net/ipv4/ipvs/ip_vs_sync.c    2005/01/20 02:19:25     1.4.2.4
+++ linux/net/ipv4/ipvs/ip_vs_sync.c    2005/06/01 14:15:27     1.4.2.5
@@ -808,10 +808,12 @@
 
        ip_vs_sync_state |= state;
        if (state == IP_VS_STATE_MASTER) {
-               strcpy(ip_vs_mcast_master_ifn, mcast_ifn);
+               strncpy(ip_vs_mcast_master_ifn, mcast_ifn, 
sizeof(ip_vs_mcast_master_ifn));
+               ip_vs_mcast_master_ifn[sizeof(ip_vs_mcast_master_ifn) - 1] = 0;
                ip_vs_master_syncid = syncid;
        } else {
-               strcpy(ip_vs_mcast_backup_ifn, mcast_ifn);
+               strncpy(ip_vs_mcast_backup_ifn, mcast_ifn, 
sizeof(ip_vs_mcast_backup_ifn));
+               ip_vs_mcast_backup_ifn[sizeof(ip_vs_mcast_backup_ifn) - 1] = 0;
                ip_vs_backup_syncid = syncid;
        }
 

<Prev in Thread] Current Thread [Next in Thread>