Deleted Added
full compact
kern_ktrace.c (102112) kern_ktrace.c (102129)
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)kern_ktrace.c 8.2 (Berkeley) 9/23/93
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)kern_ktrace.c 8.2 (Berkeley) 9/23/93
34 * $FreeBSD: head/sys/kern/kern_ktrace.c 102112 2002-08-19 16:43:25Z rwatson $
34 * $FreeBSD: head/sys/kern/kern_ktrace.c 102129 2002-08-19 19:04:53Z rwatson $
35 */
36
37#include "opt_ktrace.h"
38#include "opt_mac.h"
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/fcntl.h>

--- 723 unchanged lines hidden (view full) ---

766 ("ktrace: uio and genio mismatch"));
767 if (uio != NULL)
768 kth->ktr_len += uio->uio_resid;
769 mtx_lock(&Giant);
770 vn_start_write(vp, &mp, V_WAIT);
771 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
772 (void)VOP_LEASE(vp, td, cred, LEASE_WRITE);
773#ifdef MAC
35 */
36
37#include "opt_ktrace.h"
38#include "opt_mac.h"
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/fcntl.h>

--- 723 unchanged lines hidden (view full) ---

766 ("ktrace: uio and genio mismatch"));
767 if (uio != NULL)
768 kth->ktr_len += uio->uio_resid;
769 mtx_lock(&Giant);
770 vn_start_write(vp, &mp, V_WAIT);
771 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
772 (void)VOP_LEASE(vp, td, cred, LEASE_WRITE);
773#ifdef MAC
774 error = mac_check_vnode_write(cred, vp);
774 error = mac_check_vnode_write(cred, NOCRED, vp);
775 if (error == 0)
776#endif
777 error = VOP_WRITE(vp, &auio, IO_UNIT | IO_APPEND, cred);
778 if (error == 0 && uio != NULL) {
779 (void)VOP_LEASE(vp, td, cred, LEASE_WRITE);
780 error = VOP_WRITE(vp, uio, IO_UNIT | IO_APPEND, cred);
781 }
782 VOP_UNLOCK(vp, 0, td);

--- 76 unchanged lines hidden ---
775 if (error == 0)
776#endif
777 error = VOP_WRITE(vp, &auio, IO_UNIT | IO_APPEND, cred);
778 if (error == 0 && uio != NULL) {
779 (void)VOP_LEASE(vp, td, cred, LEASE_WRITE);
780 error = VOP_WRITE(vp, uio, IO_UNIT | IO_APPEND, cred);
781 }
782 VOP_UNLOCK(vp, 0, td);

--- 76 unchanged lines hidden ---