Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/sys Pullup the following revisions, requested by maxv in ...



details:   https://anonhg.NetBSD.org/src/rev/91e7f91f985b
branches:  netbsd-7
changeset: 798454:91e7f91f985b
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Oct 20 09:55:54 2014 +0000

description:
Pullup the following revisions, requested by maxv in ticket #148:

sys/compat/svr4/svr4_stat.c                     1.70
sys/dev/dm/dm_target_snapshot.c                 1.17
sys/dev/if_ndis/if_ndis_pci.c                   1.20
sys/fs/smbfs/smbfs_smb.c                        1.45
sys/ufs/ext2fs/ext2fs_readwrite.c               1.65

Various fixes: two memory leaks, a typo, a dead compiler condition and
unused macros, respectively in if_ndis and dm, smbfs, svr4 and ext2fs.

diffstat:

 sys/compat/svr4/svr4_stat.c       |  5 ++---
 sys/dev/dm/dm_target_snapshot.c   |  9 +++++----
 sys/dev/if_ndis/if_ndis_pci.c     |  7 +------
 sys/fs/smbfs/smbfs_smb.c          |  6 +++---
 sys/ufs/ext2fs/ext2fs_readwrite.c |  8 ++------
 5 files changed, 13 insertions(+), 22 deletions(-)

diffs (137 lines):

diff -r 98109fa3415b -r 91e7f91f985b sys/compat/svr4/svr4_stat.c
--- a/sys/compat/svr4/svr4_stat.c       Sun Oct 19 16:12:22 2014 +0000
+++ b/sys/compat/svr4/svr4_stat.c       Mon Oct 20 09:55:54 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svr4_stat.c,v 1.69 2009/01/11 02:45:50 christos Exp $   */
+/*     $NetBSD: svr4_stat.c,v 1.69.40.1 2014/10/20 09:55:54 martin Exp $        */
 
 /*-
  * Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: svr4_stat.c,v 1.69 2009/01/11 02:45:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_stat.c,v 1.69.40.1 2014/10/20 09:55:54 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -478,7 +478,6 @@
 #if defined(__i386__)
                str = "i86pc";
 #elif defined(__sparc__)
-#elif defined(__sparc__)
                {
                        extern char machine_model[];
 
diff -r 98109fa3415b -r 91e7f91f985b sys/dev/dm/dm_target_snapshot.c
--- a/sys/dev/dm/dm_target_snapshot.c   Sun Oct 19 16:12:22 2014 +0000
+++ b/sys/dev/dm/dm_target_snapshot.c   Mon Oct 20 09:55:54 2014 +0000
@@ -1,4 +1,4 @@
-/*        $NetBSD: dm_target_snapshot.c,v 1.16 2014/06/14 07:39:00 hannken Exp $      */
+/*        $NetBSD: dm_target_snapshot.c,v 1.16.2.1 2014/10/20 09:55:54 martin Exp $      */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -221,8 +221,7 @@
        if ((dmp_snap = dm_pdev_insert(argv[0])) == NULL)
                return ENOENT;
 
-       if ((tsc = kmem_alloc(sizeof(dm_target_snapshot_config_t), KM_NOSLEEP))
-           == NULL)
+       if ((tsc = kmem_alloc(sizeof(*tsc), KM_NOSLEEP)) == NULL)
                return 1;
 
        tsc->tsc_persistent_dev = 0;
@@ -232,8 +231,10 @@
                tsc->tsc_persistent_dev = 1;
 
                /* Insert cow device to global pdev list */
-               if ((dmp_cow = dm_pdev_insert(argv[1])) == NULL)
+               if ((dmp_cow = dm_pdev_insert(argv[1])) == NULL) {
+                       kmem_free(tsc, sizeof(*tsc));
                        return ENOENT;
+               }
        }
        tsc->tsc_chunk_size = atoi(argv[3]);
 
diff -r 98109fa3415b -r 91e7f91f985b sys/dev/if_ndis/if_ndis_pci.c
--- a/sys/dev/if_ndis/if_ndis_pci.c     Sun Oct 19 16:12:22 2014 +0000
+++ b/sys/dev/if_ndis/if_ndis_pci.c     Mon Oct 20 09:55:54 2014 +0000
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ndis_pci.c,v 1.19 2012/10/27 17:18:23 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ndis_pci.c,v 1.19.12.1 2014/10/20 09:55:54 martin Exp $");
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis_pci.c,v 1.8.2.3 2005/03/31 04:24:36 wpaul Exp $");
 #endif
@@ -358,11 +358,6 @@
        
        printf("pci interrupt: %s\n", pci_intr_string(pa->pa_pc, ih));
        
-       if(rl == NULL) {
-               sc->error = ENOMEM;
-               return;
-       }
-       
        /* save resource list in the softc */
        sc->ndis_rl = rl;
        sc->ndis_rescnt = rl->cprl_count;
diff -r 98109fa3415b -r 91e7f91f985b sys/fs/smbfs/smbfs_smb.c
--- a/sys/fs/smbfs/smbfs_smb.c  Sun Oct 19 16:12:22 2014 +0000
+++ b/sys/fs/smbfs/smbfs_smb.c  Mon Oct 20 09:55:54 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smbfs_smb.c,v 1.44 2012/11/30 23:24:21 nakayama Exp $  */
+/*     $NetBSD: smbfs_smb.c,v 1.44.12.1 2014/10/20 09:55:54 martin Exp $       */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smbfs_smb.c,v 1.44 2012/11/30 23:24:21 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smbfs_smb.c,v 1.44.12.1 2014/10/20 09:55:54 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -778,7 +778,7 @@
        struct mbchain *mbp;
        int error;
 
-       error = smb_rq_alloc(rqp, SSTOCP(ssp), SMB_COM_MOVE, scred, &rqp);
+       error = smb_rq_alloc(SSTOCP(ssp), SMB_COM_MOVE, scred, &rqp);
        if (error)
                return error;
        smb_rq_getrequest(rqp, &mbp);
diff -r 98109fa3415b -r 91e7f91f985b sys/ufs/ext2fs/ext2fs_readwrite.c
--- a/sys/ufs/ext2fs/ext2fs_readwrite.c Sun Oct 19 16:12:22 2014 +0000
+++ b/sys/ufs/ext2fs/ext2fs_readwrite.c Mon Oct 20 09:55:54 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ext2fs_readwrite.c,v 1.64 2013/06/23 07:28:37 dholland Exp $   */
+/*     $NetBSD: ext2fs_readwrite.c,v 1.64.8.1 2014/10/20 09:55:54 martin Exp $ */
 
 /*-
  * Copyright (c) 1993
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_readwrite.c,v 1.64 2013/06/23 07:28:37 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_readwrite.c,v 1.64.8.1 2014/10/20 09:55:54 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -82,10 +82,6 @@
 #include <ufs/ext2fs/ext2fs.h>
 #include <ufs/ext2fs/ext2fs_extern.h>
 
-
-#define doclusterread 0 /* XXX underway */
-#define doclusterwrite 0
-
 /*
  * Vnode op for reading.
  */



Home | Main Index | Thread Index | Old Index