diff options
-rw-r--r-- | usr/src/cmd/fs.d/hsfs/labelit/labelit.c | 2 | ||||
-rw-r--r-- | usr/src/cmd/fs.d/udfs/fsck/setup.c | 4 | ||||
-rw-r--r-- | usr/src/cmd/fs.d/ufs/fsck/setup.c | 5 | ||||
-rw-r--r-- | usr/src/cmd/fs.d/ufs/fsdb/fsdb.c | 8 | ||||
-rw-r--r-- | usr/src/cmd/fs.d/ufs/fssnap/fssnap.c | 20 | ||||
-rw-r--r-- | usr/src/pkg/manifests/system-test-libctest.mf | 3 | ||||
-rw-r--r-- | usr/src/test/libc-tests/runfiles/default.run | 1 | ||||
-rw-r--r-- | usr/src/test/libc-tests/tests/Makefile | 4 | ||||
-rw-r--r-- | usr/src/test/libc-tests/tests/psignal-5097.c | 38 | ||||
-rw-r--r-- | usr/src/test/libc-tests/tests/psignal.ksh | 59 | ||||
-rw-r--r-- | usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh | 7 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/arc.c | 11 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/dbuf.c | 4 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/dmu.c | 21 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/dmu_objset.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/sys/dmu.h | 4 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/vdev_queue.c | 20 | ||||
-rw-r--r-- | usr/src/uts/common/inet/kssl/kssl.c | 8 | ||||
-rw-r--r-- | usr/src/uts/common/io/chxge/sge.c | 20 | ||||
-rw-r--r-- | usr/src/uts/common/io/fdc.c | 3 |
20 files changed, 172 insertions, 72 deletions
diff --git a/usr/src/cmd/fs.d/hsfs/labelit/labelit.c b/usr/src/cmd/fs.d/hsfs/labelit/labelit.c index 51f1507e64..1eaaa0ef48 100644 --- a/usr/src/cmd/fs.d/hsfs/labelit/labelit.c +++ b/usr/src/cmd/fs.d/hsfs/labelit/labelit.c @@ -145,7 +145,7 @@ main(int argc, char **argv) if (argc > 1) fprintf(stderr, "%s: Illegal option %s in input\n", callname, string); - usage(); + usage(); } /* open image file in read write only if necessary */ diff --git a/usr/src/cmd/fs.d/udfs/fsck/setup.c b/usr/src/cmd/fs.d/udfs/fsck/setup.c index c66d2545b3..802ecee3d5 100644 --- a/usr/src/cmd/fs.d/udfs/fsck/setup.c +++ b/usr/src/cmd/fs.d/udfs/fsck/setup.c @@ -25,8 +25,6 @@ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #define DKTYPENAMES #include <stdio.h> #include <stdlib.h> @@ -210,7 +208,7 @@ restat: fswritefd = -1; if (preen && !debug) pfatal(gettext("(NO WRITE ACCESS)\n")); - (void) printf(gettext(" (NO WRITE)")); + (void) printf(gettext(" (NO WRITE)")); } if (preen == 0) (void) printf("\n"); diff --git a/usr/src/cmd/fs.d/ufs/fsck/setup.c b/usr/src/cmd/fs.d/ufs/fsck/setup.c index 7e6feedfd4..e95eae6aa0 100644 --- a/usr/src/cmd/fs.d/ufs/fsck/setup.c +++ b/usr/src/cmd/fs.d/ufs/fsck/setup.c @@ -25,8 +25,6 @@ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #define DKTYPENAMES #include <stdio.h> #include <stdlib.h> @@ -611,11 +609,12 @@ find_superblock(caddr_t devstr) calcsb_names[style]) == 1 && calcsb(style, devstr, fsreadfd, &sblock)) { break; + } } /* * We got something from mkfs/newfs, so use it. */ - if (style < MAX_SB_STYLES) + if (style < MAX_SB_STYLES) { proto.fs_ncg = sblock.fs_ncg; bflag = 0; } diff --git a/usr/src/cmd/fs.d/ufs/fsdb/fsdb.c b/usr/src/cmd/fs.d/ufs/fsdb/fsdb.c index 1059fc9e59..bdabf28435 100644 --- a/usr/src/cmd/fs.d/ufs/fsdb/fsdb.c +++ b/usr/src/cmd/fs.d/ufs/fsdb/fsdb.c @@ -31,10 +31,6 @@ char copyright[] = All rights reserved.\n"; #endif /* not lint */ -#ifndef lint -static char sccsid[] = "@(#)fsdb.c 5.8 (Berkeley) 6/1/90"; -#endif /* not lint */ - /* * fsdb - file system debugger * @@ -2566,8 +2562,8 @@ follow_path(long level, long inum) top = NULL; else top--; - nfiles--; - goto duplicate; + nfiles--; + goto duplicate; } } } diff --git a/usr/src/cmd/fs.d/ufs/fssnap/fssnap.c b/usr/src/cmd/fs.d/ufs/fssnap/fssnap.c index 4ac621e61b..58c6b7ec15 100644 --- a/usr/src/cmd/fs.d/ufs/fssnap/fssnap.c +++ b/usr/src/cmd/fs.d/ufs/fssnap/fssnap.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -106,16 +104,16 @@ main(int argc, char *argv[]) char *value; int longjmp_return; - char *mountpoint = NULL; - int mountfd = -1; - char *backpath = NULL; + char *volatile mountpoint = NULL; + int volatile mountfd = -1; + char *volatile backpath = NULL; - int delete = 0; - int stats = 0; - u_offset_t maxsize = 0; - uint_t chunksize = 0; - int rawfile = 0; - int dounlink = 0; + int volatile delete = 0; + int volatile stats = 0; + u_offset_t volatile maxsize = 0; + uint_t volatile chunksize = 0; + int volatile rawfile = 0; + int volatile dounlink = 0; if ((progname = strrchr(argv[0], '/')) != NULL) ++progname; diff --git a/usr/src/pkg/manifests/system-test-libctest.mf b/usr/src/pkg/manifests/system-test-libctest.mf index 558dbdb622..6cc5b2ebcb 100644 --- a/usr/src/pkg/manifests/system-test-libctest.mf +++ b/usr/src/pkg/manifests/system-test-libctest.mf @@ -95,6 +95,9 @@ file path=opt/libc-tests/tests/nl_langinfo_test.$(ARCH) mode=0555 file path=opt/libc-tests/tests/nl_langinfo_test.$(ARCH64) mode=0555 file path=opt/libc-tests/tests/printf-6961.64 mode=0555 file path=opt/libc-tests/tests/priv_gettext mode=0555 +file path=opt/libc-tests/tests/psignal mode=0555 +file path=opt/libc-tests/tests/psignal-5097.32 mode=0555 +file path=opt/libc-tests/tests/psignal-5097.64 mode=0555 file path=opt/libc-tests/tests/pthread_attr_get_np mode=0555 file path=opt/libc-tests/tests/quick_exit mode=0555 file path=opt/libc-tests/tests/quick_exit_order.32 mode=0555 diff --git a/usr/src/test/libc-tests/runfiles/default.run b/usr/src/test/libc-tests/runfiles/default.run index 845aa3492d..cba7f08078 100644 --- a/usr/src/test/libc-tests/runfiles/default.run +++ b/usr/src/test/libc-tests/runfiles/default.run @@ -76,6 +76,7 @@ timeout = 600 [/opt/libc-tests/tests/endian.32] [/opt/libc-tests/tests/endian.64] [/opt/libc-tests/tests/quick_exit] +[/opt/libc-tests/tests/psignal] [/opt/libc-tests/tests/printf-6961.64] [/opt/libc-tests/tests/priv_gettext] [/opt/libc-tests/tests/strerror] diff --git a/usr/src/test/libc-tests/tests/Makefile b/usr/src/test/libc-tests/tests/Makefile index c393844ea0..4bbfe1ba19 100644 --- a/usr/src/test/libc-tests/tests/Makefile +++ b/usr/src/test/libc-tests/tests/Makefile @@ -37,6 +37,7 @@ PROGS = \ call_once \ endian \ env-7076 \ + psignal-5097 \ quick_exit_order \ quick_exit_status \ strcoll-strxfrm-6907 \ @@ -46,7 +47,8 @@ PROGS = \ wcsncasecmp-7350 SCRIPTS = \ - quick_exit + quick_exit \ + psignal CPPFLAGS += -D_REENTRANT diff --git a/usr/src/test/libc-tests/tests/psignal-5097.c b/usr/src/test/libc-tests/tests/psignal-5097.c new file mode 100644 index 0000000000..cfed126bdf --- /dev/null +++ b/usr/src/test/libc-tests/tests/psignal-5097.c @@ -0,0 +1,38 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2016 Joyent, Inc. + */ + +/* + * psignal and psiginfo test cases. + */ + +#include <signal.h> +#include <strings.h> +#include <siginfo.h> + +int +main(void) +{ + struct siginfo sinfo; + + psignal(SIGSEGV, "hello world"); + psignal(SIGINFO, NULL); + + bzero(&sinfo, sizeof (struct siginfo)); + sinfo.si_signo = SIGSEGV; + psiginfo(&sinfo, "hello world"); + sinfo.si_signo = SIGINFO; + psiginfo(&sinfo, NULL); + return (0); +} diff --git a/usr/src/test/libc-tests/tests/psignal.ksh b/usr/src/test/libc-tests/tests/psignal.ksh new file mode 100644 index 0000000000..fc8e1a6205 --- /dev/null +++ b/usr/src/test/libc-tests/tests/psignal.ksh @@ -0,0 +1,59 @@ +#!/usr/bin/ksh +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2016 Joyent, Inc. +# + +# +# Add regression tests for illumos#5079. Verify that psignal and +# psiginfo print what we expect to stderr. +# + +set -o errexit +set -o pipefail + +ps_root=$(dirname $0) +ps_sig32=$ps_root/psignal-5097.32 +ps_sig64=$ps_root/psignal-5097.64 +ps_out=/tmp/$(basename $0).$$ + +function fatal +{ + typeset msg="$*" + echo "Test Failed: $msg" >&2 + exit 1 +} + +function test_one +{ + typeset prog=$1 + typeset outfile=$ps_out.test + + $prog >/dev/null 2>$outfile || fatal "$prog unexpectedly failed" + diff $ps_out $outfile || fatal "$ps_out and $outfile differ " \ + "unexpectedly" + rm -f $outfile +} + +cat > $ps_out <<EOF +hello world: Segmentation Fault +Information Request +hello world : Segmentation Fault ( from process 0 ) +Information Request ( from process 0 ) +EOF + +[[ $? -ne 0 ]] && fatal "failed to set up output file" +test_one $ps_sig32 +test_one $ps_sig64 +rm -f $ps_out +exit 0 diff --git a/usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh b/usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh index 603f27812f..52a0becedd 100644 --- a/usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh +++ b/usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh @@ -86,8 +86,13 @@ function verify_id function verify_disks { typeset disk + typeset path for disk in $DISKS; do - sudo -k prtvtoc /dev/rdsk/${disk}s0 >/dev/null 2>&1 + case $disk in + /*) path=$disk;; + *) path=/dev/rdsk/${disk}s0 + esac + sudo -k prtvtoc $path >/dev/null 2>&1 [[ $? -eq 0 ]] || return 1 done return 0 diff --git a/usr/src/uts/common/fs/zfs/arc.c b/usr/src/uts/common/fs/zfs/arc.c index b10ea0bc69..58177cd7df 100644 --- a/usr/src/uts/common/fs/zfs/arc.c +++ b/usr/src/uts/common/fs/zfs/arc.c @@ -5616,6 +5616,7 @@ arc_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, arc_buf_t *buf, arc_buf_hdr_t *hdr = buf->b_hdr; arc_write_callback_t *callback; zio_t *zio; + zio_prop_t localprop = *zp; ASSERT3P(ready, !=, NULL); ASSERT3P(done, !=, NULL); @@ -5626,7 +5627,13 @@ arc_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, arc_buf_t *buf, if (l2arc) arc_hdr_set_flags(hdr, ARC_FLAG_L2CACHE); if (ARC_BUF_COMPRESSED(buf)) { - ASSERT3U(zp->zp_compress, !=, ZIO_COMPRESS_OFF); + /* + * We're writing a pre-compressed buffer. Make the + * compression algorithm requested by the zio_prop_t match + * the pre-compressed buffer's compression algorithm. + */ + localprop.zp_compress = HDR_GET_COMPRESS(hdr); + ASSERT3U(HDR_GET_LSIZE(hdr), !=, arc_buf_size(buf)); zio_flags |= ZIO_FLAG_RAW; } @@ -5662,7 +5669,7 @@ arc_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, arc_buf_t *buf, zio = zio_write(pio, spa, txg, bp, abd_get_from_buf(buf->b_data, HDR_GET_LSIZE(hdr)), - HDR_GET_LSIZE(hdr), arc_buf_size(buf), zp, arc_write_ready, + HDR_GET_LSIZE(hdr), arc_buf_size(buf), &localprop, arc_write_ready, (children_ready != NULL) ? arc_write_children_ready : NULL, arc_write_physdone, arc_write_done, callback, priority, zio_flags, zb); diff --git a/usr/src/uts/common/fs/zfs/dbuf.c b/usr/src/uts/common/fs/zfs/dbuf.c index f40f77378b..b2e6595190 100644 --- a/usr/src/uts/common/fs/zfs/dbuf.c +++ b/usr/src/uts/common/fs/zfs/dbuf.c @@ -3546,9 +3546,7 @@ dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx) wp_flag = WP_SPILL; wp_flag |= (db->db_state == DB_NOFILL) ? WP_NOFILL : 0; - dmu_write_policy(os, dn, db->db_level, wp_flag, - (data != NULL && arc_get_compression(data) != ZIO_COMPRESS_OFF) ? - arc_get_compression(data) : ZIO_COMPRESS_INHERIT, &zp); + dmu_write_policy(os, dn, db->db_level, wp_flag, &zp); DB_DNODE_EXIT(db); /* diff --git a/usr/src/uts/common/fs/zfs/dmu.c b/usr/src/uts/common/fs/zfs/dmu.c index 7769003c43..4ab1519f38 100644 --- a/usr/src/uts/common/fs/zfs/dmu.c +++ b/usr/src/uts/common/fs/zfs/dmu.c @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2016 by Delphix. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. */ /* Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ /* Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -1713,8 +1713,7 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_sync_cb_t *done, zgd_t *zgd) DB_DNODE_ENTER(db); dn = DB_DNODE(db); - dmu_write_policy(os, dn, db->db_level, WP_DMU_SYNC, - ZIO_COMPRESS_INHERIT, &zp); + dmu_write_policy(os, dn, db->db_level, WP_DMU_SYNC, &zp); DB_DNODE_EXIT(db); /* @@ -1884,8 +1883,7 @@ int zfs_mdcomp_disable = 0; int zfs_redundant_metadata_most_ditto_level = 2; void -dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, - enum zio_compress override_compress, zio_prop_t *zp) +dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, zio_prop_t *zp) { dmu_object_type_t type = dn ? dn->dn_type : DMU_OT_OBJSET; boolean_t ismd = (level > 0 || DMU_OT_IS_METADATA(type) || @@ -1897,10 +1895,6 @@ dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, boolean_t nopwrite = B_FALSE; boolean_t dedup_verify = os->os_dedup_verify; int copies = os->os_copies; - boolean_t lz4_ac = spa_feature_is_active(os->os_spa, - SPA_FEATURE_LZ4_COMPRESS); - - IMPLY(override_compress == ZIO_COMPRESS_LZ4, lz4_ac); /* * We maintain different write policies for each of the following @@ -1987,14 +1981,7 @@ dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, } zp->zp_checksum = checksum; - - /* - * If we're writing a pre-compressed buffer, the compression type we use - * must match the data. If it hasn't been compressed yet, then we should - * use the value dictated by the policies above. - */ - zp->zp_compress = override_compress != ZIO_COMPRESS_INHERIT - ? override_compress : compress; + zp->zp_compress = compress; ASSERT3U(zp->zp_compress, !=, ZIO_COMPRESS_INHERIT); zp->zp_type = (wp & WP_SPILL) ? dn->dn_bonustype : type; diff --git a/usr/src/uts/common/fs/zfs/dmu_objset.c b/usr/src/uts/common/fs/zfs/dmu_objset.c index 7e5ef03983..6bf61854b7 100644 --- a/usr/src/uts/common/fs/zfs/dmu_objset.c +++ b/usr/src/uts/common/fs/zfs/dmu_objset.c @@ -1201,7 +1201,7 @@ dmu_objset_sync(objset_t *os, zio_t *pio, dmu_tx_t *tx) ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID); arc_release(os->os_phys_buf, &os->os_phys_buf); - dmu_write_policy(os, NULL, 0, 0, ZIO_COMPRESS_INHERIT, &zp); + dmu_write_policy(os, NULL, 0, 0, &zp); zio = arc_write(pio, os->os_spa, tx->tx_txg, blkptr_copy, os->os_phys_buf, DMU_OS_IS_L2CACHEABLE(os), diff --git a/usr/src/uts/common/fs/zfs/sys/dmu.h b/usr/src/uts/common/fs/zfs/sys/dmu.h index 7eb6549cce..1dba052ae0 100644 --- a/usr/src/uts/common/fs/zfs/sys/dmu.h +++ b/usr/src/uts/common/fs/zfs/sys/dmu.h @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2016 by Delphix. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright 2013 DEY Storage Systems, Inc. @@ -420,7 +420,7 @@ dmu_write_embedded(objset_t *os, uint64_t object, uint64_t offset, #define WP_SPILL 0x4 void dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, - enum zio_compress compress_override, struct zio_prop *zp); + struct zio_prop *zp); /* * The bonus data is accessed more or less like a regular buffer. * You must dmu_bonus_hold() to get the buffer, which will give you a diff --git a/usr/src/uts/common/fs/zfs/vdev_queue.c b/usr/src/uts/common/fs/zfs/vdev_queue.c index 9665ce9957..c3cf335247 100644 --- a/usr/src/uts/common/fs/zfs/vdev_queue.c +++ b/usr/src/uts/common/fs/zfs/vdev_queue.c @@ -25,7 +25,7 @@ */ /* - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] */ @@ -545,7 +545,7 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) /* * Walk backwards through sufficiently contiguous I/Os - * recording the last non-option I/O. + * recording the last non-optional I/O. */ while ((dio = AVL_PREV(t, first)) != NULL && (dio->io_flags & ZIO_FLAG_AGG_INHERIT) == flags && @@ -566,10 +566,14 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) /* * Walk forward through sufficiently contiguous I/Os. + * The aggregation limit does not apply to optional i/os, so that + * we can issue contiguous writes even if they are larger than the + * aggregation limit. */ while ((dio = AVL_NEXT(t, last)) != NULL && (dio->io_flags & ZIO_FLAG_AGG_INHERIT) == flags && - IO_SPAN(first, dio) <= zfs_vdev_aggregation_limit && + (IO_SPAN(first, dio) <= zfs_vdev_aggregation_limit || + (dio->io_flags & ZIO_FLAG_OPTIONAL)) && IO_GAP(last, dio) <= maxgap) { last = dio; if (!(last->io_flags & ZIO_FLAG_OPTIONAL)) @@ -600,10 +604,16 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) } if (stretch) { - /* This may be a no-op. */ + /* + * We are going to include an optional io in our aggregated + * span, thus closing the write gap. Only mandatory i/os can + * start aggregated spans, so make sure that the next i/o + * after our span is mandatory. + */ dio = AVL_NEXT(t, last); dio->io_flags &= ~ZIO_FLAG_OPTIONAL; } else { + /* do not include the optional i/o */ while (last != mandatory && last != first) { ASSERT(last->io_flags & ZIO_FLAG_OPTIONAL); last = AVL_PREV(t, last); @@ -615,7 +625,7 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) return (NULL); size = IO_SPAN(first, last); - ASSERT3U(size, <=, zfs_vdev_aggregation_limit); + ASSERT3U(size, <=, SPA_MAXBLOCKSIZE); aio = zio_vdev_delegated_io(first->io_vd, first->io_offset, abd_alloc_for_io(size, B_TRUE), size, first->io_type, diff --git a/usr/src/uts/common/inet/kssl/kssl.c b/usr/src/uts/common/inet/kssl/kssl.c index 0b5530d699..37d10c6f84 100644 --- a/usr/src/uts/common/inet/kssl/kssl.c +++ b/usr/src/uts/common/inet/kssl/kssl.c @@ -321,8 +321,8 @@ kssl_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *c, return (EFAULT); } error = kssl_add_entry(kssl_params); - if (auditing) - audit_kssl(KSSL_ADD_ENTRY, kssl_params, error); + if (auditing) + audit_kssl(KSSL_ADD_ENTRY, kssl_params, error); off = offsetof(kssl_params_t, kssl_token) + offsetof(kssl_tokinfo_t, ck_rv); ck_rv = kssl_params->kssl_token.ck_rv; @@ -342,8 +342,8 @@ kssl_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *c, } error = kssl_delete_entry(&server_addr); - if (auditing) - audit_kssl(KSSL_DELETE_ENTRY, &server_addr, error); + if (auditing) + audit_kssl(KSSL_DELETE_ENTRY, &server_addr, error); break; } } diff --git a/usr/src/uts/common/io/chxge/sge.c b/usr/src/uts/common/io/chxge/sge.c index d61b23712e..8d7ab572b3 100644 --- a/usr/src/uts/common/io/chxge/sge.c +++ b/usr/src/uts/common/io/chxge/sge.c @@ -30,8 +30,6 @@ * Copyright (C) 2003-2005 Chelsio Communications. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/param.h> #include <sys/cmn_err.h> @@ -237,11 +235,12 @@ t1_espi_workaround(ch_t *adapter) seop = t1_espi_get_mon(adapter, 0x930, 0); if ((seop & 0xfff0fff) == 0xfff) { /* after first arp */ - if (sge->pskb) + if (sge->pskb) { rv = pe_start(adapter, (mblk_t *)sge->pskb, CH_ARP); if (!rv) sge->intr_cnt.arp_sent++; + } } } #ifdef HOST_PAUSE @@ -301,7 +300,7 @@ uint32_t sge_cmdq_send_fail; int sge_data_out(pesge* sge, int qid, mblk_t *m0, - cmdQ_ce_t *cmp, int count, uint32_t flg) + cmdQ_ce_t *cmp, int count, uint32_t flg) { struct cmdQ *Q = &sge->cmdQ[qid]; ddi_dma_handle_t dh = (ddi_dma_handle_t)sge->cmdQ[qid].cq_dh; @@ -915,13 +914,12 @@ t1_sge_rx(pesge *sge, struct freelQ *Q, unsigned int len, unsigned int offload) if (likely(toe_running(adapter))) { /* sends pkt upstream to toe layer */ if (useit) { - if (sz == SGE_SM_BUF_SZ(adapter)) { - atomic_add(1, - &buffers_in_use[adapter->ch_sm_index]); - } else { - atomic_add(1, - &buffers_in_use[adapter->ch_big_index]); - } + uint_t index; + if (sz == SGE_SM_BUF_SZ(adapter)) + index = adapter->ch_sm_index; + else + index = adapter->ch_big_index; + atomic_add(1, &buffers_in_use[index]); } if (adapter->toe_rcv) adapter->toe_rcv(adapter->ch_toeinst, skb); diff --git a/usr/src/uts/common/io/fdc.c b/usr/src/uts/common/io/fdc.c index fdfc73a4fa..93400e7fdb 100644 --- a/usr/src/uts/common/io/fdc.c +++ b/usr/src/uts/common/io/fdc.c @@ -2088,7 +2088,7 @@ fdmotort(void *arg) if ((fcp->c_flags & FCFLG_WAITING) && fcp->c_mtrstate[unit] == FMS_ON && (csb->csb_xstate == FXS_MTRON || csb->csb_xstate == FXS_HDST || - csb->csb_xstate == FXS_DKCHGX)) + csb->csb_xstate == FXS_DKCHGX)) { newxstate = fdc_statemach(fcp); if (newxstate == -1) { FCERRPRINT(FDEP_L3, FDEM_EXEC, @@ -2101,6 +2101,7 @@ fdmotort(void *arg) fcp->c_flags ^= FCFLG_WAITING; cv_signal(&fcp->c_iocv); } + } mutex_exit(&fcp->c_lock); } |