CVS commit: [pgoyette-localcount] src/sys/dev
Module Name:src Committed By: pgoyette Date: Fri Jul 22 06:32:54 UTC 2016 Modified Files: src/sys/dev [pgoyette-localcount]: cgd.c Log Message: Remove debug To generate a diff of this commit: cvs rdiff -u -r1.108.2.8 -r1.108.2.9 src/sys/dev/cgd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/cgd.c diff -u src/sys/dev/cgd.c:1.108.2.8 src/sys/dev/cgd.c:1.108.2.9 --- src/sys/dev/cgd.c:1.108.2.8 Fri Jul 22 05:49:53 2016 +++ src/sys/dev/cgd.c Fri Jul 22 06:32:54 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cgd.c,v 1.108.2.8 2016/07/22 05:49:53 pgoyette Exp $ */ +/* $NetBSD: cgd.c,v 1.108.2.9 2016/07/22 06:32:54 pgoyette Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.108.2.8 2016/07/22 05:49:53 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.108.2.9 2016/07/22 06:32:54 pgoyette Exp $"); #include #include @@ -194,18 +194,15 @@ getcgd_softc(dev_t dev, device_t *self) int unit = CGDUNIT(dev); struct cgd_softc *sc; -printf("%s: unit %d\n", __func__, unit); DPRINTF_FOLLOW(("getcgd_softc(0x%"PRIx64"): unit = %d\n", dev, unit)); *self = device_lookup_acquire(&cgd_cd, unit); -printf("%s: *self %p\n", __func__, *self); - if (*self == NULL) + if (*self == NULL) { sc = cgd_spawn(unit, self); -printf("%s: return sc %p\n", __func__, sc); - else + } else { sc = device_private(*self); -printf("%s: sc %p\n", __func__, sc); + } return sc; } @@ -281,7 +278,6 @@ cgd_spawn(int unit, device_t *self) } *self = device_lookup_acquire(&cgd_cd, unit); -printf("%s: self %p\n", __func__, *self); if (self == NULL) return NULL; else @@ -314,12 +310,9 @@ cgdopen(dev_t dev, int flags, int fmt, s struct cgd_softc *cs; DPRINTF_FOLLOW(("cgdopen(0x%"PRIx64", %d)\n", dev, flags)); -printf("%s: dev %lx\n", __func__, (long unsigned int)dev); GETCGD_SOFTC(cs, dev, self); -printf("%s: cs %p, self %p\n", __func__, cs, self); error = dk_open(&cs->sc_dksc, dev, flags, fmt, l); device_release(self); -printf("%s: return %d\n", __func__, error); return error; } @@ -1143,7 +1136,6 @@ cgd_modcmd(modcmd_t cmd, void *arg) devmajor_t bmajor = -1, cmajor = -1; #endif -printf("%s: cmd %d\n", __func__, cmd); switch (cmd) { case MODULE_CMD_INIT: #ifdef _MODULE @@ -1208,7 +1200,6 @@ printf("%s: cmd %d\n", __func__, cmd); error = ENOTTY; break; } -printf("%s: return %d\n", __func__, error); return error; }
CVS commit: [pgoyette-localcount] src/sys/dev
Module Name:src Committed By: pgoyette Date: Fri Jul 22 05:49:53 UTC 2016 Modified Files: src/sys/dev [pgoyette-localcount]: cgd.c Log Message: Call cgd_spawn() if the requested device doesn't exist, rather than if the device exists but without any softc data. To generate a diff of this commit: cvs rdiff -u -r1.108.2.7 -r1.108.2.8 src/sys/dev/cgd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/cgd.c diff -u src/sys/dev/cgd.c:1.108.2.7 src/sys/dev/cgd.c:1.108.2.8 --- src/sys/dev/cgd.c:1.108.2.7 Fri Jul 22 03:44:36 2016 +++ src/sys/dev/cgd.c Fri Jul 22 05:49:53 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cgd.c,v 1.108.2.7 2016/07/22 03:44:36 pgoyette Exp $ */ +/* $NetBSD: cgd.c,v 1.108.2.8 2016/07/22 05:49:53 pgoyette Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.108.2.7 2016/07/22 03:44:36 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.108.2.8 2016/07/22 05:49:53 pgoyette Exp $"); #include #include @@ -194,15 +194,19 @@ getcgd_softc(dev_t dev, device_t *self) int unit = CGDUNIT(dev); struct cgd_softc *sc; +printf("%s: unit %d\n", __func__, unit); DPRINTF_FOLLOW(("getcgd_softc(0x%"PRIx64"): unit = %d\n", dev, unit)); *self = device_lookup_acquire(&cgd_cd, unit); +printf("%s: *self %p\n", __func__, *self); + if (*self == NULL) - return NULL; - - sc = device_private(*self); - if (sc == NULL) sc = cgd_spawn(unit, self); +printf("%s: return sc %p\n", __func__, sc); + else + sc = device_private(*self); +printf("%s: sc %p\n", __func__, sc); + return sc; } @@ -272,9 +276,12 @@ cgd_spawn(int unit, device_t *self) cf->cf_fstate = FSTATE_STAR; if (config_attach_pseudo(cf) == NULL) +{ printf("%s: config_attach_pseudo() failed\n", __func__); return NULL; +} *self = device_lookup_acquire(&cgd_cd, unit); +printf("%s: self %p\n", __func__, *self); if (self == NULL) return NULL; else @@ -307,9 +314,12 @@ cgdopen(dev_t dev, int flags, int fmt, s struct cgd_softc *cs; DPRINTF_FOLLOW(("cgdopen(0x%"PRIx64", %d)\n", dev, flags)); +printf("%s: dev %lx\n", __func__, (long unsigned int)dev); GETCGD_SOFTC(cs, dev, self); +printf("%s: cs %p, self %p\n", __func__, cs, self); error = dk_open(&cs->sc_dksc, dev, flags, fmt, l); device_release(self); +printf("%s: return %d\n", __func__, error); return error; } @@ -546,7 +556,7 @@ cgdiodone(struct buf *nbp) /* * copy the dev_t, finish the disk operation, and release the - * reference we're holding on to (from cgd_getsoftc() earlier) + * reference we're holding on to (from getcgd_softc() earlier) */ dev = obp->b_dev; dk_done(dksc, obp);
CVS commit: src/sys/dev/ata
Module Name:src Committed By: jakllsch Date: Fri Jul 22 04:08:10 UTC 2016 Modified Files: src/sys/dev/ata: wd.c wdvar.h Log Message: Add ATA8-ACS Long Logical Sector Feature Set support to wd(4). To generate a diff of this commit: cvs rdiff -u -r1.423 -r1.424 src/sys/dev/ata/wd.c cvs rdiff -u -r1.42 -r1.43 src/sys/dev/ata/wdvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ata/wd.c diff -u src/sys/dev/ata/wd.c:1.423 src/sys/dev/ata/wd.c:1.424 --- src/sys/dev/ata/wd.c:1.423 Thu Jul 21 19:05:03 2016 +++ src/sys/dev/ata/wd.c Fri Jul 22 04:08:10 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.423 2016/07/21 19:05:03 jakllsch Exp $ */ +/* $NetBSD: wd.c,v 1.424 2016/07/22 04:08:10 jakllsch Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -54,7 +54,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.423 2016/07/21 19:05:03 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.424 2016/07/22 04:08:10 jakllsch Exp $"); #include "opt_ata.h" @@ -391,7 +391,16 @@ wdattach(device_t parent, device_t self, wd->sc_params.atap_heads * wd->sc_params.atap_sectors; } - format_bytes(pbuf, sizeof(pbuf), wd->sc_capacity * DEV_BSIZE); + if ((wd->sc_params.atap_secsz & ATA_SECSZ_VALID_MASK) == ATA_SECSZ_VALID + && ((wd->sc_params.atap_secsz & ATA_SECSZ_LLS) != 0)) { + wd->sc_blksize = 2ULL * + (wd->sc_params.atap_lls_secsz[1] << 16 | + wd->sc_params.atap_lls_secsz[0] << 0); + } else { + wd->sc_blksize = 512; + } + wd->sc_capacity512 = (wd->sc_capacity * wd->sc_blksize) / DEV_BSIZE; + format_bytes(pbuf, sizeof(pbuf), wd->sc_capacity * wd->sc_blksize); aprint_normal_dev(self, "%s, %d cyl, %d head, %d sec, " "%d bytes/sect x %llu sectors\n", pbuf, @@ -399,11 +408,17 @@ wdattach(device_t parent, device_t self, (wd->sc_params.atap_heads * wd->sc_params.atap_sectors)) : wd->sc_params.atap_cylinders, wd->sc_params.atap_heads, wd->sc_params.atap_sectors, - DEV_BSIZE, (unsigned long long)wd->sc_capacity); + wd->sc_blksize, (unsigned long long)wd->sc_capacity); ATADEBUG_PRINT(("%s: atap_dmatiming_mimi=%d, atap_dmatiming_recom=%d\n", device_xname(self), wd->sc_params.atap_dmatiming_mimi, wd->sc_params.atap_dmatiming_recom), DEBUG_PROBE); + + if (wd->sc_blksize <= 0 || !powerof2(wd->sc_blksize) || + wd->sc_blksize < DEV_BSIZE || wd->sc_blksize > MAXPHYS) { + aprint_normal_dev(self, "WARNING: block size %u " + "might not actually work\n", wd->sc_blksize); + } out: /* * Initialize and attach the disk structure. @@ -544,7 +559,7 @@ wdstrategy(struct buf *bp) */ if (WDPART(bp->b_dev) == RAW_PART) { if (bounds_check_with_mediasize(bp, DEV_BSIZE, - wd->sc_capacity) <= 0) + wd->sc_capacity512) <= 0) goto done; } else { if (bounds_check_with_label(&wd->sc_dk, bp, @@ -577,7 +592,7 @@ wdstrategy(struct buf *bp) */ if (__predict_false(!SLIST_EMPTY(&wd->sc_bslist))) { struct disk_badsectors *dbs; - daddr_t maxblk = blkno + (bp->b_bcount >> DEV_BSHIFT) - 1; + daddr_t maxblk = blkno + (bp->b_bcount / wd->sc_blksize) - 1; SLIST_FOREACH(dbs, &wd->sc_bslist, dbs_next) if ((dbs->dbs_min <= blkno && blkno <= dbs->dbs_max) || @@ -664,8 +679,8 @@ wd_split_mod15_write(struct buf *bp) bp->b_oflags = obp->b_oflags; bp->b_cflags = obp->b_cflags; bp->b_data = (char *)bp->b_data + bp->b_bcount; - bp->b_blkno += (bp->b_bcount / 512); - bp->b_rawblkno += (bp->b_bcount / 512); + bp->b_blkno += (bp->b_bcount / DEV_BSIZE); + bp->b_rawblkno += (bp->b_bcount / sc->sc_blksize); s = splbio(); wdstart1(sc, bp); splx(s); @@ -837,7 +852,8 @@ retry2: dbs = malloc(sizeof *dbs, M_TEMP, M_WAITOK); dbs->dbs_min = bp->b_rawblkno; - dbs->dbs_max = dbs->dbs_min + (bp->b_bcount >> DEV_BSHIFT) - 1; + dbs->dbs_max = dbs->dbs_min + + (bp->b_bcount /wd->sc_blksize) - 1; microtime(&dbs->dbs_failedat); SLIST_INSERT_HEAD(&wd->sc_bslist, dbs, dbs_next); wd->sc_bscount++; @@ -894,9 +910,11 @@ wdrestart(void *v) static void wdminphys(struct buf *bp) { + const struct wd_softc * const wd = + device_lookup_private(&wd_cd, WDUNIT(bp->b_dev)); - if (bp->b_bcount > (512 * 128)) { - bp->b_bcount = (512 * 128); + if (bp->b_bcount > (wd->sc_blksize * 128)) { + bp->b_bcount = (wd->sc_blksize * 128); } minphys(bp); } @@ -1065,7 +1083,7 @@ wdgetdefaultlabel(struct wd_softc *wd, s ATADEBUG_PRINT(("wdgetdefaultlabel\n"), DEBUG_FUNCS); memset(lp, 0, sizeof(struct disklabel)); - lp->d_secsize = DEV_BSIZE; + lp->d_secsize = wd->sc_blksize; lp->d_ntracks = wd->sc_params.atap_heads; lp->d_nsectors = wd->sc_params.atap_sectors; lp->d_ncylinders = (wd->sc_flags & WDF_LBA) ? wd->sc_capacity / @@ -1537,8 +1555,8 @@ wddiscard(dev_t dev, off_t pos, off_t le return EIO; /* round the start up and the end down */ - bno = (pos + DE
CVS commit: [pgoyette-localcount] src/sys/kern
Module Name:src Committed By: pgoyette Date: Fri Jul 22 03:55:12 UTC 2016 Modified Files: src/sys/kern [pgoyette-localcount]: vfs_mount.c Log Message: Fix up the error/exit path. Return actual error, not blindly report success! To generate a diff of this commit: cvs rdiff -u -r1.40.2.1 -r1.40.2.2 src/sys/kern/vfs_mount.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_mount.c diff -u src/sys/kern/vfs_mount.c:1.40.2.1 src/sys/kern/vfs_mount.c:1.40.2.2 --- src/sys/kern/vfs_mount.c:1.40.2.1 Wed Jul 20 23:47:57 2016 +++ src/sys/kern/vfs_mount.c Fri Jul 22 03:55:12 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_mount.c,v 1.40.2.1 2016/07/20 23:47:57 pgoyette Exp $ */ +/* $NetBSD: vfs_mount.c,v 1.40.2.2 2016/07/22 03:55:12 pgoyette Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.40.2.1 2016/07/20 23:47:57 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.40.2.2 2016/07/22 03:55:12 pgoyette Exp $"); #define _VFS_VNODE_PRIVATE @@ -1316,7 +1316,7 @@ rawdev_mounted(vnode_t *vp, vnode_t **bv { vnode_t *bvp; dev_t dev; - int d_type, busy; + int d_type, ret; const struct cdevsw *cdev = NULL; const struct bdevsw *bdev = NULL; @@ -1359,8 +1359,10 @@ rawdev_mounted(vnode_t *vp, vnode_t **bv break; } - if (d_type != D_DISK) - return EINVAL; + if (d_type != D_DISK) { + ret = EINVAL; + goto out; + } if (bvpp != NULL) *bvpp = bvp; @@ -1370,16 +1372,18 @@ rawdev_mounted(vnode_t *vp, vnode_t **bv * XXX: not only if this specific slice is mounted, but * XXX: if it's on a disk with any other mounted slice. */ - busy =vfs_mountedon(bvp); + if (vfs_mountedon(bvp) != 0) + ret = EBUSY; + else + ret = 0; + out: if (bdev != NULL) bdevsw_release(bdev); if (cdev != NULL) cdevsw_release(cdev); - if (busy) - return EBUSY; - return 0; + return ret; } /*
CVS commit: [pgoyette-localcount] src/sys/dev
Module Name:src Committed By: pgoyette Date: Fri Jul 22 03:44:36 UTC 2016 Modified Files: src/sys/dev [pgoyette-localcount]: cgd.c Log Message: Pass correct arg to cgd_spawn() To generate a diff of this commit: cvs rdiff -u -r1.108.2.6 -r1.108.2.7 src/sys/dev/cgd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/cgd.c diff -u src/sys/dev/cgd.c:1.108.2.6 src/sys/dev/cgd.c:1.108.2.7 --- src/sys/dev/cgd.c:1.108.2.6 Fri Jul 22 03:40:51 2016 +++ src/sys/dev/cgd.c Fri Jul 22 03:44:36 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cgd.c,v 1.108.2.6 2016/07/22 03:40:51 pgoyette Exp $ */ +/* $NetBSD: cgd.c,v 1.108.2.7 2016/07/22 03:44:36 pgoyette Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.108.2.6 2016/07/22 03:40:51 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.108.2.7 2016/07/22 03:44:36 pgoyette Exp $"); #include #include @@ -202,7 +202,7 @@ getcgd_softc(dev_t dev, device_t *self) sc = device_private(*self); if (sc == NULL) - sc = cgd_spawn(unit, *self); + sc = cgd_spawn(unit, self); return sc; }
CVS commit: [pgoyette-localcount] src/sys/dev
Module Name:src Committed By: pgoyette Date: Fri Jul 22 03:40:51 UTC 2016 Modified Files: src/sys/dev [pgoyette-localcount]: cgd.c Log Message: Use correct prototype. To generate a diff of this commit: cvs rdiff -u -r1.108.2.5 -r1.108.2.6 src/sys/dev/cgd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/cgd.c diff -u src/sys/dev/cgd.c:1.108.2.5 src/sys/dev/cgd.c:1.108.2.6 --- src/sys/dev/cgd.c:1.108.2.5 Fri Jul 22 03:39:43 2016 +++ src/sys/dev/cgd.c Fri Jul 22 03:40:51 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cgd.c,v 1.108.2.5 2016/07/22 03:39:43 pgoyette Exp $ */ +/* $NetBSD: cgd.c,v 1.108.2.6 2016/07/22 03:40:51 pgoyette Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.108.2.5 2016/07/22 03:39:43 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.108.2.6 2016/07/22 03:40:51 pgoyette Exp $"); #include #include @@ -102,7 +102,7 @@ const struct cdevsw cgd_cdevsw = { static int cgd_match(device_t, cfdata_t, void *); static void cgd_attach(device_t, device_t, void *); static int cgd_detach(device_t, int); -static struct cgd_softc *cgd_spawn(int, *device_t); +static struct cgd_softc *cgd_spawn(int, device_t *); static int cgd_destroy(device_t); /* Internal Functions */
CVS commit: [pgoyette-localcount] src/sys/dev
Module Name:src Committed By: pgoyette Date: Fri Jul 22 03:39:43 UTC 2016 Modified Files: src/sys/dev [pgoyette-localcount]: cgd.c Log Message: Make sure that whenever we're using the cgd device's softc, we maintain a reference to the device so things won't get deleted out from under us! To generate a diff of this commit: cvs rdiff -u -r1.108.2.4 -r1.108.2.5 src/sys/dev/cgd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/cgd.c diff -u src/sys/dev/cgd.c:1.108.2.4 src/sys/dev/cgd.c:1.108.2.5 --- src/sys/dev/cgd.c:1.108.2.4 Wed Jul 20 06:51:13 2016 +++ src/sys/dev/cgd.c Fri Jul 22 03:39:43 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cgd.c,v 1.108.2.4 2016/07/20 06:51:13 pgoyette Exp $ */ +/* $NetBSD: cgd.c,v 1.108.2.5 2016/07/22 03:39:43 pgoyette Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.108.2.4 2016/07/20 06:51:13 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.108.2.5 2016/07/22 03:39:43 pgoyette Exp $"); #include #include @@ -102,7 +102,7 @@ const struct cdevsw cgd_cdevsw = { static int cgd_match(device_t, cfdata_t, void *); static void cgd_attach(device_t, device_t, void *); static int cgd_detach(device_t, int); -static struct cgd_softc *cgd_spawn(int); +static struct cgd_softc *cgd_spawn(int, *device_t); static int cgd_destroy(device_t); /* Internal Functions */ @@ -172,7 +172,8 @@ static void hexprint(const char *, void /* Utility Functions */ #define CGDUNIT(x) DISKUNIT(x) -#define GETCGD_SOFTC(_cs, x) if (!((_cs) = getcgd_softc(x))) return ENXIO +#define GETCGD_SOFTC(_cs, x, _dv)\ + if (!((_cs) = getcgd_softc(x, &_dv))) return ENXIO; /* The code */ @@ -188,16 +189,20 @@ cgd_release(dev_t dev) } static struct cgd_softc * -getcgd_softc(dev_t dev) +getcgd_softc(dev_t dev, device_t *self) { int unit = CGDUNIT(dev); struct cgd_softc *sc; DPRINTF_FOLLOW(("getcgd_softc(0x%"PRIx64"): unit = %d\n", dev, unit)); - sc = device_lookup_private(&cgd_cd, unit); + *self = device_lookup_acquire(&cgd_cd, unit); + if (*self == NULL) + return NULL; + + sc = device_private(*self); if (sc == NULL) - sc = cgd_spawn(unit); + sc = cgd_spawn(unit, *self); return sc; } @@ -256,9 +261,8 @@ cgdattach(int num) } static struct cgd_softc * -cgd_spawn(int unit) +cgd_spawn(int unit, device_t *self) { - device_t self; cfdata_t cf; cf = malloc(sizeof(*cf), M_DEVBUF, M_WAITOK); @@ -270,14 +274,15 @@ cgd_spawn(int unit) if (config_attach_pseudo(cf) == NULL) return NULL; - self = device_lookup_acquire(&cgd_cd, unit); + *self = device_lookup_acquire(&cgd_cd, unit); if (self == NULL) return NULL; else /* - * Note that we return with a reference to the device! + * Note that we return while still holding a reference + * to the device! */ - return device_private(self); + return device_private(*self); } static int @@ -297,40 +302,50 @@ cgd_destroy(device_t dev) static int cgdopen(dev_t dev, int flags, int fmt, struct lwp *l) { + device_t self; + int error; struct cgd_softc *cs; DPRINTF_FOLLOW(("cgdopen(0x%"PRIx64", %d)\n", dev, flags)); - GETCGD_SOFTC(cs, dev); - return dk_open(&cs->sc_dksc, dev, flags, fmt, l); + GETCGD_SOFTC(cs, dev, self); + error = dk_open(&cs->sc_dksc, dev, flags, fmt, l); + device_release(self); + return error; } static int cgdclose(dev_t dev, int flags, int fmt, struct lwp *l) { int error; + device_t self; struct cgd_softc *cs; struct dk_softc *dksc; DPRINTF_FOLLOW(("cgdclose(0x%"PRIx64", %d)\n", dev, flags)); - GETCGD_SOFTC(cs, dev); + GETCGD_SOFTC(cs, dev, self); dksc = &cs->sc_dksc; - if ((error = dk_close(dksc, dev, flags, fmt, l)) != 0) + if ((error = dk_close(dksc, dev, flags, fmt, l)) != 0) { + device_release(self); return error; + } if (!DK_ATTACHED(dksc)) { if ((error = cgd_destroy(cs->sc_dksc.sc_dev)) != 0) { aprint_error_dev(dksc->sc_dev, "unable to detach instance\n"); + device_release(self); return error; } } - return 0; + device_release(self); + return error; } static void cgdstrategy(struct buf *bp) { - struct cgd_softc *cs = getcgd_softc(bp->b_dev); + device_t self; + struct cgd_softc *cs = getcgd_softc(bp->b_dev, &self); struct dk_softc *dksc = &cs->sc_dksc; struct disk_geom *dg = &dksc->sc_dkdev.dk_geom; @@ -349,12 +364,14 @@ cgdstrategy(struct buf *bp) bp->b_resid = bp->b_bcount; biodone(bp); cgd_release(bp->b_dev); + device_release(self); return; } /* XXXrcd: Should we test for (cs != NULL)? */ dk_strategy(&cs->sc_dksc, bp); cgd_release(bp->b_dev); + device_release(self); return; } @@ -362,7 +379,8 @@ static int cgdsize(dev_t dev) { int retval; - struct cgd_softc *cs = getcgd_softc(dev); + device_t self; + struct cgd_softc *cs = getcgd_softc(dev, &self); DPRINTF_FOLLOW(("
CVS commit: [pgoyette-localcount] src/sys/kern
Module Name:src Committed By: pgoyette Date: Fri Jul 22 02:05:39 UTC 2016 Modified Files: src/sys/kern [pgoyette-localcount]: subr_autoconf.c Log Message: Remove stray debugging info To generate a diff of this commit: cvs rdiff -u -r1.246.2.3 -r1.246.2.4 src/sys/kern/subr_autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.246.2.3 src/sys/kern/subr_autoconf.c:1.246.2.4 --- src/sys/kern/subr_autoconf.c:1.246.2.3 Fri Jul 22 02:02:24 2016 +++ src/sys/kern/subr_autoconf.c Fri Jul 22 02:05:39 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.246.2.3 2016/07/22 02:02:24 pgoyette Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.246.2.4 2016/07/22 02:05:39 pgoyette Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.246.2.3 2016/07/22 02:02:24 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.246.2.4 2016/07/22 02:05:39 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -2328,7 +2328,6 @@ device_lookup_private_acquire(cfdriver_t p = device_private(dv); KASSERTMSG(p != NULL || dv == NULL, "%s: device %s has no private data", __func__, cd->cd_name); -unit, dv, p); */ return p; }
CVS commit: [pgoyette-localcount] src/sys/kern
Module Name:src Committed By: pgoyette Date: Fri Jul 22 02:02:24 UTC 2016 Modified Files: src/sys/kern [pgoyette-localcount]: subr_autoconf.c Log Message: In config_devfree(), free the 'struct localcount' In device_lookup_private_acquire() we need to ensure that the caller has access to the device_t so the reference that we're acquiring can later be device_release()d. So we must require that the device has non-NULL private data where the pointer back to the device_t can be stored (ie, in xxx->sc_dev). To generate a diff of this commit: cvs rdiff -u -r1.246.2.2 -r1.246.2.3 src/sys/kern/subr_autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.246.2.2 src/sys/kern/subr_autoconf.c:1.246.2.3 --- src/sys/kern/subr_autoconf.c:1.246.2.2 Sat Jul 16 22:06:42 2016 +++ src/sys/kern/subr_autoconf.c Fri Jul 22 02:02:24 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.246.2.2 2016/07/16 22:06:42 pgoyette Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.246.2.3 2016/07/22 02:02:24 pgoyette Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.246.2.2 2016/07/16 22:06:42 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.246.2.3 2016/07/22 02:02:24 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -1237,8 +1237,10 @@ config_devfree(device_t dev) { int priv = (dev->dv_flags & DVF_PRIV_ALLOC); - if (dev->dv_localcnt != NULL) + if (dev->dv_localcnt != NULL) { localcount_fini(dev->dv_localcnt); + kmem_free(dev->dv_localcnt, sizeof(*dev->dv_localcnt)); + } if (dev->dv_cfattach->ca_devsize > 0) kmem_free(dev->dv_private, dev->dv_cfattach->ca_devsize); if (priv) @@ -2256,7 +2258,7 @@ device_lookup(cfdriver_t cd, int unit) } /* - * device_lookup_accquire: + * device_lookup_acquire: * * Look up a device instance for a given driver and * hold a reference to the device. @@ -2307,14 +2309,27 @@ device_lookup_private(cfdriver_t cd, int /* * device_lookup_private_acquire: * - * Look up the softc and acquire a reference to the device - * so it won't disappear. + * Look up the softc and acquire a reference to the device so it + * won't disappear. Note that the caller must ensure that it is + * capable of calling device_release() at some later point in + * time, thus the returned private data must contain some data + * to locate the original device. Thus the private data must be + * present, not NULL! If this cannot be guaranteed, the caller + * should use device_lookup_acquire() in order to retain the + * device_t pointer. */ void * device_lookup_private_acquire(cfdriver_t cd, int unit) { + device_t dv; + void *p; - return device_private(device_lookup_acquire(cd, unit)); + dv = device_lookup_acquire(cd, unit); + p = device_private(dv); + KASSERTMSG(p != NULL || dv == NULL, + "%s: device %s has no private data", __func__, cd->cd_name); +unit, dv, p); */ + return p; } /*
CVS commit: [pgoyette-localcount] src/sys/miscfs/specfs
Module Name:src Committed By: pgoyette Date: Fri Jul 22 01:50:12 UTC 2016 Modified Files: src/sys/miscfs/specfs [pgoyette-localcount]: spec_vnops.c Log Message: Return the actual error code, rather than blind success. To generate a diff of this commit: cvs rdiff -u -r1.162.2.2 -r1.162.2.3 src/sys/miscfs/specfs/spec_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/miscfs/specfs/spec_vnops.c diff -u src/sys/miscfs/specfs/spec_vnops.c:1.162.2.2 src/sys/miscfs/specfs/spec_vnops.c:1.162.2.3 --- src/sys/miscfs/specfs/spec_vnops.c:1.162.2.2 Thu Jul 21 13:09:47 2016 +++ src/sys/miscfs/specfs/spec_vnops.c Fri Jul 22 01:50:12 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: spec_vnops.c,v 1.162.2.2 2016/07/21 13:09:47 pgoyette Exp $ */ +/* $NetBSD: spec_vnops.c,v 1.162.2.3 2016/07/22 01:50:12 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: spec_vnops.c,v 1.162.2.2 2016/07/21 13:09:47 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spec_vnops.c,v 1.162.2.3 2016/07/22 01:50:12 pgoyette Exp $"); #include #include @@ -667,7 +667,7 @@ spec_open(void *v) if (bdev != NULL) bdevsw_release(bdev); - return 0; + return error; } /*
CVS commit: src/sys/arch/newsmips
Module Name:src Committed By: christos Date: Thu Jul 21 19:49:59 UTC 2016 Modified Files: src/sys/arch/newsmips/apbus: xafb.c src/sys/arch/newsmips/dev: scsi_1185.c zs_hb.c src/sys/arch/newsmips/include: intr.h src/sys/arch/newsmips/newsmips: machdep.c news5000.c Log Message: Don't include in , introduces circular dependencies; instead include it in the 4 driver files that need it, and reorder it in machdep.c To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/newsmips/apbus/xafb.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/newsmips/dev/scsi_1185.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/newsmips/dev/zs_hb.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/newsmips/include/intr.h cvs rdiff -u -r1.117 -r1.118 src/sys/arch/newsmips/newsmips/machdep.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/newsmips/newsmips/news5000.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/newsmips/apbus/xafb.c diff -u src/sys/arch/newsmips/apbus/xafb.c:1.17 src/sys/arch/newsmips/apbus/xafb.c:1.18 --- src/sys/arch/newsmips/apbus/xafb.c:1.17 Fri Jan 31 10:43:06 2014 +++ src/sys/arch/newsmips/apbus/xafb.c Thu Jul 21 15:49:58 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: xafb.c,v 1.17 2014/01/31 15:43:06 tsutsui Exp $ */ +/* $NetBSD: xafb.c,v 1.18 2016/07/21 19:49:58 christos Exp $ */ /*- * Copyright (c) 2000 Tsubai Masanari. All rights reserved. @@ -29,7 +29,7 @@ /* "xa" frame buffer driver. Currently supports 1280x1024x8 only. */ #include -__KERNEL_RCSID(0, "$NetBSD: xafb.c,v 1.17 2014/01/31 15:43:06 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xafb.c,v 1.18 2016/07/21 19:49:58 christos Exp $"); #include #include @@ -40,10 +40,12 @@ __KERNEL_RCSID(0, "$NetBSD: xafb.c,v 1.1 #include +#include + #include #include - #include + #include #include Index: src/sys/arch/newsmips/dev/scsi_1185.c diff -u src/sys/arch/newsmips/dev/scsi_1185.c:1.22 src/sys/arch/newsmips/dev/scsi_1185.c:1.23 --- src/sys/arch/newsmips/dev/scsi_1185.c:1.22 Sat Mar 26 13:14:38 2016 +++ src/sys/arch/newsmips/dev/scsi_1185.c Thu Jul 21 15:49:58 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: scsi_1185.c,v 1.22 2016/03/26 17:14:38 martin Exp $ */ +/* $NetBSD: scsi_1185.c,v 1.23 2016/07/21 19:49:58 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -53,7 +53,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scsi_1185.c,v 1.22 2016/03/26 17:14:38 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsi_1185.c,v 1.23 2016/07/21 19:49:58 christos Exp $"); #define __INTR_PRIVATE #include @@ -67,11 +67,13 @@ __KERNEL_RCSID(0, "$NetBSD: scsi_1185.c, #include #include +#include +#include + #include #include #include -#include #include #include Index: src/sys/arch/newsmips/dev/zs_hb.c diff -u src/sys/arch/newsmips/dev/zs_hb.c:1.26 src/sys/arch/newsmips/dev/zs_hb.c:1.27 --- src/sys/arch/newsmips/dev/zs_hb.c:1.26 Fri Jun 25 23:44:49 2010 +++ src/sys/arch/newsmips/dev/zs_hb.c Thu Jul 21 15:49:58 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: zs_hb.c,v 1.26 2010/06/26 03:44:49 tsutsui Exp $ */ +/* $NetBSD: zs_hb.c,v 1.27 2016/07/21 19:49:58 christos Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: zs_hb.c,v 1.26 2010/06/26 03:44:49 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zs_hb.c,v 1.27 2016/07/21 19:49:58 christos Exp $"); #include #include @@ -48,6 +48,8 @@ __KERNEL_RCSID(0, "$NetBSD: zs_hb.c,v 1. #include #include +#include + #include #include Index: src/sys/arch/newsmips/include/intr.h diff -u src/sys/arch/newsmips/include/intr.h:1.25 src/sys/arch/newsmips/include/intr.h:1.26 --- src/sys/arch/newsmips/include/intr.h:1.25 Sun Feb 20 02:56:31 2011 +++ src/sys/arch/newsmips/include/intr.h Thu Jul 21 15:49:59 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.25 2011/02/20 07:56:31 matt Exp $ */ +/* $NetBSD: intr.h,v 1.26 2016/07/21 19:49:59 christos Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -38,7 +38,6 @@ #ifdef __INTR_PRIVATE #include -#include extern const struct ipl_sr_map newmips_ipl_sr_map; Index: src/sys/arch/newsmips/newsmips/machdep.c diff -u src/sys/arch/newsmips/newsmips/machdep.c:1.117 src/sys/arch/newsmips/newsmips/machdep.c:1.118 --- src/sys/arch/newsmips/newsmips/machdep.c:1.117 Mon Jun 29 22:39:03 2015 +++ src/sys/arch/newsmips/newsmips/machdep.c Thu Jul 21 15:49:59 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.117 2015/06/30 02:39:03 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.118 2016/07/21 19:49:59 christos Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.117 2015/06/30 02:39:03 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.118 2016/07/21 19:49:59 christos Exp $"); /* from: Utah Hdr: machdep.c
CVS commit: src/sys/dev/ata
Module Name:src Committed By: jakllsch Date: Thu Jul 21 19:05:03 UTC 2016 Modified Files: src/sys/dev/ata: wd.c Log Message: Call wd_params_to_properties() after softc is sufficently initialized. To generate a diff of this commit: cvs rdiff -u -r1.422 -r1.423 src/sys/dev/ata/wd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ata/wd.c diff -u src/sys/dev/ata/wd.c:1.422 src/sys/dev/ata/wd.c:1.423 --- src/sys/dev/ata/wd.c:1.422 Thu Jul 21 18:54:13 2016 +++ src/sys/dev/ata/wd.c Thu Jul 21 19:05:03 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.422 2016/07/21 18:54:13 jakllsch Exp $ */ +/* $NetBSD: wd.c,v 1.423 2016/07/21 19:05:03 jakllsch Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -54,7 +54,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.422 2016/07/21 18:54:13 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.423 2016/07/21 19:05:03 jakllsch Exp $"); #include "opt_ata.h" @@ -194,6 +194,7 @@ void wdstart(void *); void wdstart1(struct wd_softc*, struct buf *); void wdrestart(void *); void wddone(void *); +static void wd_params_to_properties(struct wd_softc *); int wd_get_params(struct wd_softc *, uint8_t, struct ataparams *); int wd_flushcache(struct wd_softc *, int); int wd_trim(struct wd_softc *, int, daddr_t, long); @@ -411,6 +412,7 @@ out: disk_init(&wd->sc_dk, device_xname(wd->sc_dev), &wddkdriver); disk_attach(&wd->sc_dk); wd->sc_wdc_bio.lp = wd->sc_dk.dk_label; + wd_params_to_properties(wd); rnd_attach_source(&wd->rnd_source, device_xname(wd->sc_dev), RND_TYPE_DISK, RND_FLAG_DEFAULT); @@ -1774,7 +1776,6 @@ wd_get_params(struct wd_softc *wd, uint8 wd->drvp->ata_vers = -1; /* Mark it as pre-ATA */ /* FALLTHROUGH */ case CMD_OK: - wd_params_to_properties(wd); return 0; default: panic("wd_get_params: bad return code from ata_get_params");
CVS commit: src/sys/dev/ata
Module Name:src Committed By: jakllsch Date: Thu Jul 21 18:54:13 UTC 2016 Modified Files: src/sys/dev/ata: wd.c Log Message: Remove unused 'params' argument of local function wd_params_to_properties() To generate a diff of this commit: cvs rdiff -u -r1.421 -r1.422 src/sys/dev/ata/wd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ata/wd.c diff -u src/sys/dev/ata/wd.c:1.421 src/sys/dev/ata/wd.c:1.422 --- src/sys/dev/ata/wd.c:1.421 Sun Jun 19 09:35:06 2016 +++ src/sys/dev/ata/wd.c Thu Jul 21 18:54:13 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.421 2016/06/19 09:35:06 bouyer Exp $ */ +/* $NetBSD: wd.c,v 1.422 2016/07/21 18:54:13 jakllsch Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -54,7 +54,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.421 2016/06/19 09:35:06 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.422 2016/07/21 18:54:13 jakllsch Exp $"); #include "opt_ata.h" @@ -1728,7 +1728,7 @@ bad144intern(struct wd_softc *wd) #endif static void -wd_params_to_properties(struct wd_softc *wd, struct ataparams *params) +wd_params_to_properties(struct wd_softc *wd) { struct disk_geom *dg = &wd->sc_dk.dk_geom; @@ -1774,7 +1774,7 @@ wd_get_params(struct wd_softc *wd, uint8 wd->drvp->ata_vers = -1; /* Mark it as pre-ATA */ /* FALLTHROUGH */ case CMD_OK: - wd_params_to_properties(wd, params); + wd_params_to_properties(wd); return 0; default: panic("wd_get_params: bad return code from ata_get_params");
CVS commit: src/sys/arch/newsmips/stand
Module Name:src Committed By: christos Date: Thu Jul 21 18:50:21 UTC 2016 Modified Files: src/sys/arch/newsmips/stand: Makefile.inc Log Message: add NOPIE To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/newsmips/stand/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/newsmips/stand/Makefile.inc diff -u src/sys/arch/newsmips/stand/Makefile.inc:1.8 src/sys/arch/newsmips/stand/Makefile.inc:1.9 --- src/sys/arch/newsmips/stand/Makefile.inc:1.8 Sun Jan 12 10:26:30 2014 +++ src/sys/arch/newsmips/stand/Makefile.inc Thu Jul 21 14:50:21 2016 @@ -1,6 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.8 2014/01/12 15:26:30 tsutsui Exp $ +# $NetBSD: Makefile.inc,v 1.9 2016/07/21 18:50:21 christos Exp $ BINDIR= /usr/mdec +NOPIE=yes # if there is a 'version' file, add rule for vers.c and add it to SRCS # and CLEANFILES
CVS commit: src/sys/fs/puffs
Module Name:src Committed By: christos Date: Thu Jul 21 18:21:27 UTC 2016 Modified Files: src/sys/fs/puffs: puffs_vnops.c Log Message: replace variable stack declaration with a large enough one and KASSERT. To generate a diff of this commit: cvs rdiff -u -r1.204 -r1.205 src/sys/fs/puffs/puffs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/puffs/puffs_vnops.c diff -u src/sys/fs/puffs/puffs_vnops.c:1.204 src/sys/fs/puffs/puffs_vnops.c:1.205 --- src/sys/fs/puffs/puffs_vnops.c:1.204 Thu Jul 7 02:55:42 2016 +++ src/sys/fs/puffs/puffs_vnops.c Thu Jul 21 14:21:27 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_vnops.c,v 1.204 2016/07/07 06:55:42 msaitoh Exp $ */ +/* $NetBSD: puffs_vnops.c,v 1.205 2016/07/21 18:21:27 christos Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.204 2016/07/07 06:55:42 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.205 2016/07/21 18:21:27 christos Exp $"); #include #include @@ -1147,7 +1147,7 @@ puffs_vnop_getattr(void *v) static void zerofill_lastpage(struct vnode *vp, voff_t off) { - char zbuf[PAGE_SIZE]; + char zbuf[16384]; struct iovec iov; struct uio uio; vsize_t len; @@ -1160,6 +1160,7 @@ zerofill_lastpage(struct vnode *vp, voff return; len = round_page(off) - off; + KASSERT(len < sizeof(zbuf)); memset(zbuf, 0, len); iov.iov_base = zbuf;
CVS commit: src/sys/ufs/lfs
Module Name:src Committed By: christos Date: Thu Jul 21 18:10:47 UTC 2016 Modified Files: src/sys/ufs/lfs: lfs_pages.c Log Message: Don't do variable stack allocations for systems with non-const PAGE_SIZE; instead assume that the smallest pagesize is 1024. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/ufs/lfs/lfs_pages.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ufs/lfs/lfs_pages.c diff -u src/sys/ufs/lfs/lfs_pages.c:1.7 src/sys/ufs/lfs/lfs_pages.c:1.8 --- src/sys/ufs/lfs/lfs_pages.c:1.7 Wed Aug 12 14:26:27 2015 +++ src/sys/ufs/lfs/lfs_pages.c Thu Jul 21 14:10:47 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_pages.c,v 1.7 2015/08/12 18:26:27 dholland Exp $ */ +/* $NetBSD: lfs_pages.c,v 1.8 2016/07/21 18:10:47 christos Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lfs_pages.c,v 1.7 2015/08/12 18:26:27 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lfs_pages.c,v 1.8 2016/07/21 18:10:47 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -244,7 +244,8 @@ check_dirty(struct lfs *fs, struct vnode { int by_list; struct vm_page *curpg = NULL; /* XXX: gcc */ - struct vm_page *pgs[MAXBSIZE / PAGE_SIZE], *pg; + struct vm_page *pgs[MAXBSIZE / + (__builtin_constant_p(PAGE_SIZE) ? PAGE_SIZE : 1024)], *pg; off_t soff = 0; /* XXX: gcc */ voff_t off; int i;
CVS commit: src/sys/arch/sbmips/stand
Module Name:src Committed By: christos Date: Thu Jul 21 17:45:00 UTC 2016 Modified Files: src/sys/arch/sbmips/stand: Makefile.bootxx Log Message: remove .MIPS.abiflags to avoid objcopy creating a 0x2000 large boot file. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sbmips/stand/Makefile.bootxx Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sbmips/stand/Makefile.bootxx diff -u src/sys/arch/sbmips/stand/Makefile.bootxx:1.3 src/sys/arch/sbmips/stand/Makefile.bootxx:1.4 --- src/sys/arch/sbmips/stand/Makefile.bootxx:1.3 Sun Feb 20 02:47:39 2011 +++ src/sys/arch/sbmips/stand/Makefile.bootxx Thu Jul 21 13:45:00 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.bootxx,v 1.3 2011/02/20 07:47:39 matt Exp $ +# $NetBSD: Makefile.bootxx,v 1.4 2016/07/21 17:45:00 christos Exp $ SRCS = start.S bootxx.c booted_dev.c blkdev.c cfe.c cfe_api.c \ putstr.c panic_putstr.c @@ -19,7 +19,8 @@ CLEANFILES+= ${PROG}.sym ${PROG}: ${PROG}.sym @echo creating ${PROG} from ${PROG}.sym... - @${OBJCOPY} --output-target=binary -R .reginfo ${PROG}.sym ${PROG} + @${OBJCOPY} --output-target=binary -R .reginfo -R .MIPS.abiflags \ + ${PROG}.sym ${PROG} @chmod 644 ${PROG} @ls -l ${PROG} @${CHECKSIZE_CMD} ${PROG}.sym ${PROG} ${PRIMARY_MAX_LOAD} \
CVS commit: src/sys/arch/sbmips/sbmips
Module Name:src Committed By: christos Date: Thu Jul 21 17:02:15 UTC 2016 Modified Files: src/sys/arch/sbmips/sbmips: cpu.c rtc.c sb1250_icu.c Log Message: make this compile. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sbmips/sbmips/cpu.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sbmips/sbmips/rtc.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sbmips/sbmips/sb1250_icu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sbmips/sbmips/cpu.c diff -u src/sys/arch/sbmips/sbmips/cpu.c:1.22 src/sys/arch/sbmips/sbmips/cpu.c:1.23 --- src/sys/arch/sbmips/sbmips/cpu.c:1.22 Mon Mar 24 15:13:48 2014 +++ src/sys/arch/sbmips/sbmips/cpu.c Thu Jul 21 13:02:15 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.22 2014/03/24 19:13:48 christos Exp $ */ +/* $NetBSD: cpu.c,v 1.23 2016/07/21 17:02:15 christos Exp $ */ /* * Copyright 2000, 2001 @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.22 2014/03/24 19:13:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.23 2016/07/21 17:02:15 christos Exp $"); #include "opt_multiprocessor.h" @@ -54,7 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.22 #include #include -#define READ_REG(rp) (mips3_ld((volatile uint64_t *)(rp))) +#define READ_REG(rp) mips3_ld((register_t)(rp)) static int cpu_match(device_t, cfdata_t, void *); static void cpu_attach(device_t, device_t, void *); Index: src/sys/arch/sbmips/sbmips/rtc.c diff -u src/sys/arch/sbmips/sbmips/rtc.c:1.20 src/sys/arch/sbmips/sbmips/rtc.c:1.21 --- src/sys/arch/sbmips/sbmips/rtc.c:1.20 Thu Nov 20 11:34:25 2014 +++ src/sys/arch/sbmips/sbmips/rtc.c Thu Jul 21 13:02:15 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: rtc.c,v 1.20 2014/11/20 16:34:25 christos Exp $ */ +/* $NetBSD: rtc.c,v 1.21 2016/07/21 17:02:15 christos Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.20 2014/11/20 16:34:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.21 2016/07/21 17:02:15 christos Exp $"); #include #include @@ -417,8 +417,8 @@ return; /* XXX XXX */ #include #include -#define READ_REG(rp) (mips3_ld((volatile uint64_t *)(MIPS_PHYS_TO_KSEG1(rp -#define WRITE_REG(rp, val) (mips3_sd((volatile uint64_t *)(MIPS_PHYS_TO_KSEG1(rp)), (val))) +#define READ_REG(rp) mips3_ld((register_t)(MIPS_PHYS_TO_KSEG1(rp))) +#define WRITE_REG(rp, val) mips3_sd((register_t)(MIPS_PHYS_TO_KSEG1(rp)), (val)) static void time_smbus_init(int chan) Index: src/sys/arch/sbmips/sbmips/sb1250_icu.c diff -u src/sys/arch/sbmips/sbmips/sb1250_icu.c:1.13 src/sys/arch/sbmips/sbmips/sb1250_icu.c:1.14 --- src/sys/arch/sbmips/sbmips/sb1250_icu.c:1.13 Sat Jul 9 12:59:40 2011 +++ src/sys/arch/sbmips/sbmips/sb1250_icu.c Thu Jul 21 13:02:15 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sb1250_icu.c,v 1.13 2011/07/09 16:59:40 matt Exp $ */ +/* $NetBSD: sb1250_icu.c,v 1.14 2016/07/21 17:02:15 christos Exp $ */ /* * Copyright 2000, 2001 @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sb1250_icu.c,v 1.13 2011/07/09 16:59:40 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sb1250_icu.c,v 1.14 2016/07/21 17:02:15 christos Exp $"); #define __INTR_PRIVATE @@ -90,8 +90,8 @@ static void sb1250_ipi_intr(void *, uint #endif #define SB1250_I_MAP(x) (R_IMR_INTERRUPT_MAP_BASE + (x) * 8) -#define READ_REG(rp) (mips3_ld((volatile uint64_t *)(rp))) -#define WRITE_REG(rp, val) (mips3_sd((volatile uint64_t *)(rp), (val))) +#define READ_REG(rp) mips3_ld((register_t)(rp)) +#define WRITE_REG(rp, val) mips3_sd((register_t)(rp), (val)) static void sb1250_cpu_intr(int, vaddr_t, uint32_t); static void *sb1250_intr_establish(u_int, u_int,
CVS commit: src/sys/arch/mips/sibyte
Module Name:src Committed By: christos Date: Thu Jul 21 17:02:47 UTC 2016 Modified Files: src/sys/arch/mips/sibyte/dev: sbbuswatch.c sbmac.c sbobio.c sbscn.c sbtimer.c sbwdog.c src/sys/arch/mips/sibyte/pci: sbbrz.c sbbrz_pci.c Log Message: make this compile To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/sibyte/dev/sbbuswatch.c cvs rdiff -u -r1.45 -r1.46 src/sys/arch/mips/sibyte/dev/sbmac.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/mips/sibyte/dev/sbobio.c cvs rdiff -u -r1.41 -r1.42 src/sys/arch/mips/sibyte/dev/sbscn.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/mips/sibyte/dev/sbtimer.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/mips/sibyte/dev/sbwdog.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/sibyte/pci/sbbrz.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/sibyte/pci/sbbrz_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/sibyte/dev/sbbuswatch.c diff -u src/sys/arch/mips/sibyte/dev/sbbuswatch.c:1.2 src/sys/arch/mips/sibyte/dev/sbbuswatch.c:1.3 --- src/sys/arch/mips/sibyte/dev/sbbuswatch.c:1.2 Sun Feb 20 02:47:39 2011 +++ src/sys/arch/mips/sibyte/dev/sbbuswatch.c Thu Jul 21 13:02:47 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sbbuswatch.c,v 1.2 2011/02/20 07:47:39 matt Exp $ */ +/* $NetBSD: sbbuswatch.c,v 1.3 2016/07/21 17:02:47 christos Exp $ */ /* * Copyright (c) 2010, The NetBSD Foundation, Inc. All rights reserved. * @@ -38,8 +38,8 @@ #include #include -#define READ_REG(rp)(mips3_ld((volatile uint64_t *)(rp))) -#define WRITE_REG(rp, val) (mips3_sd((volatile uint64_t *)(rp), (val))) +#define READ_REG(rp)mips3_ld((register_t)(rp)) +#define WRITE_REG(rp, val) mips3_sd((register_t)(rp), (val)) static void sibyte_bus_watch_intr(void *, uint32_t, vaddr_t); Index: src/sys/arch/mips/sibyte/dev/sbmac.c diff -u src/sys/arch/mips/sibyte/dev/sbmac.c:1.45 src/sys/arch/mips/sibyte/dev/sbmac.c:1.46 --- src/sys/arch/mips/sibyte/dev/sbmac.c:1.45 Fri Jun 10 09:27:12 2016 +++ src/sys/arch/mips/sibyte/dev/sbmac.c Thu Jul 21 13:02:47 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sbmac.c,v 1.45 2016/06/10 13:27:12 ozaki-r Exp $ */ +/* $NetBSD: sbmac.c,v 1.46 2016/07/21 17:02:47 christos Exp $ */ /* * Copyright 2000, 2001, 2004 @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.45 2016/06/10 13:27:12 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.46 2016/07/21 17:02:47 christos Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -111,8 +111,8 @@ typedef enum { sbmac_state_uninit, sbmac #define dprintf(x) #endif -#define SBMAC_READCSR(t) mips3_ld((volatile uint64_t *) (t)) -#define SBMAC_WRITECSR(t, v) mips3_sd((volatile uint64_t *) (t), (v)) +#define SBMAC_READCSR(t) mips3_ld((register_t)(t)) +#define SBMAC_WRITECSR(t, v) mips3_sd((register_t)(t), (v)) #define PKSEG1(x) ((sbmac_port_t) MIPS_PHYS_TO_KSEG1(x)) Index: src/sys/arch/mips/sibyte/dev/sbobio.c diff -u src/sys/arch/mips/sibyte/dev/sbobio.c:1.22 src/sys/arch/mips/sibyte/dev/sbobio.c:1.23 --- src/sys/arch/mips/sibyte/dev/sbobio.c:1.22 Sun Jul 10 19:32:03 2011 +++ src/sys/arch/mips/sibyte/dev/sbobio.c Thu Jul 21 13:02:47 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sbobio.c,v 1.22 2011/07/10 23:32:03 matt Exp $ */ +/* $NetBSD: sbobio.c,v 1.23 2016/07/21 17:02:47 christos Exp $ */ /* * Copyright 2000, 2001 @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sbobio.c,v 1.22 2011/07/10 23:32:03 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sbobio.c,v 1.23 2016/07/21 17:02:47 christos Exp $"); #include #include @@ -180,7 +180,7 @@ sbobio_match(device_t parent, cfdata_t m if (zap->za_locs.za_type != ZBBUS_ENTTYPE_OBIO) return (0); - sysrev = mips3_ld((volatile uint64_t *)MIPS_PHYS_TO_KSEG1(A_SCD_SYSTEM_REVISION)); + sysrev = mips3_ld((register_t)MIPS_PHYS_TO_KSEG1(A_SCD_SYSTEM_REVISION)); switch (SYS_SOC_TYPE(sysrev)) { case K_SYS_SOC_TYPE_BCM1120: case K_SYS_SOC_TYPE_BCM1125: @@ -205,7 +205,7 @@ sbobio_attach(device_t parent, device_t int i, devcount; int locs[SBOBIOCF_NLOCS]; - sysrev = mips3_ld((volatile uint64_t *)MIPS_PHYS_TO_KSEG1(A_SCD_SYSTEM_REVISION)); + sysrev = mips3_ld((register_t)MIPS_PHYS_TO_KSEG1(A_SCD_SYSTEM_REVISION)); switch (SYS_SOC_TYPE(sysrev)) { case K_SYS_SOC_TYPE_BCM1120: case K_SYS_SOC_TYPE_BCM1125: Index: src/sys/arch/mips/sibyte/dev/sbscn.c diff -u src/sys/arch/mips/sibyte/dev/sbscn.c:1.41 src/sys/arch/mips/sibyte/dev/sbscn.c:1.42 --- src/sys/arch/mips/sibyte/dev/sbscn.c:1.41 Mon Apr 13 17:18:42 2015 +++ src/sys/arch/mips/sibyte/dev/sbscn.c Thu Jul 21 13:02:47 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sbscn.c,v 1.41 2015/04/13 21:18:42 riastradh Exp $ */ +/* $NetBSD: sbscn.c,v 1.42 2016/07/21 17:02:47 christos Exp $ */ /* * Copyright 2000, 2001 @@ -109,7 +109,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sbscn.c,v 1.41 2015/04/13 21:18:42 riastra
CVS commit: src/external/gpl3/binutils/lib/libbfd
Module Name:src Committed By: christos Date: Thu Jul 21 16:47:50 UTC 2016 Modified Files: src/external/gpl3/binutils/lib/libbfd: Makefile Log Message: more stack protector To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/binutils/lib/libbfd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/lib/libbfd/Makefile diff -u src/external/gpl3/binutils/lib/libbfd/Makefile:1.16 src/external/gpl3/binutils/lib/libbfd/Makefile:1.17 --- src/external/gpl3/binutils/lib/libbfd/Makefile:1.16 Tue Feb 2 14:15:40 2016 +++ src/external/gpl3/binutils/lib/libbfd/Makefile Thu Jul 21 12:47:50 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2016/02/02 19:15:40 christos Exp $ +# $NetBSD: Makefile,v 1.17 2016/07/21 16:47:50 christos Exp $ NOLINKLIB= # defined NOLINT= # defined @@ -42,6 +42,7 @@ CPPFLAGS.elf.c += -O0 .endif COPTS.pei-x86_64.c += -Wno-stack-protector +COPTS.elfxx-mips.c += -Wno-stack-protector GSRCS= ${G_libbfd_la_OBJECTS:libbfd.lo=lib_bfd.lo} \ ${G_libbfd_la_DEPENDENCIES:M*.lo}
CVS commit: src
Module Name:src Committed By: njoly Date: Thu Jul 21 16:01:59 UTC 2016 Modified Files: src/include: limits.h src/sys/sys: unistd.h Log Message: According to Opengroup online specifications[1], _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME options should be present in unistd.h not limits.h. Move them with other options. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/include/limits.h cvs rdiff -u -r1.59 -r1.60 src/sys/sys/unistd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/limits.h diff -u src/include/limits.h:1.38 src/include/limits.h:1.39 --- src/include/limits.h:1.38 Fri Jun 10 23:29:20 2016 +++ src/include/limits.h Thu Jul 21 16:01:58 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: limits.h,v 1.38 2016/06/10 23:29:20 christos Exp $ */ +/* $NetBSD: limits.h,v 1.39 2016/07/21 16:01:58 njoly Exp $ */ /* * Copyright (c) 1988, 1993 @@ -94,8 +94,6 @@ #define _POSIX_TIMER_MAX 32 #define _POSIX_SEM_NSEMS_MAX 256 -#define _POSIX_CPUTIME 200112L -#define _POSIX_THREAD_CPUTIME 200112L #define _POSIX_DELAYTIMER_MAX 32 #define _POSIX_TTY_NAME_MAX 9 #define _POSIX_TZNAME_MAX 6 Index: src/sys/sys/unistd.h diff -u src/sys/sys/unistd.h:1.59 src/sys/sys/unistd.h:1.60 --- src/sys/sys/unistd.h:1.59 Sun Jul 3 14:24:59 2016 +++ src/sys/sys/unistd.h Thu Jul 21 16:01:59 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: unistd.h,v 1.59 2016/07/03 14:24:59 christos Exp $ */ +/* $NetBSD: unistd.h,v 1.60 2016/07/21 16:01:59 njoly Exp $ */ /* * Copyright (c) 1989, 1993 @@ -93,6 +93,8 @@ #define _POSIX_CHOWN_RESTRICTED 1 /* clock selection */ #define _POSIX_CLOCK_SELECTION -1 + /* cputime clock */ +#define _POSIX_CPUTIME 200112L /* CPU type */ #undef _POSIX_CPUTYPE /* file synchronization is available */ @@ -145,6 +147,8 @@ #define _POSIX_THREAD_ATTR_STACKSIZE 200112L /* pthread_attr for stack address */ #define _POSIX_THREAD_ATTR_STACKADDR 200112L + /* thread cputime clock */ +#define _POSIX_THREAD_CPUTIME 200112L /* _r functions */ #define _POSIX_THREAD_PRIO_PROTECT 200112L /* PTHREAD_PRIO_PROTECT */
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: martin Date: Thu Jul 21 13:14:35 UTC 2016 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: Ticket #1392 To generate a diff of this commit: cvs rdiff -u -r1.1.2.70 -r1.1.2.71 src/doc/CHANGES-6.0.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.70 src/doc/CHANGES-6.0.7:1.1.2.71 --- src/doc/CHANGES-6.0.7:1.1.2.70 Tue Jul 19 14:24:23 2016 +++ src/doc/CHANGES-6.0.7 Thu Jul 21 13:14:35 2016 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.70 2016/07/19 14:24:23 martin Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.71 2016/07/21 13:14:35 martin Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -8683,3 +8683,8 @@ libexec/mail.local/mail.local.c 1.27 Fix race condition in deliver(), fix resource leak. [shm, ticket #1391] +libexec/mail.local/mail.local.c 1.28 + + Fix error checks in open(2) calls. + [shm, ticket #1392] +
CVS commit: [netbsd-6-0] src/libexec/mail.local
Module Name:src Committed By: martin Date: Thu Jul 21 13:13:30 UTC 2016 Modified Files: src/libexec/mail.local [netbsd-6-0]: mail.local.c Log Message: Pull up following revision(s) (requested by shm in ticket #1392): libexec/mail.local/mail.local.c: revision 1.28 Fix error checks in open(2) calls. To generate a diff of this commit: cvs rdiff -u -r1.26.10.1 -r1.26.10.2 src/libexec/mail.local/mail.local.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/mail.local/mail.local.c diff -u src/libexec/mail.local/mail.local.c:1.26.10.1 src/libexec/mail.local/mail.local.c:1.26.10.2 --- src/libexec/mail.local/mail.local.c:1.26.10.1 Tue Jul 19 14:23:10 2016 +++ src/libexec/mail.local/mail.local.c Thu Jul 21 13:13:30 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mail.local.c,v 1.26.10.1 2016/07/19 14:23:10 martin Exp $ */ +/* $NetBSD: mail.local.c,v 1.26.10.2 2016/07/21 13:13:30 martin Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 19 #if 0 static char sccsid[] = "@(#)mail.local.c 8.22 (Berkeley) 6/21/95"; #else -__RCSID("$NetBSD: mail.local.c,v 1.26.10.1 2016/07/19 14:23:10 martin Exp $"); +__RCSID("$NetBSD: mail.local.c,v 1.26.10.2 2016/07/21 13:13:30 martin Exp $"); #endif #endif /* not lint */ @@ -218,10 +218,10 @@ deliver(int fd, char *name, int lockfile } if ((mbfd = open(path, O_APPEND|O_WRONLY|O_EXLOCK, - S_IRUSR|S_IWUSR)) != -1) { + S_IRUSR|S_IWUSR)) == -1) { /* create file */ if ((mbfd = open(path, O_APPEND|O_CREAT|O_WRONLY|O_EXLOCK, - S_IRUSR|S_IWUSR)) != -1) { + S_IRUSR|S_IWUSR)) == -1) { logwarn("%s: %s", path, strerror(errno)); rval = EX_OSERR; goto bad;
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: martin Date: Thu Jul 21 13:11:29 UTC 2016 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: Ticket #1392 To generate a diff of this commit: cvs rdiff -u -r1.1.2.68 -r1.1.2.69 src/doc/CHANGES-6.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.68 src/doc/CHANGES-6.1.6:1.1.2.69 --- src/doc/CHANGES-6.1.6:1.1.2.68 Tue Jul 19 14:22:41 2016 +++ src/doc/CHANGES-6.1.6 Thu Jul 21 13:11:29 2016 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.68 2016/07/19 14:22:41 martin Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.69 2016/07/21 13:11:29 martin Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -8403,3 +8403,8 @@ libexec/mail.local/mail.local.c 1.27 Fix race condition in deliver(), fix resource leak. [shm, ticket #1391] +libexec/mail.local/mail.local.c 1.28 + + Fix error checks in open(2) calls. + [shm, ticket #1392] +
CVS commit: [pgoyette-localcount] src/sys/miscfs/specfs
Module Name:src Committed By: pgoyette Date: Thu Jul 21 13:09:47 UTC 2016 Modified Files: src/sys/miscfs/specfs [pgoyette-localcount]: spec_vnops.c Log Message: fix an error patch to call {b,c}devsw_release() To generate a diff of this commit: cvs rdiff -u -r1.162.2.1 -r1.162.2.2 src/sys/miscfs/specfs/spec_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/miscfs/specfs/spec_vnops.c diff -u src/sys/miscfs/specfs/spec_vnops.c:1.162.2.1 src/sys/miscfs/specfs/spec_vnops.c:1.162.2.2 --- src/sys/miscfs/specfs/spec_vnops.c:1.162.2.1 Wed Jul 20 23:47:57 2016 +++ src/sys/miscfs/specfs/spec_vnops.c Thu Jul 21 13:09:47 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: spec_vnops.c,v 1.162.2.1 2016/07/20 23:47:57 pgoyette Exp $ */ +/* $NetBSD: spec_vnops.c,v 1.162.2.2 2016/07/21 13:09:47 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: spec_vnops.c,v 1.162.2.1 2016/07/20 23:47:57 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spec_vnops.c,v 1.162.2.2 2016/07/21 13:09:47 pgoyette Exp $"); #include #include @@ -654,14 +654,14 @@ spec_open(void *v) mutex_exit(&device_lock); if (cdev_type(dev) != D_DISK || error != 0) - return error; + goto out; - ioctl = vp->v_type == VCHR ? cdev_ioctl : bdev_ioctl; error = (*ioctl)(vp->v_rdev, DIOCGPARTINFO, &pi, FREAD, curlwp); if (error == 0) uvm_vnp_setsize(vp, (voff_t)pi.pi_secsize * pi.pi_size); + out: if (cdev != NULL) cdevsw_release(cdev); if (bdev != NULL)
CVS commit: [netbsd-6-1] src/libexec/mail.local
Module Name:src Committed By: martin Date: Thu Jul 21 12:59:00 UTC 2016 Modified Files: src/libexec/mail.local [netbsd-6-1]: mail.local.c Log Message: Pull up following revision(s) (requested by shm in ticket #1392): libexec/mail.local/mail.local.c: revision 1.28 Fix error checks in open(2) calls. To generate a diff of this commit: cvs rdiff -u -r1.26.16.1 -r1.26.16.2 src/libexec/mail.local/mail.local.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/mail.local/mail.local.c diff -u src/libexec/mail.local/mail.local.c:1.26.16.1 src/libexec/mail.local/mail.local.c:1.26.16.2 --- src/libexec/mail.local/mail.local.c:1.26.16.1 Tue Jul 19 14:21:04 2016 +++ src/libexec/mail.local/mail.local.c Thu Jul 21 12:59:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mail.local.c,v 1.26.16.1 2016/07/19 14:21:04 martin Exp $ */ +/* $NetBSD: mail.local.c,v 1.26.16.2 2016/07/21 12:59:00 martin Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 19 #if 0 static char sccsid[] = "@(#)mail.local.c 8.22 (Berkeley) 6/21/95"; #else -__RCSID("$NetBSD: mail.local.c,v 1.26.16.1 2016/07/19 14:21:04 martin Exp $"); +__RCSID("$NetBSD: mail.local.c,v 1.26.16.2 2016/07/21 12:59:00 martin Exp $"); #endif #endif /* not lint */ @@ -218,10 +218,10 @@ deliver(int fd, char *name, int lockfile } if ((mbfd = open(path, O_APPEND|O_WRONLY|O_EXLOCK, - S_IRUSR|S_IWUSR)) != -1) { + S_IRUSR|S_IWUSR)) == -1) { /* create file */ if ((mbfd = open(path, O_APPEND|O_CREAT|O_WRONLY|O_EXLOCK, - S_IRUSR|S_IWUSR)) != -1) { + S_IRUSR|S_IWUSR)) == -1) { logwarn("%s: %s", path, strerror(errno)); rval = EX_OSERR; goto bad;
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: martin Date: Thu Jul 21 12:58:24 UTC 2016 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Ticket #1392 To generate a diff of this commit: cvs rdiff -u -r1.1.2.256 -r1.1.2.257 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.256 src/doc/CHANGES-6.2:1.1.2.257 --- src/doc/CHANGES-6.2:1.1.2.256 Tue Jul 19 14:19:27 2016 +++ src/doc/CHANGES-6.2 Thu Jul 21 12:58:24 2016 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.256 2016/07/19 14:19:27 martin Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.257 2016/07/21 12:58:24 martin Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -14598,3 +14598,8 @@ libexec/mail.local/mail.local.c 1.27 Fix race condition in deliver(), fix resource leak. [shm, ticket #1391] +libexec/mail.local/mail.local.c 1.28 + + Fix error checks in open(2) calls. + [shm, ticket #1392] +
CVS commit: [netbsd-6] src/libexec/mail.local
Module Name:src Committed By: martin Date: Thu Jul 21 12:57:37 UTC 2016 Modified Files: src/libexec/mail.local [netbsd-6]: mail.local.c Log Message: Pull up following revision(s) (requested by shm in ticket #1392): libexec/mail.local/mail.local.c: revision 1.28 Fix error checks in open(2) calls. To generate a diff of this commit: cvs rdiff -u -r1.26.4.1 -r1.26.4.2 src/libexec/mail.local/mail.local.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/mail.local/mail.local.c diff -u src/libexec/mail.local/mail.local.c:1.26.4.1 src/libexec/mail.local/mail.local.c:1.26.4.2 --- src/libexec/mail.local/mail.local.c:1.26.4.1 Tue Jul 19 14:18:30 2016 +++ src/libexec/mail.local/mail.local.c Thu Jul 21 12:57:37 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mail.local.c,v 1.26.4.1 2016/07/19 14:18:30 martin Exp $ */ +/* $NetBSD: mail.local.c,v 1.26.4.2 2016/07/21 12:57:37 martin Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 19 #if 0 static char sccsid[] = "@(#)mail.local.c 8.22 (Berkeley) 6/21/95"; #else -__RCSID("$NetBSD: mail.local.c,v 1.26.4.1 2016/07/19 14:18:30 martin Exp $"); +__RCSID("$NetBSD: mail.local.c,v 1.26.4.2 2016/07/21 12:57:37 martin Exp $"); #endif #endif /* not lint */ @@ -218,10 +218,10 @@ deliver(int fd, char *name, int lockfile } if ((mbfd = open(path, O_APPEND|O_WRONLY|O_EXLOCK, - S_IRUSR|S_IWUSR)) != -1) { + S_IRUSR|S_IWUSR)) == -1) { /* create file */ if ((mbfd = open(path, O_APPEND|O_CREAT|O_WRONLY|O_EXLOCK, - S_IRUSR|S_IWUSR)) != -1) { + S_IRUSR|S_IWUSR)) == -1) { logwarn("%s: %s", path, strerror(errno)); rval = EX_OSERR; goto bad;
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: martin Date: Thu Jul 21 12:56:34 UTC 2016 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.2 Log Message: Ticket #1207 To generate a diff of this commit: cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/doc/CHANGES-7.0.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0.2 diff -u src/doc/CHANGES-7.0.2:1.1.2.6 src/doc/CHANGES-7.0.2:1.1.2.7 --- src/doc/CHANGES-7.0.2:1.1.2.6 Tue Jul 19 14:16:49 2016 +++ src/doc/CHANGES-7.0.2 Thu Jul 21 12:56:33 2016 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.2,v 1.1.2.6 2016/07/19 14:16:49 martin Exp $ +# $NetBSD: CHANGES-7.0.2,v 1.1.2.7 2016/07/21 12:56:33 martin Exp $ A complete list of changes from the NetBSD 7.0.1 release to the NetBSD 7.0.2 release: @@ -206,3 +206,8 @@ libexec/mail.local/mail.local.c 1.27 Fix race condition in deliver(), fix resource leak. [shm, ticket #1206] +libexec/mail.local/mail.local.c 1.28 + + Fix error checks in open(2) calls. + [shm, ticket #1207] +
CVS commit: [netbsd-7-0] src/libexec/mail.local
Module Name:src Committed By: martin Date: Thu Jul 21 12:55:26 UTC 2016 Modified Files: src/libexec/mail.local [netbsd-7-0]: mail.local.c Log Message: Pull up following revision(s) (requested by shm in ticket #1207): libexec/mail.local/mail.local.c: revision 1.28 Fix error checks in open(2) calls. To generate a diff of this commit: cvs rdiff -u -r1.26.22.1 -r1.26.22.2 src/libexec/mail.local/mail.local.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/mail.local/mail.local.c diff -u src/libexec/mail.local/mail.local.c:1.26.22.1 src/libexec/mail.local/mail.local.c:1.26.22.2 --- src/libexec/mail.local/mail.local.c:1.26.22.1 Tue Jul 19 14:12:10 2016 +++ src/libexec/mail.local/mail.local.c Thu Jul 21 12:55:26 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mail.local.c,v 1.26.22.1 2016/07/19 14:12:10 martin Exp $ */ +/* $NetBSD: mail.local.c,v 1.26.22.2 2016/07/21 12:55:26 martin Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 19 #if 0 static char sccsid[] = "@(#)mail.local.c 8.22 (Berkeley) 6/21/95"; #else -__RCSID("$NetBSD: mail.local.c,v 1.26.22.1 2016/07/19 14:12:10 martin Exp $"); +__RCSID("$NetBSD: mail.local.c,v 1.26.22.2 2016/07/21 12:55:26 martin Exp $"); #endif #endif /* not lint */ @@ -218,10 +218,10 @@ deliver(int fd, char *name, int lockfile } if ((mbfd = open(path, O_APPEND|O_WRONLY|O_EXLOCK, - S_IRUSR|S_IWUSR)) != -1) { + S_IRUSR|S_IWUSR)) == -1) { /* create file */ if ((mbfd = open(path, O_APPEND|O_CREAT|O_WRONLY|O_EXLOCK, - S_IRUSR|S_IWUSR)) != -1) { + S_IRUSR|S_IWUSR)) == -1) { logwarn("%s: %s", path, strerror(errno)); rval = EX_OSERR; goto bad;
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Thu Jul 21 12:54:44 UTC 2016 Modified Files: src/doc [netbsd-7]: CHANGES-7.1 Log Message: Ticket #1207 To generate a diff of this commit: cvs rdiff -u -r1.1.2.101 -r1.1.2.102 src/doc/CHANGES-7.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.1 diff -u src/doc/CHANGES-7.1:1.1.2.101 src/doc/CHANGES-7.1:1.1.2.102 --- src/doc/CHANGES-7.1:1.1.2.101 Tue Jul 19 14:10:15 2016 +++ src/doc/CHANGES-7.1 Thu Jul 21 12:54:44 2016 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1,v 1.1.2.101 2016/07/19 14:10:15 martin Exp $ +# $NetBSD: CHANGES-7.1,v 1.1.2.102 2016/07/21 12:54:44 martin Exp $ A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1 release: @@ -5177,3 +5177,8 @@ libexec/mail.local/mail.local.c 1.27 Fix race condition in deliver(), fix resource leak. [shm, ticket #1206] +libexec/mail.local/mail.local.c 1.28 + + Fix error checks in open(2) calls. + [shm, ticket #1207] +
CVS commit: [netbsd-7] src/libexec/mail.local
Module Name:src Committed By: martin Date: Thu Jul 21 12:54:09 UTC 2016 Modified Files: src/libexec/mail.local [netbsd-7]: mail.local.c Log Message: Pull up following revision(s) (requested by shm in ticket #1207): libexec/mail.local/mail.local.c: revision 1.28 Fix error checks in open(2) calls. To generate a diff of this commit: cvs rdiff -u -r1.26.20.1 -r1.26.20.2 src/libexec/mail.local/mail.local.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/mail.local/mail.local.c diff -u src/libexec/mail.local/mail.local.c:1.26.20.1 src/libexec/mail.local/mail.local.c:1.26.20.2 --- src/libexec/mail.local/mail.local.c:1.26.20.1 Tue Jul 19 14:08:19 2016 +++ src/libexec/mail.local/mail.local.c Thu Jul 21 12:54:09 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mail.local.c,v 1.26.20.1 2016/07/19 14:08:19 martin Exp $ */ +/* $NetBSD: mail.local.c,v 1.26.20.2 2016/07/21 12:54:09 martin Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 19 #if 0 static char sccsid[] = "@(#)mail.local.c 8.22 (Berkeley) 6/21/95"; #else -__RCSID("$NetBSD: mail.local.c,v 1.26.20.1 2016/07/19 14:08:19 martin Exp $"); +__RCSID("$NetBSD: mail.local.c,v 1.26.20.2 2016/07/21 12:54:09 martin Exp $"); #endif #endif /* not lint */ @@ -218,10 +218,10 @@ deliver(int fd, char *name, int lockfile } if ((mbfd = open(path, O_APPEND|O_WRONLY|O_EXLOCK, - S_IRUSR|S_IWUSR)) != -1) { + S_IRUSR|S_IWUSR)) == -1) { /* create file */ if ((mbfd = open(path, O_APPEND|O_CREAT|O_WRONLY|O_EXLOCK, - S_IRUSR|S_IWUSR)) != -1) { + S_IRUSR|S_IWUSR)) == -1) { logwarn("%s: %s", path, strerror(errno)); rval = EX_OSERR; goto bad;
CVS commit: src/libexec/mail.local
Module Name:src Committed By: shm Date: Thu Jul 21 12:29:37 UTC 2016 Modified Files: src/libexec/mail.local: mail.local.c Log Message: Fix error checks in open(2) calls. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/libexec/mail.local/mail.local.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/mail.local/mail.local.c diff -u src/libexec/mail.local/mail.local.c:1.27 src/libexec/mail.local/mail.local.c:1.28 --- src/libexec/mail.local/mail.local.c:1.27 Tue Jul 19 13:11:38 2016 +++ src/libexec/mail.local/mail.local.c Thu Jul 21 12:29:37 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mail.local.c,v 1.27 2016/07/19 13:11:38 shm Exp $ */ +/* $NetBSD: mail.local.c,v 1.28 2016/07/21 12:29:37 shm Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 19 #if 0 static char sccsid[] = "@(#)mail.local.c 8.22 (Berkeley) 6/21/95"; #else -__RCSID("$NetBSD: mail.local.c,v 1.27 2016/07/19 13:11:38 shm Exp $"); +__RCSID("$NetBSD: mail.local.c,v 1.28 2016/07/21 12:29:37 shm Exp $"); #endif #endif /* not lint */ @@ -218,10 +218,10 @@ deliver(int fd, char *name, int lockfile } if ((mbfd = open(path, O_APPEND|O_WRONLY|O_EXLOCK, - S_IRUSR|S_IWUSR)) != -1) { + S_IRUSR|S_IWUSR)) == -1) { /* create file */ if ((mbfd = open(path, O_APPEND|O_CREAT|O_WRONLY|O_EXLOCK, - S_IRUSR|S_IWUSR)) != -1) { + S_IRUSR|S_IWUSR)) == -1) { logwarn("%s: %s", path, strerror(errno)); rval = EX_OSERR; goto bad;
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: christos Date: Thu Jul 21 12:24:54 UTC 2016 Modified Files: src/usr.sbin/makemandb: Makefile Log Message: Add -lz to makefile to fix the build. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/makemandb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/makemandb/Makefile diff -u src/usr.sbin/makemandb/Makefile:1.5 src/usr.sbin/makemandb/Makefile:1.6 --- src/usr.sbin/makemandb/Makefile:1.5 Mon Jan 14 13:04:58 2013 +++ src/usr.sbin/makemandb/Makefile Thu Jul 21 08:24:54 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2013/01/14 18:04:58 christos Exp $ +# $NetBSD: Makefile,v 1.6 2016/07/21 12:24:54 christos Exp $ .include @@ -24,8 +24,8 @@ CPPFLAGS+= -I${MDOCDIR} -I${MANCONFDIR} MDOCMLOBJDIR!= cd ${MDOCDIR}/lib/libmandoc && ${PRINTOBJDIR} MDOCMLLIB= ${MDOCMLOBJDIR}/libmandoc.a -DPADD.makemandb+= ${MDOCMLLIB} ${LIBARCHIVE} ${LIBBZ2} ${LIBLZMA} -LDADD.makemandb+= -L${MDOCMLOBJDIR} -lmandoc -larchive -lbz2 -llzma +DPADD.makemandb+= ${MDOCMLLIB} ${LIBARCHIVE} ${LIBBZ2} ${LIBLZMA} ${LIBZ} +LDADD.makemandb+= -L${MDOCMLOBJDIR} -lmandoc -larchive -lbz2 -llzma -lz DPADD+= ${LIBSQLITE3} ${LIBM} ${LIBZ} ${LIBTERMLIB} ${LIBUTIL} LDADD+= -lsqlite3 -lm -lz -ltermlib -lutil
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Thu Jul 21 12:17:07 UTC 2016 Modified Files: src/sys/arch/mips/mips: locore_mips1.S mipsX_subr.S Log Message: Fix typo in comment To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/arch/mips/mips/locore_mips1.S cvs rdiff -u -r1.73 -r1.74 src/sys/arch/mips/mips/mipsX_subr.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/locore_mips1.S diff -u src/sys/arch/mips/mips/locore_mips1.S:1.89 src/sys/arch/mips/mips/locore_mips1.S:1.90 --- src/sys/arch/mips/mips/locore_mips1.S:1.89 Mon Jul 11 19:01:55 2016 +++ src/sys/arch/mips/mips/locore_mips1.S Thu Jul 21 12:17:07 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: locore_mips1.S,v 1.89 2016/07/11 19:01:55 skrll Exp $ */ +/* $NetBSD: locore_mips1.S,v 1.90 2016/07/21 12:17:07 skrll Exp $ */ /* * Copyright (c) 1992, 1993 @@ -553,7 +553,7 @@ NESTED_NOPROFILE(MIPSX(kern_intr), KERNF PTR_L a0, TF_BASE+TF_REG_EPC(sp) #endif /* __HAVE_PREEMPTION */ 4: -#endif /* __HAVE_FAST_SOFTINT */ +#endif /* __HAVE_FAST_SOFTINTS */ /* * Interrupts handled, restore registers and return from the interrupt. * First, clear interrupt enable Index: src/sys/arch/mips/mips/mipsX_subr.S diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.73 src/sys/arch/mips/mips/mipsX_subr.S:1.74 --- src/sys/arch/mips/mips/mipsX_subr.S:1.73 Sun Jul 17 16:44:39 2016 +++ src/sys/arch/mips/mips/mipsX_subr.S Thu Jul 21 12:17:07 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.73 2016/07/17 16:44:39 skrll Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.74 2016/07/21 12:17:07 skrll Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -1227,7 +1227,7 @@ NESTED_NOPROFILE(MIPSX(kern_intr), KERNF li a0, -2 #endif /* __HAVE_PREEMPTION */ 4: -#endif /* __HAVE_FAST_SOFTINT */ +#endif /* __HAVE_FAST_SOFTINTS */ /* * Interrupts handled, restore registers and return from the interrupt. * First, clear interrupt enable
CVS commit: [pgoyette-localcount] src/sys/fs/adosfs
Module Name:src Committed By: pgoyette Date: Thu Jul 21 11:13:01 UTC 2016 Modified Files: src/sys/fs/adosfs [pgoyette-localcount]: advfsops.c Log Message: Add missing semicolon To generate a diff of this commit: cvs rdiff -u -r1.75.2.2 -r1.75.2.3 src/sys/fs/adosfs/advfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/adosfs/advfsops.c diff -u src/sys/fs/adosfs/advfsops.c:1.75.2.2 src/sys/fs/adosfs/advfsops.c:1.75.2.3 --- src/sys/fs/adosfs/advfsops.c:1.75.2.2 Thu Jul 21 11:02:56 2016 +++ src/sys/fs/adosfs/advfsops.c Thu Jul 21 11:13:01 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: advfsops.c,v 1.75.2.2 2016/07/21 11:02:56 pgoyette Exp $ */ +/* $NetBSD: advfsops.c,v 1.75.2.3 2016/07/21 11:13:01 pgoyette Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.75.2.2 2016/07/21 11:02:56 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.75.2.3 2016/07/21 11:13:01 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -160,7 +160,7 @@ adosfs_mount(struct mount *mp, const cha error = set_statvfs_info(path, UIO_USERSPACE, args->fspec, UIO_USERSPACE, mp->mnt_op->vfs_name, mp, l); bdevsw_release(bdev); - return error + return error; } int
CVS commit: [pgoyette-localcount] src/sys/fs/adosfs
Module Name:src Committed By: pgoyette Date: Thu Jul 21 11:02:56 UTC 2016 Modified Files: src/sys/fs/adosfs [pgoyette-localcount]: advfsops.c Log Message: Call bdevsw_release() in the normal-exit path. To generate a diff of this commit: cvs rdiff -u -r1.75.2.1 -r1.75.2.2 src/sys/fs/adosfs/advfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/adosfs/advfsops.c diff -u src/sys/fs/adosfs/advfsops.c:1.75.2.1 src/sys/fs/adosfs/advfsops.c:1.75.2.2 --- src/sys/fs/adosfs/advfsops.c:1.75.2.1 Wed Jul 20 23:47:56 2016 +++ src/sys/fs/adosfs/advfsops.c Thu Jul 21 11:02:56 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: advfsops.c,v 1.75.2.1 2016/07/20 23:47:56 pgoyette Exp $ */ +/* $NetBSD: advfsops.c,v 1.75.2.2 2016/07/21 11:02:56 pgoyette Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.75.2.1 2016/07/20 23:47:56 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.75.2.2 2016/07/21 11:02:56 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -157,8 +157,10 @@ adosfs_mount(struct mount *mp, const cha amp->uid = args->uid; amp->gid = args->gid; amp->mask = args->mask; - return set_statvfs_info(path, UIO_USERSPACE, args->fspec, UIO_USERSPACE, - mp->mnt_op->vfs_name, mp, l); + error = set_statvfs_info(path, UIO_USERSPACE, args->fspec, + UIO_USERSPACE, mp->mnt_op->vfs_name, mp, l); + bdevsw_release(bdev); + return error } int
CVS commit: [pgoyette-localcount] src/sys/ufs/ffs
Module Name:src Committed By: pgoyette Date: Thu Jul 21 10:37:09 UTC 2016 Modified Files: src/sys/ufs/ffs [pgoyette-localcount]: ffs_vfsops.c Log Message: Actually save the bdev value when it is retrieved, so we can use it later in a call to bdevsw_release(). To generate a diff of this commit: cvs rdiff -u -r1.339.2.1 -r1.339.2.2 src/sys/ufs/ffs/ffs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ufs/ffs/ffs_vfsops.c diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.339.2.1 src/sys/ufs/ffs/ffs_vfsops.c:1.339.2.2 --- src/sys/ufs/ffs/ffs_vfsops.c:1.339.2.1 Wed Jul 20 23:47:57 2016 +++ src/sys/ufs/ffs/ffs_vfsops.c Thu Jul 21 10:37:09 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_vfsops.c,v 1.339.2.1 2016/07/20 23:47:57 pgoyette Exp $ */ +/* $NetBSD: ffs_vfsops.c,v 1.339.2.2 2016/07/21 10:37:09 pgoyette Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.339.2.1 2016/07/20 23:47:57 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.339.2.2 2016/07/21 10:37:09 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_ffs.h" @@ -452,10 +452,13 @@ ffs_mount(struct mount *mp, const char * if (devvp->v_type != VBLK) { DPRINTF("non block device %d", devvp->v_type); error = ENOTBLK; - } else if (bdevsw_lookup_acquire(devvp->v_rdev) == NULL) { -DPRINTF("can't find block device 0x%jx", -devvp->v_rdev); -error = ENXIO; + } else { +bdev = bdevsw_lookup_acquire(devvp->v_rdev); +if (bdev == NULL) { + DPRINTF("can't find block device 0x%jx", + devvp->v_rdev); + error = ENXIO; +} } } else { /*
CVS commit: [pgoyette-localcount] src/sys/compat/linux/common
Module Name:src Committed By: pgoyette Date: Thu Jul 21 10:34:11 UTC 2016 Modified Files: src/sys/compat/linux/common [pgoyette-localcount]: linux_ioctl.c Log Message: simplify for readability To generate a diff of this commit: cvs rdiff -u -r1.58.10.1 -r1.58.10.2 \ src/sys/compat/linux/common/linux_ioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/common/linux_ioctl.c diff -u src/sys/compat/linux/common/linux_ioctl.c:1.58.10.1 src/sys/compat/linux/common/linux_ioctl.c:1.58.10.2 --- src/sys/compat/linux/common/linux_ioctl.c:1.58.10.1 Wed Jul 20 23:47:55 2016 +++ src/sys/compat/linux/common/linux_ioctl.c Thu Jul 21 10:34:11 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ioctl.c,v 1.58.10.1 2016/07/20 23:47:55 pgoyette Exp $ */ +/* $NetBSD: linux_ioctl.c,v 1.58.10.2 2016/07/21 10:34:11 pgoyette Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_ioctl.c,v 1.58.10.1 2016/07/20 23:47:55 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_ioctl.c,v 1.58.10.2 2016/07/21 10:34:11 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "sequencer.h" @@ -168,10 +168,11 @@ linux_sys_ioctl(struct lwp *l, const str vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_GETATTR(vp, &va, l->l_cred); VOP_UNLOCK(vp); - if (error == 0 && - (cdev = cdevsw_lookup_acquire(va.va_rdev)) == - &sequencer_cdevsw) -is_sequencer = true; + if (error == 0) { +cdev = cdevsw_lookup_acquire(va.va_rdev); +if (cdev == &sequencer_cdevsw) + is_sequencer = true; + } } if (is_sequencer) { error = oss_ioctl_sequencer(l,
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: kiyohara Date: Thu Jul 21 09:10:55 UTC 2016 Modified Files: src/sys/arch/evbarm/conf: VTC100 Log Message: Attach atphy instead of ukphy. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/VTC100 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/VTC100 diff -u src/sys/arch/evbarm/conf/VTC100:1.3 src/sys/arch/evbarm/conf/VTC100:1.4 --- src/sys/arch/evbarm/conf/VTC100:1.3 Tue Jul 12 13:20:03 2016 +++ src/sys/arch/evbarm/conf/VTC100 Thu Jul 21 09:10:55 2016 @@ -1,5 +1,5 @@ # -# $NetBSD: VTC100,v 1.3 2016/07/12 13:20:03 kiyohara Exp $ +# $NetBSD: VTC100,v 1.4 2016/07/21 09:10:55 kiyohara Exp $ # # BEAGLEBONE -- TI AM335x board Kernel # @@ -267,7 +267,7 @@ pseudo-device wsfont # Ethernet cpsw* at obio2 addr 0x4a10 size 0x8000 intrbase 40 -ukphy* at mii? +atphy* at mii? phy ? # Attansic/Atheros PHYs # On-board USB. Experimental #tiotg* at mainbus0 base 0x4740 size 0x5000 intrbase 17
CVS commit: src/usr.sbin/cpuctl/arch
Module Name:src Committed By: msaitoh Date: Thu Jul 21 08:37:18 UTC 2016 Modified Files: src/usr.sbin/cpuctl/arch: i386.c Log Message: Update processor families from the latest Intel SDM: - 06_4FH: Add Xeon E7 v4 and Core i7-69xx Extreme Edition - 06_57H: Xeon Phi [357]200 To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/usr.sbin/cpuctl/arch/i386.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/cpuctl/arch/i386.c diff -u src/usr.sbin/cpuctl/arch/i386.c:1.72 src/usr.sbin/cpuctl/arch/i386.c:1.73 --- src/usr.sbin/cpuctl/arch/i386.c:1.72 Wed Apr 27 08:53:28 2016 +++ src/usr.sbin/cpuctl/arch/i386.c Thu Jul 21 08:37:18 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: i386.c,v 1.72 2016/04/27 08:53:28 msaitoh Exp $ */ +/* $NetBSD: i386.c,v 1.73 2016/07/21 08:37:18 msaitoh Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ #include #ifndef lint -__RCSID("$NetBSD: i386.c,v 1.72 2016/04/27 08:53:28 msaitoh Exp $"); +__RCSID("$NetBSD: i386.c,v 1.73 2016/07/21 08:37:18 msaitoh Exp $"); #endif /* not lint */ #include @@ -370,10 +370,10 @@ const struct cpu_cpuid_nameclass i386_cp [0x4c] = "Atom X[57]-Z8000 (Airmont)", [0x4d] = "Atom C2000", [0x4e] = "6th gen Core, Xeon E3-1[25]00 v5 (Skylake)", -[0x4f] = "Xeon E5 v4 (Broadwell)", +[0x4f] = "Xeon E[57] v4 (Broadwell), Core i7-69xx Extreme", [0x55] = "Future Xeon", [0x56] = "Xeon D-1500 (Broadwell)", -[0x57] = "Next gen Xeon Phi", +[0x57] = "Xeon Phi [357]200", [0x5a] = "Atom E3500", [0x5c] = "Next Atom (Goldmont)", [0x5d] = "Atom X3-C3000 (Silvermont)",