CVS commit: src/sbin/ccdconfig
Module Name:src Committed By: apb Date: Sun Aug 17 07:05:44 UTC 2014 Modified Files: src/sbin/ccdconfig: ccdconfig.c Log Message: Don't print ccd_size with %zu; it no longer has type size_t. Instead, cast to uintmax_t and print with %ju. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sbin/ccdconfig/ccdconfig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/ccdconfig/ccdconfig.c diff -u src/sbin/ccdconfig/ccdconfig.c:1.54 src/sbin/ccdconfig/ccdconfig.c:1.55 --- src/sbin/ccdconfig/ccdconfig.c:1.54 Sat Aug 16 19:27:27 2014 +++ src/sbin/ccdconfig/ccdconfig.c Sun Aug 17 07:05:44 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ccdconfig.c,v 1.54 2014/08/16 19:27:27 sborrill Exp $ */ +/* $NetBSD: ccdconfig.c,v 1.55 2014/08/17 07:05:44 apb Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #ifndef lint __COPYRIGHT(@(#) Copyright (c) 1996, 1997\ The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: ccdconfig.c,v 1.54 2014/08/16 19:27:27 sborrill Exp $); +__RCSID($NetBSD: ccdconfig.c,v 1.55 2014/08/17 07:05:44 apb Exp $); #endif #include sys/param.h @@ -445,8 +445,9 @@ print_ccd_info(int u, struct ccddiskinfo } /* Dump out softc information. */ - printf(ccd%d\t\t%d\t0x%x\t%zu\t, u, ccd-ccd_ileave, - ccd-ccd_flags CCDF_USERMASK, ccd-ccd_size * DEV_BSIZE); + printf(ccd%d\t\t%d\t0x%x\t%ju\t, u, ccd-ccd_ileave, + ccd-ccd_flags CCDF_USERMASK, + (uintmax_t)ccd-ccd_size * DEV_BSIZE); /* Read component pathname and display component info. */ for (size_t i = 0; i ccd-ccd_ndisks; ++i) {
CVS commit: src/sys/dev/pci
Module Name:src Committed By: tsutsui Date: Sun Aug 17 08:54:44 UTC 2014 Modified Files: src/sys/dev/pci: yds.c Log Message: Use C99 struct initializer. Also tweak some inconsistent TAB/space. No binary change on i386. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/dev/pci/yds.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/pci/yds.c diff -u src/sys/dev/pci/yds.c:1.55 src/sys/dev/pci/yds.c:1.56 --- src/sys/dev/pci/yds.c:1.55 Sat Mar 29 19:28:25 2014 +++ src/sys/dev/pci/yds.c Sun Aug 17 08:54:44 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: yds.c,v 1.55 2014/03/29 19:28:25 christos Exp $ */ +/* $NetBSD: yds.c,v 1.56 2014/08/17 08:54:44 tsutsui Exp $ */ /* * Copyright (c) 2000, 2001 Kazuki Sakamoto and Minoura Makoto. @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: yds.c,v 1.55 2014/03/29 19:28:25 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: yds.c,v 1.56 2014/08/17 08:54:44 tsutsui Exp $); #include mpu.h @@ -167,18 +167,18 @@ static int yds_halt_input(void *); static int yds_getdev(void *, struct audio_device *); static int yds_mixer_set_port(void *, mixer_ctrl_t *); static int yds_mixer_get_port(void *, mixer_ctrl_t *); -static void *yds_malloc(void *, int, size_t); +static void * yds_malloc(void *, int, size_t); static void yds_free(void *, void *, size_t); static size_t yds_round_buffersize(void *, int, size_t); -static paddr_t yds_mappage(void *, void *, off_t, int); +static paddr_t yds_mappage(void *, void *, off_t, int); static int yds_get_props(void *); static int yds_query_devinfo(void *, mixer_devinfo_t *); static void yds_get_locks(void *, kmutex_t **, kmutex_t **); -static int yds_attach_codec(void *, struct ac97_codec_if *); +static int yds_attach_codec(void *, struct ac97_codec_if *); static int yds_read_codec(void *, uint8_t, uint16_t *); static int yds_write_codec(void *, uint8_t, uint16_t); -static int yds_reset_codec(void *); +static int yds_reset_codec(void *); static u_int yds_get_dstype(int); static int yds_download_mcode(struct yds_softc *); @@ -203,40 +203,40 @@ static void yds_dump_play_slot(struct yd #endif /* AUDIO_DEBUG */ static const struct audio_hw_if yds_hw_if = { - yds_open, - yds_close, - NULL, - yds_query_encoding, - yds_set_params, - yds_round_blocksize, - NULL, - NULL, - NULL, - NULL, - NULL, - yds_halt_output, - yds_halt_input, - NULL, - yds_getdev, - NULL, - yds_mixer_set_port, - yds_mixer_get_port, - yds_query_devinfo, - yds_malloc, - yds_free, - yds_round_buffersize, - yds_mappage, - yds_get_props, - yds_trigger_output, - yds_trigger_input, - NULL, - yds_get_locks, + .open = yds_open, + .close = yds_close, + .drain = NULL, + .query_encoding = yds_query_encoding, + .set_params = yds_set_params, + .round_blocksize = yds_round_blocksize, + .commit_settings = NULL, + .init_output = NULL, + .init_input = NULL, + .start_output = NULL, + .start_input = NULL, + .halt_output = yds_halt_output, + .halt_input = yds_halt_input, + .speaker_ctl = NULL, + .getdev = yds_getdev, + .setfd = NULL, + .set_port = yds_mixer_set_port, + .get_port = yds_mixer_get_port, + .query_devinfo = yds_query_devinfo, + .allocm = yds_malloc, + .freem = yds_free, + .round_buffersize = yds_round_buffersize, + .mappage = yds_mappage, + .get_props = yds_get_props, + .trigger_output = yds_trigger_output, + .trigger_input = yds_trigger_input, + .dev_ioctl = NULL, + .get_locks = yds_get_locks, }; static const struct audio_device yds_device = { - Yamaha DS-1, - , - yds + .name= Yamaha DS-1, + .version = , + .config = yds }; static const struct {
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: wiz Date: Sun Aug 17 10:01:49 UTC 2014 Modified Files: src/sys/arch/macppc/dev: abtn.c Log Message: Add missing parameter in printf. From Henning Petersen in PR 49122. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/macppc/dev/abtn.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/macppc/dev/abtn.c diff -u src/sys/arch/macppc/dev/abtn.c:1.19 src/sys/arch/macppc/dev/abtn.c:1.20 --- src/sys/arch/macppc/dev/abtn.c:1.19 Sat Oct 27 17:18:00 2012 +++ src/sys/arch/macppc/dev/abtn.c Sun Aug 17 10:01:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: abtn.c,v 1.19 2012/10/27 17:18:00 chs Exp $ */ +/* $NetBSD: abtn.c,v 1.20 2014/08/17 10:01:49 wiz Exp $ */ /*- * Copyright (C) 1999 Tsubai Masanari. All rights reserved. @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: abtn.c,v 1.19 2012/10/27 17:18:00 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: abtn.c,v 1.20 2014/08/17 10:01:49 wiz Exp $); #include sys/param.h #include sys/device.h @@ -192,6 +192,6 @@ abtn_adbcomplete(uint8_t *buffer, uint8_ default: printf(%s: unknown button 0x%x\n, - device_xname(sc-sc_dev)); + device_xname(sc-sc_dev), cmd); } }
CVS commit: src/usr.bin/calendar/calendars
Module Name:src Committed By: wiz Date: Sun Aug 17 10:01:14 UTC 2014 Modified Files: src/usr.bin/calendar/calendars: calendar.holiday Log Message: Fix year of Hawaiian Admission Day. From Henning Petersen in PR 49123. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.bin/calendar/calendars/calendar.holiday Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/calendar/calendars/calendar.holiday diff -u src/usr.bin/calendar/calendars/calendar.holiday:1.23 src/usr.bin/calendar/calendars/calendar.holiday:1.24 --- src/usr.bin/calendar/calendars/calendar.holiday:1.23 Sun May 25 16:08:11 2014 +++ src/usr.bin/calendar/calendars/calendar.holiday Sun Aug 17 10:01:14 2014 @@ -285,7 +285,7 @@ 08/15 Independence Day in India 08/15 Liberation Day in South Korea 08/15 National Day in Congo -08/16* Admission Day in Hawaii, 1984 (3rd Friday) +08/16* Admission Day in Hawaii, 1959 (3rd Friday) 08/16 Bennington Battle Day in Vermont 08/16 Independence Days (3 days) in Gabon 08/16 Restoration Day in Dominican Republic
CVS commit: src/libexec/ld.elf_so/arch/vax
Module Name:src Committed By: matt Date: Sun Aug 17 16:14:19 UTC 2014 Modified Files: src/libexec/ld.elf_so/arch/vax: rtld_start.S Log Message: add a missing register prefix. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/libexec/ld.elf_so/arch/vax/rtld_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/arch/vax/rtld_start.S diff -u src/libexec/ld.elf_so/arch/vax/rtld_start.S:1.22 src/libexec/ld.elf_so/arch/vax/rtld_start.S:1.23 --- src/libexec/ld.elf_so/arch/vax/rtld_start.S:1.22 Sat Mar 22 15:13:10 2014 +++ src/libexec/ld.elf_so/arch/vax/rtld_start.S Sun Aug 17 16:14:19 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld_start.S,v 1.22 2014/03/22 15:13:10 matt Exp $ */ +/* $NetBSD: rtld_start.S,v 1.23 2014/08/17 16:14:19 matt Exp $ */ /* * Copyright 1996 Matt Thomas m...@3am-software.com @@ -152,7 +152,7 @@ ALTENTRY(_rtld_bind_start) extzv %r2,$4,%r3,%r5 /* extract count */ movq 4(%fp),%r2 /* fetch callframe status saved AP */ insv %r1,$16,$12,%r2 /* update save mask */ - addl3 %r3,r4,%r1 /* add counts and discard them */ + addl3 %r3,%r4,%r1 /* add counts and discard them */ movq 12(%fp),%r4 /* fetch callframe saved FP PC */ moval 20(%fp)[%r1],%sp/* pop callframe */ extzv $16,$12,%r2,%r1 /* get save mask back */
CVS commit: src/lib/libc/compiler_rt
Module Name:src Committed By: matt Date: Sun Aug 17 16:14:59 UTC 2014 Modified Files: src/lib/libc/compiler_rt: Makefile.inc Log Message: VAX does need __clzsi2 To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/lib/libc/compiler_rt/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/lib/libc/compiler_rt/Makefile.inc diff -u src/lib/libc/compiler_rt/Makefile.inc:1.25 src/lib/libc/compiler_rt/Makefile.inc:1.26 --- src/lib/libc/compiler_rt/Makefile.inc:1.25 Wed Aug 13 14:41:45 2014 +++ src/lib/libc/compiler_rt/Makefile.inc Sun Aug 17 16:14:59 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.25 2014/08/13 14:41:45 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.26 2014/08/17 16:14:59 matt Exp $ COMPILER_RT_SRCDIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist @@ -136,9 +136,15 @@ GENERIC_SRCS+= \ # These have h/w instructions which are always used. .if ${LIBC_MACHINE_ARCH} != alpha ${LIBC_MACHINE_CPU} != powerpc \ + ${LIBC_MACHINE_CPU} != aarch64 +GENERIC_SRCS+= \ + clzsi2.c +.endif + +# These have h/w instructions which are always used. +.if ${LIBC_MACHINE_ARCH} != alpha ${LIBC_MACHINE_CPU} != powerpc \ ${LIBC_MACHINE_CPU} != aarch64 ${LIBC_MACHINE_ARCH} != vax GENERIC_SRCS+= \ - clzsi2.c \ ctzsi2.c \ divmodsi4.c \ divsi3.c \
CVS commit: src/external/gpl3/gcc/dist/gcc/config/vax
Module Name:src Committed By: matt Date: Sun Aug 17 16:25:21 UTC 2014 Modified Files: src/external/gpl3/gcc/dist/gcc/config/vax: builtins.md vax.c Log Message: Rework so that the ctzsi builtin is supported. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc/dist/gcc/config/vax/vax.c 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/gcc/dist/gcc/config/vax/builtins.md diff -u src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md:1.3 src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md:1.4 --- src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md:1.3 Sat Mar 1 08:58:33 2014 +++ src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md Sun Aug 17 16:25:21 2014 @@ -37,17 +37,17 @@ { rtx label = gen_label_rtx (); - emit_insn (gen_ffssi2_internal (operands[0], operands[1])); + emit_insn (gen_ctzsi2 (operands[0], operands[1])); emit_jump_insn (gen_condjump (gen_rtx_NE(VOIDmode, cc0_rtx, const0_rtx), label)); - emit_insn (gen_negsi2 (operands[0], const1_rtx)); + emit_move_insn (operands[0], constm1_rtx); emit_label (label); emit_insn (gen_addsi3 (operands[0], operands[0], const1_rtx)); DONE; }) -(define_insn ffssi2_internal +(define_insn ctzsi2 [(set (match_operand:SI 0 nonimmediate_operand =rQ) - (ffs:SI (match_operand:SI 1 general_operand nrmT))) + (ctz:SI (match_operand:SI 1 general_operand nrmT))) (set (cc0) (match_dup 0))] ffs $0,$32,%1,%0) Index: src/external/gpl3/gcc/dist/gcc/config/vax/vax.c diff -u src/external/gpl3/gcc/dist/gcc/config/vax/vax.c:1.9 src/external/gpl3/gcc/dist/gcc/config/vax/vax.c:1.10 --- src/external/gpl3/gcc/dist/gcc/config/vax/vax.c:1.9 Wed Jun 4 16:11:32 2014 +++ src/external/gpl3/gcc/dist/gcc/config/vax/vax.c Sun Aug 17 16:25:21 2014 @@ -1117,6 +1117,7 @@ vax_notice_update_cc (rtx exp, rtx insn case IOR: case XOR: case NOT: + case CTZ: case MEM: case REG: cc_status.flags = CC_NO_OVERFLOW;
CVS commit: src/libexec/ld.elf_so/arch/vax
Module Name:src Committed By: matt Date: Sun Aug 17 16:57:37 UTC 2014 Modified Files: src/libexec/ld.elf_so/arch/vax: rtld_start.S Log Message: Add proper registers for register counts. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/libexec/ld.elf_so/arch/vax/rtld_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/arch/vax/rtld_start.S diff -u src/libexec/ld.elf_so/arch/vax/rtld_start.S:1.23 src/libexec/ld.elf_so/arch/vax/rtld_start.S:1.24 --- src/libexec/ld.elf_so/arch/vax/rtld_start.S:1.23 Sun Aug 17 16:14:19 2014 +++ src/libexec/ld.elf_so/arch/vax/rtld_start.S Sun Aug 17 16:57:37 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld_start.S,v 1.23 2014/08/17 16:14:19 matt Exp $ */ +/* $NetBSD: rtld_start.S,v 1.24 2014/08/17 16:57:37 matt Exp $ */ /* * Copyright 1996 Matt Thomas m...@3am-software.com @@ -152,7 +152,7 @@ ALTENTRY(_rtld_bind_start) extzv %r2,$4,%r3,%r5 /* extract count */ movq 4(%fp),%r2 /* fetch callframe status saved AP */ insv %r1,$16,$12,%r2 /* update save mask */ - addl3 %r3,%r4,%r1 /* add counts and discard them */ + addl3 %r4,%r5,%r1 /* add counts and discard them */ movq 12(%fp),%r4 /* fetch callframe saved FP PC */ moval 20(%fp)[%r1],%sp/* pop callframe */ extzv $16,$12,%r2,%r1 /* get save mask back */
CVS commit: src/external/gpl3/binutils/usr.sbin/dbsym
Module Name:src Committed By: joerg Date: Sun Aug 17 19:12:59 UTC 2014 Modified Files: src/external/gpl3/binutils/usr.sbin/dbsym: dbsym.8 dbsym.c Log Message: Add new option -P to print only the symbol table size. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.8 \ src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c 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/usr.sbin/dbsym/dbsym.8 diff -u src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.8:1.3 src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.8:1.4 --- src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.8:1.3 Mon Mar 19 09:13:33 2012 +++ src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.8 Sun Aug 17 19:12:59 2014 @@ -1,6 +1,6 @@ -.\ $NetBSD: dbsym.8,v 1.3 2012/03/19 09:13:33 wiz Exp $ +.\ $NetBSD: dbsym.8,v 1.4 2014/08/17 19:12:59 joerg Exp $ .\ -.Dd March 19, 2012 +.Dd August 14, 2014 .Dt DBSYM 8 .Os .Sh NAME @@ -8,7 +8,7 @@ .Nd copy kernel symbol table into db_symtab space .Sh SYNOPSIS .Nm -.Op Fl pv +.Op Fl Ppv .Op Fl b Ar bfdname .Ar kernel .Sh DESCRIPTION @@ -34,6 +34,12 @@ To recognize kernel executable format, t flag specifies BFD name of kernel. .Pp If the +.Fl P +flag is given, +.Nm +will report the size of the kernel symbol table. +.Pp +If the .Fl p flag is given, .Nm Index: src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c diff -u src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c:1.3 src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c:1.4 --- src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c:1.3 Mon Mar 19 09:14:15 2012 +++ src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c Sun Aug 17 19:12:59 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dbsym.c,v 1.3 2012/03/19 09:14:15 wiz Exp $ */ +/* $NetBSD: dbsym.c,v 1.4 2014/08/17 19:12:59 joerg Exp $ */ /* * Copyright (c) 2001 Simon Burge (for Wasabi Systems) @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1996 Christopher G. Demetriou.\ Copyright 2001 Simon Burge.\ All rights reserved.); -__RCSID($NetBSD: dbsym.c,v 1.3 2012/03/19 09:14:15 wiz Exp $); +__RCSID($NetBSD: dbsym.c,v 1.4 2014/08/17 19:12:59 joerg Exp $); #endif /* not lint */ #include sys/param.h @@ -76,6 +76,7 @@ int load_symtab(bfd *, int fd, char **, int verbose; int printsize; +int printsize2; int main(int argc, char **argv) @@ -91,7 +92,7 @@ main(int argc, char **argv) setprogname(argv[0]); bfdname = NULL; - while ((ch = getopt(argc, argv, b:pv)) != -1) + while ((ch = getopt(argc, argv, b:Ppv)) != -1) switch (ch) { case 'b': bfdname = optarg; @@ -102,6 +103,9 @@ main(int argc, char **argv) case 'p': printsize = 1; break; + case 'P': + printsize2 = 1; + break; case '?': default: usage(); @@ -158,6 +162,10 @@ main(int argc, char **argv) printf(%d %d\n, symtabsize, symtab_space); goto done; } + if (printsize2) { + printf(%d\n, symtabsize); + goto done; + } if (symtabsize symtab_space) errx(1, symbol table (%u bytes) too big for buffer (%u bytes)\n @@ -194,7 +202,7 @@ usage(void) const char **list; fprintf(stderr, - usage: %s [-pv] [-b bfdname] kernel\n, + usage: %s [-Ppv] [-b bfdname] kernel\n, getprogname()); fprintf(stderr, supported targets:); for (list = bfd_target_list(); *list != NULL; list++)
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: justin Date: Sun Aug 17 19:28:46 UTC 2014 Modified Files: src/sys/rump/librump/rumpvfs: rumpfs.c Log Message: Fix memory leak on error case, as reported in http://m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-2 To generate a diff of this commit: cvs rdiff -u -r1.129 -r1.130 src/sys/rump/librump/rumpvfs/rumpfs.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/rump/librump/rumpvfs/rumpfs.c diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.129 src/sys/rump/librump/rumpvfs/rumpfs.c:1.130 --- src/sys/rump/librump/rumpvfs/rumpfs.c:1.129 Fri Jun 13 15:45:02 2014 +++ src/sys/rump/librump/rumpvfs/rumpfs.c Sun Aug 17 19:28:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpfs.c,v 1.129 2014/06/13 15:45:02 pooka Exp $ */ +/* $NetBSD: rumpfs.c,v 1.130 2014/08/17 19:28:46 justin Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.129 2014/06/13 15:45:02 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.130 2014/08/17 19:28:46 justin Exp $); #include sys/param.h #include sys/atomic.h @@ -1740,8 +1740,10 @@ rumpfs_mountfs(struct mount *mp) rn = makeprivate(VDIR, RUMPFS_DEFAULTMODE, NODEV, DEV_BSIZE, false); rn-rn_parent = rn; - if ((error = makevnode(mp, rn, rfsmp-rfsmp_rvp)) != 0) + if ((error = makevnode(mp, rn, rfsmp-rfsmp_rvp)) != 0) { + kmem_free(rfsmp, sizeof(*rfsmp)); return error; + } rfsmp-rfsmp_rvp-v_vflag |= VV_ROOT;
CVS commit: src/sys/arch/m68k/include
Module Name:src Committed By: martin Date: Sun Aug 17 20:22:41 UTC 2014 Modified Files: src/sys/arch/m68k/include: int_fmtio.h Log Message: Revert previous (SCN*FAST*) and make PRI*FAST* identical. Should fix the default (gcc 4.5 based) build. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/m68k/include/int_fmtio.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/arch/m68k/include/int_fmtio.h diff -u src/sys/arch/m68k/include/int_fmtio.h:1.5 src/sys/arch/m68k/include/int_fmtio.h:1.6 --- src/sys/arch/m68k/include/int_fmtio.h:1.5 Fri Aug 15 08:59:58 2014 +++ src/sys/arch/m68k/include/int_fmtio.h Sun Aug 17 20:22:41 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: int_fmtio.h,v 1.5 2014/08/15 08:59:58 martin Exp $ */ +/* $NetBSD: int_fmtio.h,v 1.6 2014/08/17 20:22:41 martin Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -49,8 +49,8 @@ #define PRIdLEAST16 d /* int_least16_t */ #define PRIdLEAST32 d /* int_least32_t */ #define PRIdLEAST64 lld /* int_least64_t */ -#define PRIdFAST8 d /* int_fast8_t */ -#define PRIdFAST16 d /* int_fast16_t */ +#define PRIdFAST8 hhd /* int_fast8_t */ +#define PRIdFAST16 hd /* int_fast16_t */ #define PRIdFAST32 d /* int_fast32_t */ #define PRIdFAST64 lld /* int_fast64_t */ #define PRIdMAX lld /* intmax_t */ @@ -64,8 +64,8 @@ #define PRIiLEAST16 i /* int_least16_t */ #define PRIiLEAST32 i /* int_least32_t */ #define PRIiLEAST64 lli /* int_least64_t */ -#define PRIiFAST8 i /* int_fast8_t */ -#define PRIiFAST16 i /* int_fast16_t */ +#define PRIiFAST8 hhi /* int_fast8_t */ +#define PRIiFAST16 hi /* int_fast16_t */ #define PRIiFAST32 i /* int_fast32_t */ #define PRIiFAST64 lli /* int_fast64_t */ #define PRIiMAX lli /* intmax_t */ @@ -81,8 +81,8 @@ #define PRIoLEAST16 o /* uint_least16_t */ #define PRIoLEAST32 o /* uint_least32_t */ #define PRIoLEAST64 llo /* uint_least64_t */ -#define PRIoFAST8 o /* uint_fast8_t */ -#define PRIoFAST16 o /* uint_fast16_t */ +#define PRIoFAST8 hho /* uint_fast8_t */ +#define PRIoFAST16 ho /* uint_fast16_t */ #define PRIoFAST32 o /* uint_fast32_t */ #define PRIoFAST64 llo /* uint_fast64_t */ #define PRIoMAX llo /* uintmax_t */ @@ -96,8 +96,8 @@ #define PRIuLEAST16 u /* uint_least16_t */ #define PRIuLEAST32 u /* uint_least32_t */ #define PRIuLEAST64 llu /* uint_least64_t */ -#define PRIuFAST8 u /* uint_fast8_t */ -#define PRIuFAST16 u /* uint_fast16_t */ +#define PRIuFAST8 hhu /* uint_fast8_t */ +#define PRIuFAST16 hu /* uint_fast16_t */ #define PRIuFAST32 u /* uint_fast32_t */ #define PRIuFAST64 llu /* uint_fast64_t */ #define PRIuMAX llu /* uintmax_t */ @@ -111,8 +111,8 @@ #define PRIxLEAST16 x /* uint_least16_t */ #define PRIxLEAST32 x /* uint_least32_t */ #define PRIxLEAST64 llx /* uint_least64_t */ -#define PRIxFAST8 x /* uint_fast8_t */ -#define PRIxFAST16 x /* uint_fast16_t */ +#define PRIxFAST8 hhx /* uint_fast8_t */ +#define PRIxFAST16 hx /* uint_fast16_t */ #define PRIxFAST32 x /* uint_fast32_t */ #define PRIxFAST64 llx /* uint_fast64_t */ #define PRIxMAX llx /* uintmax_t */ @@ -126,8 +126,8 @@ #define PRIXLEAST16 X /* uint_least16_t */ #define PRIXLEAST32 X /* uint_least32_t */ #define PRIXLEAST64 llX /* uint_least64_t */ -#define PRIXFAST8 X /* uint_fast8_t */ -#define PRIXFAST16 X /* uint_fast16_t */ +#define PRIXFAST8 hhX /* uint_fast8_t */ +#define PRIXFAST16 hX /* uint_fast16_t */ #define PRIXFAST32 X /* uint_fast32_t */ #define PRIXFAST64 llX /* uint_fast64_t */ #define PRIXMAX llX /* uintmax_t */ @@ -143,8 +143,8 @@ #define SCNdLEAST16 hd /* int_least16_t */ #define SCNdLEAST32 d /* int_least32_t */ #define SCNdLEAST64 lld /* int_least64_t */ -#define SCNdFAST8 d /* int_fast8_t */ -#define SCNdFAST16 d /* int_fast16_t */ +#define SCNdFAST8 hhd /* int_fast8_t */ +#define SCNdFAST16 hd /* int_fast16_t */ #define SCNdFAST32 d /* int_fast32_t */ #define SCNdFAST64 lld /* int_fast64_t */ #define SCNdMAX lld /* intmax_t */ @@ -158,8 +158,8 @@ #define SCNiLEAST16 hi /* int_least16_t */ #define SCNiLEAST32 i /* int_least32_t */ #define SCNiLEAST64 lli /* int_least64_t */ -#define SCNiFAST8 i /* int_fast8_t */ -#define SCNiFAST16 i /* int_fast16_t */ +#define SCNiFAST8 hhi /* int_fast8_t */ +#define SCNiFAST16 hi /* int_fast16_t */ #define SCNiFAST32 i /* int_fast32_t */ #define SCNiFAST64 lli /* int_fast64_t */ #define SCNiMAX lli /* intmax_t */ @@ -175,8 +175,8 @@ #define SCNoLEAST16 ho /* uint_least16_t */ #define SCNoLEAST32 o /* uint_least32_t */ #define SCNoLEAST64 llo /* uint_least64_t */ -#define SCNoFAST8 o /* uint_fast8_t */ -#define SCNoFAST16 o /* uint_fast16_t */ +#define SCNoFAST8 hho /* uint_fast8_t */ +#define SCNoFAST16 ho /* uint_fast16_t */ #define SCNoFAST32 o /* uint_fast32_t */ #define SCNoFAST64 llo /* uint_fast64_t */ #define SCNoMAX llo /* uintmax_t */ @@ -190,8
CVS commit: src
Module Name:src Committed By: joerg Date: Sun Aug 17 21:17:44 UTC 2014 Modified Files: src/sys/arch/aarch64/conf: Makefile.aarch64 src/sys/arch/acorn32/conf: EB7500ATX src/sys/arch/algor/conf: P4032 P5064 P5064-64 P6032 src/sys/arch/amd64/amd64: locore.S src/sys/arch/arm/conf: Makefile.arm src/sys/arch/cats/conf: GENERIC src/sys/arch/dreamcast/conf: GENERIC src/sys/arch/epoc32/conf: GENERIC src/sys/arch/evbarm/conf: ADI_BRH ARMADAXP ARMADILLO210 ARMADILLO9 BCM5301X BCM56340 BEAGLEBOARD BEAGLEBOARDXM BEAGLEBONE CP3100 CUBIEBOARD DNS323 GEMINI GEMINI_MASTER GEMINI_SLAVE GOLDENGATE GUMSTIX HAWK HDL_G HPT5325 IGEPV2 IMX23_OLINUXINO IMX31LITE INTEGRATOR INTEGRATOR_CP IQ31244 IQ80310 IQ80321 IXDP425 IXM1200 KUROBOX_PRO LUBBOCK MMNET_GENERIC MPCSA_GENERIC MV2120 N900 NAPPI NSLU2 ODROID ODROID-U OMAP5EVM OPENBLOCKS_A6 OPENBLOCKS_AX3 OSK5912 OVERO PANDABOARD RPI SHEEVAPLUG TEAMASA_NPWR TEAMASA_NPWR_FC TISDP2420 TISDP2430 TS7200 TWINTAIL VIPER ZAO425 src/sys/arch/evbmips/conf: ADM5120 ADM5120-NB ADM5120-USB ALCHEMY AP30 CPMBR1400 DB120 GDIUM64 MALTA MALTA64 MERAKI RB153 RB433UAH WGT624V3 XLSATX ZYXELKX src/sys/arch/evbppc/conf: EV64260 EXPLORA451 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266 OPENBLOCKS600 P2020DS P2020RDB PMPPC RB800 TWRP1025 VIRTEX_DFC VIRTEX_GSRD1 VIRTEX_GSRD2 WALNUT src/sys/arch/evbsh3/conf: AP_MS104_SH4 T_SH7706LAN T_SH7706LSR src/sys/arch/i386/i386: locore.S src/sys/arch/iyonix/conf: GENERIC src/sys/arch/luna68k/conf: GENERIC INSTALL src/sys/arch/mac68k/mac68k: machdep.c src/sys/arch/netwinder/conf: GENERIC src/sys/arch/sbmips/conf: GENERIC GENERIC.MP GENERIC64 GENERIC64.MP src/sys/arch/shark/conf: GENERIC src/sys/arch/usermode/conf: GENERIC.common src/sys/arch/zaurus/conf: GENERIC INSTALL src/sys/conf: Makefile.kern.inc files src/sys/kern: kern_ksyms.c src/usr.bin/config: mkmakefile.c Added Files: src/sys/kern: kern_ksyms_buf.c Log Message: Reorganize symbol table embedding. The existing option SYMTAB_SPACE is replaced by the make option COPY_SYMTAB set to any value. The copy of the symbol table is no longer put into a buffer in kern_ksyms.o, but a small helper object. This object is build first with a dummy size, then the kernel is linked to compute the real dimension of the symbol table buffer. After that, the helper object is rebuild and the kernel linked again. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/aarch64/conf/Makefile.aarch64 cvs rdiff -u -r1.55 -r1.56 src/sys/arch/acorn32/conf/EB7500ATX cvs rdiff -u -r1.70 -r1.71 src/sys/arch/algor/conf/P4032 cvs rdiff -u -r1.80 -r1.81 src/sys/arch/algor/conf/P5064 cvs rdiff -u -r1.4 -r1.5 src/sys/arch/algor/conf/P5064-64 cvs rdiff -u -r1.71 -r1.72 src/sys/arch/algor/conf/P6032 cvs rdiff -u -r1.76 -r1.77 src/sys/arch/amd64/amd64/locore.S cvs rdiff -u -r1.44 -r1.45 src/sys/arch/arm/conf/Makefile.arm cvs rdiff -u -r1.151 -r1.152 src/sys/arch/cats/conf/GENERIC cvs rdiff -u -r1.116 -r1.117 src/sys/arch/dreamcast/conf/GENERIC cvs rdiff -u -r1.3 -r1.4 src/sys/arch/epoc32/conf/GENERIC cvs rdiff -u -r1.67 -r1.68 src/sys/arch/evbarm/conf/ADI_BRH \ src/sys/arch/evbarm/conf/IQ31244 cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/ARMADAXP cvs rdiff -u -r1.32 -r1.33 src/sys/arch/evbarm/conf/ARMADILLO210 cvs rdiff -u -r1.46 -r1.47 src/sys/arch/evbarm/conf/ARMADILLO9 \ src/sys/arch/evbarm/conf/TEAMASA_NPWR_FC cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/conf/BCM5301X cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/conf/BCM56340 \ src/sys/arch/evbarm/conf/OMAP5EVM cvs rdiff -u -r1.55 -r1.56 src/sys/arch/evbarm/conf/BEAGLEBOARD \ src/sys/arch/evbarm/conf/ZAO425 cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/conf/BEAGLEBOARDXM cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbarm/conf/BEAGLEBONE \ src/sys/arch/evbarm/conf/OSK5912 cvs rdiff -u -r1.40 -r1.41 src/sys/arch/evbarm/conf/CP3100 \ src/sys/arch/evbarm/conf/SHEEVAPLUG cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbarm/conf/CUBIEBOARD cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/conf/DNS323 \ src/sys/arch/evbarm/conf/IMX23_OLINUXINO \ src/sys/arch/evbarm/conf/KUROBOX_PRO src/sys/arch/evbarm/conf/ODROID cvs rdiff -u -r1.29 -r1.30 src/sys/arch/evbarm/conf/GEMINI \ src/sys/arch/evbarm/conf/GEMINI_MASTER \ src/sys/arch/evbarm/conf/GEMINI_SLAVE cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/conf/GOLDENGATE cvs rdiff -u -r1.82 -r1.83 src/sys/arch/evbarm/conf/GUMSTIX \ src/sys/arch/evbarm/conf/IQ80321 cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/HAWK cvs rdiff -u -r1.41 -r1.42 src/sys/arch/evbarm/conf/HDL_G \ src/sys/arch/evbarm/conf/MPCSA_GENERIC cvs rdiff -u -r1.21 -r1.22
CVS commit: xsrc/external/mit/xf86-video-nv/dist/src
Module Name:xsrc Committed By: joerg Date: Sun Aug 17 22:30:55 UTC 2014 Modified Files: xsrc/external/mit/xf86-video-nv/dist/src: nv_driver.c Log Message: CARD32 uses non-canonical typedefs on i386, so explicitly cast to uint32_t to fix build with clang. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xf86-video-nv/dist/src/nv_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-nv/dist/src/nv_driver.c diff -u xsrc/external/mit/xf86-video-nv/dist/src/nv_driver.c:1.6 xsrc/external/mit/xf86-video-nv/dist/src/nv_driver.c:1.7 --- xsrc/external/mit/xf86-video-nv/dist/src/nv_driver.c:1.6 Fri Aug 15 15:14:43 2014 +++ xsrc/external/mit/xf86-video-nv/dist/src/nv_driver.c Sun Aug 17 22:30:55 2014 @@ -935,11 +935,11 @@ NVPciProbe(DriverPtr drv, int entity, st if(name) xf86DrvMsg(0, X_WARNING, NV_NAME : Ignoring unsupported device 0x%PRIx32 (%s) at %2.2d@%2.2d:%2.2d:%1.1d\n, - id, name, dev-bus, dev-domain, dev-dev, dev-func); + (uint32_t)id, name, dev-bus, dev-domain, dev-dev, dev-func); else xf86DrvMsg(0, X_WARNING, NV_NAME : Ignoring unsupported device 0x%PRIx32 at %2.2d@%2.2d:%2.2d:%1.1d\n, - id, dev-bus, dev-domain, dev-dev, dev-func); + (uint32_t)id, dev-bus, dev-domain, dev-dev, dev-func); return FALSE; }
CVS commit: src/sys/kern
Module Name:src Committed By: chs Date: Sun Aug 17 23:03:58 UTC 2014 Modified Files: src/sys/kern: exec_elf.c Log Message: eliminate COMPAT_OLDNOTE and just always recognize the old notes. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/kern/exec_elf.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/exec_elf.c diff -u src/sys/kern/exec_elf.c:1.69 src/sys/kern/exec_elf.c:1.70 --- src/sys/kern/exec_elf.c:1.69 Tue Jul 8 17:16:25 2014 +++ src/sys/kern/exec_elf.c Sun Aug 17 23:03:58 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.c,v 1.69 2014/07/08 17:16:25 maxv Exp $ */ +/* $NetBSD: exec_elf.c,v 1.70 2014/08/17 23:03:58 chs Exp $ */ /*- * Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.69 2014/07/08 17:16:25 maxv Exp $); +__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.70 2014/08/17 23:03:58 chs Exp $); #ifdef _KERNEL_OPT #include opt_pax.h @@ -863,9 +863,6 @@ netbsd_elf_signature(struct lwp *l, stru int error; int isnetbsd = 0; char *ndata, *ndesc; -#ifdef COMPAT_OLDNOTE - int compat_oldnote = -1; -#endif #ifdef DIAGNOSTIC const char *badnote; @@ -907,6 +904,12 @@ netbsd_elf_signature(struct lwp *l, stru *header size + 4-byte aligned name + 4-byte aligned desc * Ensure this size is consistent with what is indicated * in sh_size. The first check avoids integer overflows. + * + * Binaries from before NetBSD 1.6 have two notes in the same + * note section. The second note was never used, so as long as + * the section is at least as big as it should be, it's ok. + * These binaries also have a second note section with a note of + * type ELF_NOTE_TYPE_NETBSD_TAG, which can be ignored as well. */ if (np-n_namesz shp-sh_size || np-n_descsz shp-sh_size) { BADNOTE(note size limit); @@ -914,11 +917,8 @@ netbsd_elf_signature(struct lwp *l, stru } nsize = sizeof(*np) + roundup(np-n_namesz, 4) + roundup(np-n_descsz, 4); - if (nsize != shp-sh_size) { + if (nsize shp-sh_size) { BADNOTE(note size); -#ifdef COMPAT_OLDNOTE - if (nsize shp-sh_size || compat_oldnote == 0) -#endif goto bad; } ndesc = ndata + roundup(np-n_namesz, 4); @@ -933,9 +933,6 @@ netbsd_elf_signature(struct lwp *l, stru memcpy(epp-ep_osversion, ndesc, ELF_NOTE_NETBSD_DESCSZ); isnetbsd = 1; -#ifdef COMPAT_OLDNOTE -compat_oldnote = epp-ep_osversion == 199905; -#endif break; } @@ -947,10 +944,6 @@ netbsd_elf_signature(struct lwp *l, stru memcmp(ndata, ELF_NOTE_SUSE_NAME, ELF_NOTE_SUSE_NAMESZ) == 0) break; -#ifdef COMPAT_OLDNOTE - if (compat_oldnote == 1) -break; -#endif BADNOTE(NetBSD tag); goto bad;
CVS commit: src/sys/external/bsd/drm2/ttm
Module Name:src Committed By: riastradh Date: Mon Aug 18 01:17:35 UTC 2014 Modified Files: src/sys/external/bsd/drm2/ttm: ttm_bo_vm.c Log Message: bus_space_mmap cookies are not paddrs, so don't pmap_enter them! To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/ttm/ttm_bo_vm.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/external/bsd/drm2/ttm/ttm_bo_vm.c diff -u src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c:1.2 src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c:1.3 --- src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c:1.2 Sat Aug 9 00:18:58 2014 +++ src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c Mon Aug 18 01:17:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ttm_bo_vm.c,v 1.2 2014/08/09 00:18:58 riastradh Exp $ */ +/* $NetBSD: ttm_bo_vm.c,v 1.3 2014/08/18 01:17:34 riastradh Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ttm_bo_vm.c,v 1.2 2014/08/09 00:18:58 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: ttm_bo_vm.c,v 1.3 2014/08/18 01:17:34 riastradh Exp $); #include sys/types.h @@ -89,6 +89,7 @@ ttm_bo_uvm_fault(struct uvm_faultinfo *u unsigned i; vm_prot_t vm_prot; /* VM_PROT_* */ pgprot_t pgprot; /* VM_PROT_* | PMAP_* cacheability flags */ + unsigned mmapflags; int ret; /* Copy-on-write mappings make no sense for the graphics aperture. */ @@ -178,13 +179,19 @@ ttm_bo_uvm_fault(struct uvm_faultinfo *u /* XXX PGO_ALLPAGES? */ if (pps[i] == PGO_DONTCARE) continue; - if (bo-mem.bus.is_iomem) - paddr = bus_space_mmap(bdev-memt, u.base, - ((startpage + i) PAGE_SHIFT), vm_prot, 0); - else + if (bo-mem.bus.is_iomem) { + const paddr_t cookie = bus_space_mmap(bdev-memt, + u.base, ((startpage + i) PAGE_SHIFT), vm_prot, + 0); + + paddr = pmap_phys_address(cookie); + mmapflags = pmap_mmap_flags(cookie); + } else { paddr = page_to_phys(u.ttm-pages[startpage + i]); + mmapflags = 0; + } ret = -pmap_enter(ufi-orig_map-pmap, vaddr + i*PAGE_SIZE, - paddr, vm_prot, (PMAP_CANFAIL | pgprot)); + paddr, vm_prot, (PMAP_CANFAIL | pgprot | mmapflags)); if (ret) goto out3; }
CVS commit: src/sys/external/bsd/drm2/dist/drm
Module Name:src Committed By: riastradh Date: Mon Aug 18 01:21:04 UTC 2014 Modified Files: src/sys/external/bsd/drm2/dist/drm: drm_gem.c src/sys/external/bsd/drm2/dist/drm/ttm: ttm_bo.c Log Message: For gem and ttm objects backed by uvm_aobjs, share the vmobjlock. XXX pullup to 7 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/dist/drm/drm_gem.c cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.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/external/bsd/drm2/dist/drm/drm_gem.c diff -u src/sys/external/bsd/drm2/dist/drm/drm_gem.c:1.4 src/sys/external/bsd/drm2/dist/drm/drm_gem.c:1.5 --- src/sys/external/bsd/drm2/dist/drm/drm_gem.c:1.4 Wed Jul 16 20:56:24 2014 +++ src/sys/external/bsd/drm2/dist/drm/drm_gem.c Mon Aug 18 01:21:03 2014 @@ -155,6 +155,13 @@ int drm_gem_object_init(struct drm_devic #ifdef __NetBSD__ obj-gemo_shm_uao = uao_create(size, 0); + /* + * XXX This is gross. We ought to do it the other way around: + * set the uao to have the main uvm object's lock. However, + * uvm_obj_setlock is not safe on uvm_aobjs. + */ + mutex_obj_hold(obj-gemo_shm_uao-vmobjlock); + uvm_obj_setlock(obj-gemo_uvmobj, obj-gemo_shm_uao-vmobjlock); #else filp = shmem_file_setup(drm mm object, size, VM_NORESERVE); if (IS_ERR(filp)) Index: src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c diff -u src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c:1.4 src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c:1.5 --- src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c:1.4 Sun Jul 27 00:40:39 2014 +++ src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c Mon Aug 18 01:21:03 2014 @@ -33,6 +33,7 @@ #ifdef __NetBSD__ #include sys/types.h #include uvm/uvm_extern.h +#include uvm/uvm_object.h #endif #include drm/ttm/ttm_module.h @@ -269,6 +270,16 @@ static int ttm_bo_add_ttm(struct ttm_buf page_flags, glob-dummy_read_page); if (unlikely(bo-ttm == NULL)) ret = -ENOMEM; +#ifdef __NetBSD__ + /* + * XXX This is gross. We ought to do it the other way + * around: set the uao to have the main uvm object's + * lock. However, uvm_obj_setlock is not safe on + * uvm_aobjs. + */ + mutex_obj_hold(bo-ttm-swap_storage-vmobjlock); + uvm_obj_setlock(bo-uvmobj, bo-ttm-swap_storage-vmobjlock); +#endif break; case ttm_bo_type_sg: bo-ttm = bdev-driver-ttm_tt_create(bdev, bo-num_pages PAGE_SHIFT, @@ -279,6 +290,11 @@ static int ttm_bo_add_ttm(struct ttm_buf break; } bo-ttm-sg = bo-sg; +#ifdef __NetBSD__ + /* XXX This is gross too -- see above. */ + mutex_obj_hold(bo-ttm-swap_storage-vmobjlock); + uvm_obj_setlock(bo-uvmobj, bo-ttm-swap_storage-vmobjlock); +#endif break; default: pr_err(Illegal buffer object type\n);
CVS commit: src/sys/external/bsd/drm2/dist/drm/ttm
Module Name:src Committed By: riastradh Date: Mon Aug 18 02:43:27 UTC 2014 Modified Files: src/sys/external/bsd/drm2/dist/drm/ttm: ttm_bo.c Log Message: Simplify previous. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.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/external/bsd/drm2/dist/drm/ttm/ttm_bo.c diff -u src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c:1.5 src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c:1.6 --- src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c:1.5 Mon Aug 18 01:21:03 2014 +++ src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c Mon Aug 18 02:43:27 2014 @@ -270,16 +270,6 @@ static int ttm_bo_add_ttm(struct ttm_buf page_flags, glob-dummy_read_page); if (unlikely(bo-ttm == NULL)) ret = -ENOMEM; -#ifdef __NetBSD__ - /* - * XXX This is gross. We ought to do it the other way - * around: set the uao to have the main uvm object's - * lock. However, uvm_obj_setlock is not safe on - * uvm_aobjs. - */ - mutex_obj_hold(bo-ttm-swap_storage-vmobjlock); - uvm_obj_setlock(bo-uvmobj, bo-ttm-swap_storage-vmobjlock); -#endif break; case ttm_bo_type_sg: bo-ttm = bdev-driver-ttm_tt_create(bdev, bo-num_pages PAGE_SHIFT, @@ -290,11 +280,6 @@ static int ttm_bo_add_ttm(struct ttm_buf break; } bo-ttm-sg = bo-sg; -#ifdef __NetBSD__ - /* XXX This is gross too -- see above. */ - mutex_obj_hold(bo-ttm-swap_storage-vmobjlock); - uvm_obj_setlock(bo-uvmobj, bo-ttm-swap_storage-vmobjlock); -#endif break; default: pr_err(Illegal buffer object type\n); @@ -302,7 +287,21 @@ static int ttm_bo_add_ttm(struct ttm_buf break; } +#ifdef __NetBSD__ + if (ret) + return ret; + + /* + * XXX This is gross. We ought to do it the other way around: + * set the uao to have the main uvm object's lock. However, + * uvm_obj_setlock is not safe on uvm_aobjs. + */ + mutex_obj_hold(bo-ttm-swap_storage-vmobjlock); + uvm_obj_setlock(bo-uvmobj, bo-ttm-swap_storage-vmobjlock); + return 0; +#else return ret; +#endif } static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
CVS commit: src/sys/altq
Module Name:src Committed By: riastradh Date: Mon Aug 18 03:14:12 UTC 2014 Modified Files: src/sys/altq: altq_jobs.c Log Message: Fix error branches to avoid leaks, noted by maxv@. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/altq/altq_jobs.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/altq/altq_jobs.c diff -u src/sys/altq/altq_jobs.c:1.6 src/sys/altq/altq_jobs.c:1.7 --- src/sys/altq/altq_jobs.c:1.6 Fri Apr 9 19:32:45 2010 +++ src/sys/altq/altq_jobs.c Mon Aug 18 03:14:12 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: altq_jobs.c,v 1.6 2010/04/09 19:32:45 plunky Exp $ */ +/* $NetBSD: altq_jobs.c,v 1.7 2014/08/18 03:14:12 riastradh Exp $ */ /* $KAME: altq_jobs.c,v 1.11 2005/04/13 03:44:25 suz Exp $ */ /* * Copyright (c) 2001, the Rector and Board of Visitors of the @@ -59,7 +59,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: altq_jobs.c,v 1.6 2010/04/09 19:32:45 plunky Exp $); +__KERNEL_RCSID(0, $NetBSD: altq_jobs.c,v 1.7 2014/08/18 03:14:12 riastradh Exp $); #ifdef _KERNEL_OPT #include opt_altq.h @@ -1158,7 +1158,7 @@ adjust_rates_rdc(struct jobs_if *jif) error = update_error(jif); if (!error) - return (NULL); + goto fail; prop_control = (upper_bound*upper_bound*min_share) /(max_prod*(max_avg_pkt_size 2)); @@ -1252,6 +1252,9 @@ adjust_rates_rdc(struct jobs_if *jif) } } return result; + +fail: free(result, M_DEVBUF); + return NULL; } /* @@ -1284,19 +1287,19 @@ assign_rate_drops_adc(struct jobs_if *ji result = malloc((jif-jif_maxpri+1)*sizeof(int64_t), M_DEVBUF, M_WAITOK); if (result == NULL) - return NULL; + goto fail0; c = malloc((jif-jif_maxpri+1)*sizeof(u_int64_t), M_DEVBUF, M_WAITOK); if (c == NULL) - return NULL; + goto fail1; n = malloc((jif-jif_maxpri+1)*sizeof(u_int64_t), M_DEVBUF, M_WAITOK); if (n == NULL) - return NULL; + goto fail2; k = malloc((jif-jif_maxpri+1)*sizeof(u_int64_t), M_DEVBUF, M_WAITOK); if (k == NULL) - return NULL; + goto fail3; available = malloc((jif-jif_maxpri+1)*sizeof(int64_t), M_DEVBUF, M_WAITOK); if (available == NULL) - return NULL; + goto fail4; for (i = 0; i = jif-jif_maxpri; i++) result[i] = 0; @@ -1525,6 +1528,14 @@ assign_rate_drops_adc(struct jobs_if *ji free(available, M_DEVBUF); return (result); + +fail5: __unused + free(available, M_DEVBUF); +fail4: free(k, M_DEVBUF); +fail3: free(n, M_DEVBUF); +fail2: free(c, M_DEVBUF); +fail1: free(result, M_DEVBUF); +fail0: return NULL; } /*
CVS commit: src/sys/dev/ic
Module Name:src Committed By: riastradh Date: Mon Aug 18 03:43:10 UTC 2014 Modified Files: src/sys/dev/ic: oosiop.c Log Message: Fix leaks in oosiop_alloc_cb error branches, noted by maxv@. While here, avoid a sketchy pointer cast that probably falls afoul of strict aliasing rules. Compile-tested only, with hppa. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/dev/ic/oosiop.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/ic/oosiop.c diff -u src/sys/dev/ic/oosiop.c:1.13 src/sys/dev/ic/oosiop.c:1.14 --- src/sys/dev/ic/oosiop.c:1.13 Sat Nov 13 13:52:02 2010 +++ src/sys/dev/ic/oosiop.c Mon Aug 18 03:43:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: oosiop.c,v 1.13 2010/11/13 13:52:02 uebayasi Exp $ */ +/* $NetBSD: oosiop.c,v 1.14 2014/08/18 03:43:10 riastradh Exp $ */ /* * Copyright (c) 2001 Shuichiro URATA. All rights reserved. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: oosiop.c,v 1.13 2010/11/13 13:52:02 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: oosiop.c,v 1.14 2014/08/18 03:43:10 riastradh Exp $); #include sys/param.h #include sys/systm.h @@ -247,6 +247,7 @@ static int oosiop_alloc_cb(struct oosiop_softc *sc, int ncb) { struct oosiop_cb *cb; + void *xfer_kva; struct oosiop_xfer *xfer; bus_size_t xfersize; bus_dma_segment_t seg; @@ -258,7 +259,8 @@ oosiop_alloc_cb(struct oosiop_softc *sc, cb = malloc(sizeof(struct oosiop_cb) * ncb, M_DEVBUF, M_NOWAIT|M_ZERO); if (cb == NULL) { printf(: failed to allocate cb memory\n); - return (ENOMEM); + err = ENOMEM; + goto fail0; } /* @@ -269,57 +271,79 @@ oosiop_alloc_cb(struct oosiop_softc *sc, nseg, BUS_DMA_NOWAIT); if (err) { printf(: failed to allocate xfer block memory, err=%d\n, err); - return (err); + goto fail1; } - err = bus_dmamem_map(sc-sc_dmat, seg, nseg, xfersize, - (void **)(void *)xfer, BUS_DMA_NOWAIT | BUS_DMA_COHERENT); + KASSERT(nseg == 1); + err = bus_dmamem_map(sc-sc_dmat, seg, nseg, xfersize, xfer_kva, + BUS_DMA_NOWAIT | BUS_DMA_COHERENT); if (err) { printf(: failed to map xfer block memory, err=%d\n, err); - return (err); + goto fail2; } + xfer = xfer_kva; /* Initialize each command block */ for (i = 0; i ncb; i++) { err = bus_dmamap_create(sc-sc_dmat, PAGE_SIZE, 1, PAGE_SIZE, - 0, BUS_DMA_NOWAIT, cb-cmddma); + 0, BUS_DMA_NOWAIT, cb[i].cmddma); if (err) { printf(: failed to create cmddma map, err=%d\n, err); - return (err); + goto loop_fail0; } err = bus_dmamap_create(sc-sc_dmat, OOSIOP_MAX_XFER, OOSIOP_NSG, OOSIOP_DBC_MAX, 0, BUS_DMA_NOWAIT, - cb-datadma); + cb[i].datadma); if (err) { printf(: failed to create datadma map, err=%d\n, err); - return (err); + goto loop_fail1; } err = bus_dmamap_create(sc-sc_dmat, sizeof(struct oosiop_xfer), 1, sizeof(struct oosiop_xfer), - 0, BUS_DMA_NOWAIT, cb-xferdma); + 0, BUS_DMA_NOWAIT, cb[i].xferdma); if (err) { printf(: failed to create xfer block map, err=%d\n, err); - return (err); + goto loop_fail2; } - err = bus_dmamap_load(sc-sc_dmat, cb-xferdma, xfer, + err = bus_dmamap_load(sc-sc_dmat, cb[i].xferdma, xfer, sizeof(struct oosiop_xfer), NULL, BUS_DMA_NOWAIT); if (err) { printf(: failed to load xfer block, err=%d\n, err); - return (err); + goto loop_fail3; } - cb-xfer = xfer; + cb[i].xfer = xfer[i]; + continue; +loop_fail4: __unused + bus_dmamap_unload(sc-sc_dmat, cb[i].xferdma); +loop_fail3: bus_dmamap_destroy(sc-sc_dmat, cb[i].xferdma); +loop_fail2: bus_dmamap_destroy(sc-sc_dmat, cb[i].datadma); +loop_fail1: bus_dmamap_destroy(sc-sc_dmat, cb[i].cmddma); +loop_fail0: goto fail3; + } + + for (i = 0; i ncb; i++) { s = splbio(); - TAILQ_INSERT_TAIL(sc-sc_free_cb, cb, chain); + TAILQ_INSERT_TAIL(sc-sc_free_cb, cb[i], chain); splx(s); - - cb++; - xfer++; } - return (0); + /* Success! */ + return 0; + +fail3: while (i--) { + bus_dmamap_unload(sc-sc_dmat, cb[i].xferdma); + bus_dmamap_destroy(sc-sc_dmat, cb[i].xferdma); + bus_dmamap_destroy(sc-sc_dmat, cb[i].datadma); + bus_dmamap_destroy(sc-sc_dmat, cb[i].cmddma); + } + bus_dmamem_unmap(sc-sc_dmat, xfer_kva, xfersize); +fail2: bus_dmamem_free(sc-sc_dmat, seg, 1); +fail1: free(cb, M_DEVBUF); +fail0: KASSERT(err); + return err; } static inline void
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: riastradh Date: Mon Aug 18 03:59:27 UTC 2014 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Don't leak f on failure. Noted by maxv@. Compile-tested only, with zaurus. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/dev/rasops/rasops.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.71 src/sys/dev/rasops/rasops.c:1.72 --- src/sys/dev/rasops/rasops.c:1.71 Thu Apr 19 06:57:39 2012 +++ src/sys/dev/rasops/rasops.c Mon Aug 18 03:59:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.71 2012/04/19 06:57:39 macallan Exp $ */ +/* $NetBSD: rasops.c,v 1.72 2014/08/18 03:59:27 riastradh Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rasops.c,v 1.71 2012/04/19 06:57:39 macallan Exp $); +__KERNEL_RCSID(0, $NetBSD: rasops.c,v 1.72 2014/08/18 03:59:27 riastradh Exp $); #include opt_rasops.h #include rasops_glue.h @@ -1351,16 +1351,21 @@ rasops_rotate_font(int *cookie, int rota f = malloc(sizeof(struct rotatedfont), M_DEVBUF, M_WAITOK); if (f == NULL) - return; + goto fail0; if ((ncookie = wsfont_rotate(*cookie, rotate)) == -1) - return; + goto fail1; f-rf_cookie = *cookie; f-rf_rotated = ncookie; SLIST_INSERT_HEAD(rotatedfonts, f, rf_next); *cookie = ncookie; + return; + +fail1: free(f, M_DEVBUF); +fail0: /* Just use the existing font, I guess... */ + return; } static void
CVS commit: src/sys/dev/qbus
Module Name:src Committed By: riastradh Date: Mon Aug 18 04:16:59 UTC 2014 Modified Files: src/sys/dev/qbus: if_qe.c Log Message: Avoid leak in error branch, noted by maxv@, compile-tested for vax. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/dev/qbus/if_qe.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/qbus/if_qe.c diff -u src/sys/dev/qbus/if_qe.c:1.72 src/sys/dev/qbus/if_qe.c:1.73 --- src/sys/dev/qbus/if_qe.c:1.72 Fri Oct 25 15:42:50 2013 +++ src/sys/dev/qbus/if_qe.c Mon Aug 18 04:16:59 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_qe.c,v 1.72 2013/10/25 15:42:50 martin Exp $ */ +/* $NetBSD: if_qe.c,v 1.73 2014/08/18 04:16:59 riastradh Exp $ */ /* * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved. * @@ -38,7 +38,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_qe.c,v 1.72 2013/10/25 15:42:50 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: if_qe.c,v 1.73 2014/08/18 04:16:59 riastradh Exp $); #include opt_inet.h @@ -142,7 +142,7 @@ qematch(device_t parent, cfdata_t cf, vo #define PROBESIZE 4096 struct qe_ring *ring; struct qe_ring *rp; - int error; + int error, match; ring = malloc(PROBESIZE, M_TEMP, M_WAITOK|M_ZERO); memset(sc, 0, sizeof(*sc)); @@ -161,8 +161,10 @@ qematch(device_t parent, cfdata_t cf, vo */ ui.ui_size = PROBESIZE; ui.ui_vaddr = (void *)ring[0]; - if ((error = uballoc(uh, ui, UBA_CANTWAIT))) - return 0; + if ((error = uballoc(uh, ui, UBA_CANTWAIT))) { + match = 0; + goto out0; + } /* * Init a simple fake receive and transmit descriptor that @@ -192,12 +194,14 @@ qematch(device_t parent, cfdata_t cf, vo QE_WCSR(QE_CSR_XMTH, HIWORD(rp)); DELAY(1); + match = 1; + /* * All done with the bus resources. */ ubfree(uh, ui); - free(ring, M_TEMP); - return 1; +out0: free(ring, M_TEMP); + return match; } /*
CVS commit: src/sys/dev/vme
Module Name:src Committed By: riastradh Date: Mon Aug 18 04:26:38 UTC 2014 Modified Files: src/sys/dev/vme: if_ie_vme.c Log Message: Sizeof struct ievme, not sizeof size_t. Noted by maxv@, compile-tested for sparc. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/vme/if_ie_vme.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/vme/if_ie_vme.c diff -u src/sys/dev/vme/if_ie_vme.c:1.30 src/sys/dev/vme/if_ie_vme.c:1.31 --- src/sys/dev/vme/if_ie_vme.c:1.30 Fri Jun 3 16:28:41 2011 +++ src/sys/dev/vme/if_ie_vme.c Mon Aug 18 04:26:38 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ie_vme.c,v 1.30 2011/06/03 16:28:41 tsutsui Exp $ */ +/* $NetBSD: if_ie_vme.c,v 1.31 2014/08/18 04:26:38 riastradh Exp $ */ /* * Copyright (c) 1995 Charles D. Cranor @@ -140,7 +140,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_ie_vme.c,v 1.30 2011/06/03 16:28:41 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: if_ie_vme.c,v 1.31 2014/08/18 04:26:38 riastradh Exp $); #include sys/param.h #include sys/systm.h @@ -424,7 +424,7 @@ ie_vme_match(device_t parent, cfdata_t c return (0); } if (va-r[0].size != VMECF_LEN_DEFAULT - va-r[0].size != sizeof(sizeof(struct ievme))) { + va-r[0].size != sizeof(struct ievme)) { printf(ie_vme_match: bad csr size\n); return (0); }
CVS commit: src/sys/net
Module Name:src Committed By: riastradh Date: Mon Aug 18 04:28:55 UTC 2014 Modified Files: src/sys/net: if_gre.c Log Message: Don't leak in gre_clone_create error branch. Noted by maxv@, compile-tested for amd64. To generate a diff of this commit: cvs rdiff -u -r1.159 -r1.160 src/sys/net/if_gre.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/net/if_gre.c diff -u src/sys/net/if_gre.c:1.159 src/sys/net/if_gre.c:1.160 --- src/sys/net/if_gre.c:1.159 Fri Aug 8 03:05:45 2014 +++ src/sys/net/if_gre.c Mon Aug 18 04:28:55 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_gre.c,v 1.159 2014/08/08 03:05:45 rtr Exp $ */ +/* $NetBSD: if_gre.c,v 1.160 2014/08/18 04:28:55 riastradh Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_gre.c,v 1.159 2014/08/08 03:05:45 rtr Exp $); +__KERNEL_RCSID(0, $NetBSD: if_gre.c,v 1.160 2014/08/18 04:28:55 riastradh Exp $); #include opt_atalk.h #include opt_gre.h @@ -275,7 +275,7 @@ gre_clone_create(struct if_clone *ifc, i if ((any = sockaddr_any_by_family(AF_INET)) == NULL (any = sockaddr_any_by_family(AF_INET6)) == NULL) - return -1; + goto fail0; sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK|M_ZERO); mutex_init(sc-sc_mtx, MUTEX_DRIVER, IPL_SOFTNET); @@ -302,9 +302,8 @@ gre_clone_create(struct if_clone *ifc, i rc = kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, gre_fp_recvloop, sc, NULL, %s, sc-sc_if.if_xname); - - if (rc != 0) - return -1; + if (rc) + goto fail1; gre_evcnt_attach(sc); @@ -314,6 +313,12 @@ gre_clone_create(struct if_clone *ifc, i if_alloc_sadl(sc-sc_if); bpf_attach(sc-sc_if, DLT_NULL, sizeof(uint32_t)); return 0; + +fail1: cv_destroy(sc-sc_fp_condvar); + cv_destroy(sc-sc_condvar); + mutex_destroy(sc-sc_mtx); + free(sc, M_DEVBUF); +fail0: return -1; } static int
CVS commit: src/external/bsd/bind
Module Name:src Committed By: christos Date: Mon Aug 18 04:40:52 UTC 2014 Modified Files: src/external/bsd/bind: Makefile.inc Log Message: ALLOW_FILTER__ON_V4 has been renamed to ALLOW_FILTER_ (John D. Baker) To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/external/bsd/bind/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/external/bsd/bind/Makefile.inc diff -u src/external/bsd/bind/Makefile.inc:1.21 src/external/bsd/bind/Makefile.inc:1.22 --- src/external/bsd/bind/Makefile.inc:1.21 Sat Jul 5 15:22:41 2014 +++ src/external/bsd/bind/Makefile.inc Mon Aug 18 00:40:51 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.21 2014/07/05 19:22:41 dholland Exp $ +# $NetBSD: Makefile.inc,v 1.22 2014/08/18 04:40:51 christos Exp $ .if !defined(BIND9_MAKEFILE_INC) BIND9_MAKEFILE_INC=yes @@ -50,7 +50,7 @@ CPPFLAGS+=-I${BIND_SRCDIR}/include \ .if (${USE_INET6} != no) CPPFLAGS+= -DWANT_IPV6 -CPPFLAGS+= -DALLOW_FILTER__ON_V4 +CPPFLAGS+= -DALLOW_FILTER_ .endif .if defined(HAVE_GCC)
CVS commit: src/usr.sbin/syslogd
Module Name:src Committed By: jnemeth Date: Mon Aug 18 05:21:16 UTC 2014 Modified Files: src/usr.sbin/syslogd: syslogd.c Log Message: - when checking hostname of incoming remote messages, fallback to checking remote host if the message doesn't contain a hostname - don't truncate IP addresses when reading syslogd.conf To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/usr.sbin/syslogd/syslogd.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/syslogd/syslogd.c diff -u src/usr.sbin/syslogd/syslogd.c:1.119 src/usr.sbin/syslogd/syslogd.c:1.120 --- src/usr.sbin/syslogd/syslogd.c:1.119 Wed Nov 27 20:48:28 2013 +++ src/usr.sbin/syslogd/syslogd.c Mon Aug 18 05:21:16 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: syslogd.c,v 1.119 2013/11/27 20:48:28 christos Exp $ */ +/* $NetBSD: syslogd.c,v 1.120 2014/08/18 05:21:16 jnemeth Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = @(#)syslogd.c 8.3 (Berkeley) 4/4/94; #else -__RCSID($NetBSD: syslogd.c,v 1.119 2013/11/27 20:48:28 christos Exp $); +__RCSID($NetBSD: syslogd.c,v 1.120 2014/08/18 05:21:16 jnemeth Exp $); #endif #endif /* not lint */ @@ -1854,21 +1854,22 @@ logmsg(struct buf_msg *buffer) } for (f = Files; f; f = f-f_next) { + char *h; /* host to use for comparing */ + /* skip messages that are incorrect priority */ if (!MATCH_PRI(f, fac, prilev) || f-f_pmask[fac] == INTERNAL_NOPRI) continue; /* skip messages with the incorrect host name */ - /* do we compare with host (IMHO correct) or recvhost */ - /* (compatible)? */ - if (f-f_host != NULL buffer-host != NULL) { - char shost[MAXHOSTNAMELEN + 1], *h; - if (!BSDOutputFormat) { -h = buffer-host; - } else { -(void)strlcpy(shost, buffer-host, -sizeof(shost)); + /* compare with host (which is supposedly more correct), */ + /* but fallback to recvhost if host is NULL */ + h = (buffer-host != NULL) ? buffer-host : buffer-recvhost; + if (f-f_host != NULL h != NULL) { + char shost[MAXHOSTNAMELEN + 1]; + + if (BSDOutputFormat) { +(void)strlcpy(shost, h, sizeof(shost)); trim_anydomain(shost); h = shost; } @@ -3740,7 +3741,7 @@ cfline(size_t linenum, const char *line, f-f_host = NULL; else { f-f_host = strdup(host); - trim_anydomain(f-f_host); + trim_anydomain(f-f_host[1]); /* skip +/- at beginning */ } /* save program name, if any */