diff options
-rw-r--r-- | sys/alpha/alpha/trap.c | 2 | ||||
-rw-r--r-- | sys/alpha/osf1/osf1_ioctl.c | 4 | ||||
-rw-r--r-- | sys/alpha/osf1/osf1_misc.c | 4 | ||||
-rw-r--r-- | sys/alpha/osf1/osf1_signal.c | 30 | ||||
-rw-r--r-- | sys/amd64/amd64/trap.c | 2 | ||||
-rw-r--r-- | sys/compat/linux/linux_socket.c | 2 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_fcntl.c | 6 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_ioctl.c | 2 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_ipc.c | 2 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_misc.c | 2 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_signal.c | 5 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_stat.c | 2 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_stream.c | 28 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_termios.c | 9 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_ttold.c | 24 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_util.h | 5 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_alloc.c | 2 | ||||
-rw-r--r-- | sys/i386/i386/trap.c | 2 | ||||
-rw-r--r-- | sys/i386/i386/vm86.c | 2 | ||||
-rw-r--r-- | sys/ia64/ia64/unaligned.c | 4 | ||||
-rw-r--r-- | sys/kern/imgact_elf.c | 6 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_alloc.c | 6 |
22 files changed, 12 insertions, 139 deletions
diff --git a/sys/alpha/alpha/trap.c b/sys/alpha/alpha/trap.c index 6a4f540..dc800ef 100644 --- a/sys/alpha/alpha/trap.c +++ b/sys/alpha/alpha/trap.c @@ -1046,14 +1046,12 @@ unaligned_fixup(va, opcode, reg, td) * If we're supposed to be noisy, squawk now. */ if (doprint) { - mtx_lock(&Giant); uprintf( "pid %d (%s): unaligned access: va=0x%lx pc=0x%lx ra=0x%lx op=", p->p_pid, p->p_comm, va, td->td_frame->tf_regs[FRAME_PC], td->td_frame->tf_regs[FRAME_RA]); uprintf(type,opcode); uprintf("\n"); - mtx_unlock(&Giant); } /* diff --git a/sys/alpha/osf1/osf1_ioctl.c b/sys/alpha/osf1/osf1_ioctl.c index c45646f..09d970d 100644 --- a/sys/alpha/osf1/osf1_ioctl.c +++ b/sys/alpha/osf1/osf1_ioctl.c @@ -33,8 +33,6 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> -#include <sys/lock.h> -#include <sys/mutex.h> #include <sys/systm.h> #include <sys/fcntl.h> #include <sys/filio.h> @@ -112,11 +110,9 @@ osf1_ioctl(td, uap) break; } #ifdef IOCTL_DEBUG - mtx_lock(&Giant); uprintf( "OSF/1 IOCTL: group = %c, cmd = %d, len = %d, dir = %s\n", group, cmd, len, dirstr); - mtx_unlock(&Giant); #endif a.fd = uap->fd; diff --git a/sys/alpha/osf1/osf1_misc.c b/sys/alpha/osf1/osf1_misc.c index eacf78a..63ce5ee 100644 --- a/sys/alpha/osf1/osf1_misc.c +++ b/sys/alpha/osf1/osf1_misc.c @@ -209,10 +209,8 @@ osf1_getsysinfo(td, uap) rpb_size = (unsigned long)&hwrpb->rpb_tbhint - (unsigned long)hwrpb; if(uap->nbytes < rpb_size){ - mtx_lock(&Giant); uprintf("nbytes = %ld, sizeof(struct rpb) = %ld\n", uap->nbytes, rpb_size); - mtx_unlock(&Giant); error = EINVAL; } else { @@ -256,9 +254,7 @@ osf1_setsysinfo(td, uap) break; } default: - mtx_lock(&Giant); uprintf("osf1_setsysinfo called with op=%ld\n", uap->op); - mtx_unlock(&Giant); /*error = EINVAL;*/ } return (error); diff --git a/sys/alpha/osf1/osf1_signal.c b/sys/alpha/osf1/osf1_signal.c index f275195..355cb1c 100644 --- a/sys/alpha/osf1/osf1_signal.c +++ b/sys/alpha/osf1/osf1_signal.c @@ -40,8 +40,6 @@ __FBSDID("$FreeBSD$"); #endif #include <sys/param.h> -#include <sys/lock.h> -#include <sys/mutex.h> #include <sys/systm.h> #include <sys/sysproto.h> #include <sys/signalvar.h> @@ -147,12 +145,9 @@ osf1_to_bsd_sigaction(osa, bsa) { bsa->sa_handler = osa->osa_handler; - if (osf1_sigdbg) { - mtx_lock(&Giant); + if (osf1_sigdbg) uprintf("%s(%d): handler @0x%lx \n", __FILE__, __LINE__, (unsigned long)osa->osa_handler); - mtx_unlock(&Giant); - } osf1_to_bsd_sigset(&osa->osa_mask, &bsa->sa_mask); bsa->sa_flags = 0; if ((osa->osa_flags & OSF1_SA_ONSTACK) != 0) @@ -230,12 +225,9 @@ osf1_sigaction(td, uap) struct sigaction *nbsap; int error; - if (osf1_sigdbg && uap->sigtramp) { - mtx_lock(&Giant); + if (osf1_sigdbg && uap->sigtramp) uprintf("osf1_sigaction: trampoline handler at %p\n", uap->sigtramp); - mtx_unlock(&Giant); - } td->td_md.osf_sigtramp = uap->sigtramp; if (uap->nsa != NULL) { if ((error = copyin(uap->nsa, &osa, sizeof(osa))) != 0) @@ -323,10 +315,8 @@ osf1_signal(td, uap) #endif error = kern_sigaction(td, signum, &nbsa, &obsa, 0); if (error != 0) { - mtx_lock(&Giant); DPRINTF("signal: sigaction failed: %d\n", error); - mtx_unlock(&Giant); td->td_retval[0] = -1; return (error); } @@ -362,11 +352,8 @@ osf1_signal(td, uap) SIGEMPTYSET(sa.sa_mask); sa.sa_flags = 0; error = kern_sigaction(td, signum, &sa, NULL, 0); - if (error != 0) { - mtx_lock(&Giant); + if (error != 0) DPRINTF(("sigignore: sigaction failed\n")); - mtx_unlock(&Giant); - } return (error); } @@ -557,11 +544,8 @@ osf1_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) /* * Set up the registers to return to sigcode. */ - if (osf1_sigdbg) { - mtx_lock(&Giant); + if (osf1_sigdbg) uprintf("attempting to call osf1 sigtramp\n"); - mtx_unlock(&Giant); - } frame->tf_regs[FRAME_PC] = (u_int64_t)td->td_md.osf_sigtramp; frame->tf_regs[FRAME_A0] = sig; frame->tf_regs[FRAME_A1] = code; @@ -643,9 +627,7 @@ osf1_osigstack(td, uap) } */ *uap; { -/* mtx_lock(&Giant); - uprintf("osf1_osigstack: oss = %p, nss = %p",uap->oss, uap->nss); - uprintf(" stack ptr = %p\n",p->p_sigacts->ps_sigstk.ss_sp); - mtx_unlock(&Giant); */ +/* uprintf("osf1_osigstack: oss = %p, nss = %p",uap->oss, uap->nss); + uprintf(" stack ptr = %p\n",p->p_sigacts->ps_sigstk.ss_sp);*/ return(osigstack(td, (struct osigstack_args *)uap)); } diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 7562b69..bb1d0ac 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -486,13 +486,11 @@ trap(frame) #ifdef DEBUG if (type <= MAX_TRAP_MSG) { - mtx_lock(&Giant); uprintf("fatal process exception: %s", trap_msg[type]); if ((type == T_PAGEFLT) || (type == T_PROTFLT)) uprintf(", fault VA = 0x%lx", frame.tf_addr); uprintf("\n"); - mtx_unlock(&Giant); } #endif diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index b5d7f2b..f1f26bc 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -1187,9 +1187,7 @@ linux_socketcall(struct thread *td, struct linux_socketcall_args *args) return (linux_recvmsg(td, arg)); } - mtx_lock(&Giant); uprintf("LINUX: 'socket' typ=%d not implemented\n", args->what); - mtx_unlock(&Giant); return (ENOSYS); } #endif /*!__alpha__*/ diff --git a/sys/compat/svr4/svr4_fcntl.c b/sys/compat/svr4/svr4_fcntl.c index 2107813..ad74838 100644 --- a/sys/compat/svr4/svr4_fcntl.c +++ b/sys/compat/svr4/svr4_fcntl.c @@ -377,10 +377,8 @@ svr4_sys_open(td, uap) free(newpath, M_TEMP); if (error) { - /* mtx_lock(&Giant); - uprintf("svr4_open(%s, 0x%0x, 0%o): %d\n", uap->path, - uap->flags, uap->mode, error); - mtx_unlock(&Giant);*/ + /* uprintf("svr4_open(%s, 0x%0x, 0%o): %d\n", uap->path, + uap->flags, uap->mode, error);*/ return error; } diff --git a/sys/compat/svr4/svr4_ioctl.c b/sys/compat/svr4/svr4_ioctl.c index ba8218f..b192a2c 100644 --- a/sys/compat/svr4/svr4_ioctl.c +++ b/sys/compat/svr4/svr4_ioctl.c @@ -30,8 +30,6 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> -#include <sys/lock.h> -#include <sys/mutex.h> #include <sys/proc.h> #include <sys/file.h> #include <sys/filedesc.h> diff --git a/sys/compat/svr4/svr4_ipc.c b/sys/compat/svr4/svr4_ipc.c index 976668c..0b6acbf 100644 --- a/sys/compat/svr4/svr4_ipc.c +++ b/sys/compat/svr4/svr4_ipc.c @@ -77,9 +77,7 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/ipc.h> -#include <sys/lock.h> #include <sys/msg.h> -#include <sys/mutex.h> #include <sys/proc.h> #include <sys/sem.h> #include <sys/shm.h> diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index 2b31765..d7a9069 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -485,9 +485,7 @@ again: panic("svr4_sys_getdents64: bad reclen"); off = *cookie++; /* each entry points to the next */ if ((off >> 32) != 0) { - mtx_lock(&Giant); uprintf("svr4_sys_getdents64: dir offset too large for emulated program"); - mtx_unlock(&Giant); error = EINVAL; goto out; } diff --git a/sys/compat/svr4/svr4_signal.c b/sys/compat/svr4/svr4_signal.c index 57023e9..c0a3a21 100644 --- a/sys/compat/svr4/svr4_signal.c +++ b/sys/compat/svr4/svr4_signal.c @@ -238,11 +238,8 @@ svr4_to_bsd_sigaltstack(sss, bss) bss->ss_flags |= SS_DISABLE; if ((sss->ss_flags & SVR4_SS_ONSTACK) != 0) bss->ss_flags |= SS_ONSTACK; - if ((sss->ss_flags & ~SVR4_SS_ALLBITS) != 0) { - mtx_lock(&Giant); + if ((sss->ss_flags & ~SVR4_SS_ALLBITS) != 0) /*XXX*/ uprintf("svr4_to_bsd_sigaltstack: extra bits ignored\n"); - mtx_unlock(&Giant); - } } void diff --git a/sys/compat/svr4/svr4_stat.c b/sys/compat/svr4/svr4_stat.c index 62bc223..d0f4d93 100644 --- a/sys/compat/svr4/svr4_stat.c +++ b/sys/compat/svr4/svr4_stat.c @@ -30,8 +30,6 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> -#include <sys/lock.h> -#include <sys/mutex.h> #include <sys/systm.h> #include <sys/proc.h> #include <sys/stat.h> diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c index a8153e9..bd6fa5a 100644 --- a/sys/compat/svr4/svr4_stream.c +++ b/sys/compat/svr4/svr4_stream.c @@ -378,8 +378,6 @@ bufprint(buf, len) { size_t i; - GIANT_REQUIRED; - uprintf("\n\t"); for (i = 0; i < len; i++) { uprintf("%x ", buf[i]); @@ -397,8 +395,6 @@ show_ioc(str, ioc) int len; int error; - GIANT_REQUIRED; - len = ioc->len; if (len > 1024) len = 1024; @@ -434,8 +430,6 @@ show_strbuf(str) int maxlen = str->maxlen; int len = str->len; - GIANT_REQUIRED; - if (maxlen > 8192) maxlen = 8192; @@ -479,8 +473,6 @@ show_msg(str, fd, ctl, dat, flags) struct svr4_strbuf buf; int error; - GIANT_REQUIRED; - uprintf("%s(%d", str, fd); if (ctl != NULL) { if ((error = copyin(ctl, &buf, sizeof(buf))) != 0) @@ -1415,12 +1407,8 @@ i_str(fp, td, retval, fd, cmd, dat) return error; #ifdef DEBUG_SVR4 - mtx_lock(&Giant); - if ((error = show_ioc(">", &ioc)) != 0) { - mtx_unlock(&Giant); + if ((error = show_ioc(">", &ioc)) != 0) return error; - } - mtx_unlock(&Giant); #endif /* DEBUG_SVR4 */ switch (ioc.cmd & 0xff00) { @@ -1441,12 +1429,8 @@ i_str(fp, td, retval, fd, cmd, dat) } #ifdef DEBUG_SVR4 - mtx_lock(&Giant); - if ((error = show_ioc("<", &ioc)) != 0) { - mtx_lock(&Giant); + if ((error = show_ioc("<", &ioc)) != 0) return error; - } - mtx_unlock(&Giant); #endif /* DEBUG_SVR4 */ return copyout(&ioc, dat, sizeof(ioc)); } @@ -1566,9 +1550,7 @@ svr4_stream_ioctl(fp, td, retval, fd, cmd, dat) case SVR4_I_PUSH: DPRINTF(("I_PUSH %p\n", dat)); #if defined(DEBUG_SVR4) - mtx_lock(&Giant); show_strbuf((struct svr4_strbuf *)dat); - mtx_unlock(&Giant); #endif return 0; @@ -1761,10 +1743,8 @@ svr4_do_putmsg(td, uap, fp) retval = td->td_retval; #ifdef DEBUG_SVR4 - mtx_lock(&Giant); show_msg(">putmsg", uap->fd, uap->ctl, uap->dat, uap->flags); - mtx_unlock(&Giant); #endif /* DEBUG_SVR4 */ FILE_LOCK_ASSERT(fp, MA_NOTOWNED); @@ -1960,10 +1940,8 @@ svr4_do_getmsg(td, uap, fp) memset(&sc, 0, sizeof(sc)); #ifdef DEBUG_SVR4 - mtx_lock(&Giant); show_msg(">getmsg", uap->fd, uap->ctl, uap->dat, 0); - mtx_unlock(&Giant); #endif /* DEBUG_SVR4 */ if (uap->ctl != NULL) { @@ -2271,10 +2249,8 @@ svr4_do_getmsg(td, uap, fp) *retval = 0; #ifdef DEBUG_SVR4 - mtx_lock(&Giant); show_msg("<getmsg", uap->fd, uap->ctl, uap->dat, fl); - mtx_unlock(&Giant); #endif /* DEBUG_SVR4 */ return error; } diff --git a/sys/compat/svr4/svr4_termios.c b/sys/compat/svr4/svr4_termios.c index b204929..37a6783 100644 --- a/sys/compat/svr4/svr4_termios.c +++ b/sys/compat/svr4/svr4_termios.c @@ -30,8 +30,6 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> -#include <sys/lock.h> -#include <sys/mutex.h> #include <sys/proc.h> #include <sys/systm.h> #include <sys/file.h> @@ -158,9 +156,6 @@ print_bsd_termios(bt) const struct termios *bt; { int i; - - GIANT_REQUIRED; - uprintf("BSD\niflag=%o oflag=%o cflag=%o lflag=%o\n", bt->c_iflag, bt->c_oflag, bt->c_cflag, bt->c_lflag); uprintf("cc: "); @@ -513,9 +508,7 @@ svr4_term_ioctl(fp, td, retval, fd, cmd, data) bsd_to_svr4_termios(&bt, &st); #ifdef DEBUG_SVR4 - mtx_lock(&Giant); print_bsd_termios(&bt); - mtx_unlock(&Giant); print_svr4_termios(&st); #endif /* DEBUG_SVR4 */ @@ -583,9 +576,7 @@ svr4_term_ioctl(fp, td, retval, fd, cmd, data) } #ifdef DEBUG_SVR4 - mtx_lock(&Giant); print_bsd_termios(&bt); - mtx_unlock(&Giant); print_svr4_termios(&st); #endif /* DEBUG_SVR4 */ diff --git a/sys/compat/svr4/svr4_ttold.c b/sys/compat/svr4/svr4_ttold.c index 537f88a..3575607 100644 --- a/sys/compat/svr4/svr4_ttold.c +++ b/sys/compat/svr4/svr4_ttold.c @@ -32,8 +32,6 @@ __FBSDID("$FreeBSD$"); #ifndef BURN_BRIDGES #include <sys/param.h> -#include <sys/lock.h> -#include <sys/mutex.h> #include <sys/proc.h> #include <sys/systm.h> #include <sys/file.h> @@ -71,8 +69,6 @@ print_svr4_sgttyb(str, ss) struct svr4_sgttyb *ss; { - GIANT_REQUIRED; - uprintf("%s\nispeed=%o ospeed=%o ", str, ss->sg_ispeed, ss->sg_ospeed); uprintf("erase=%o kill=%o flags=%o\n", ss->sg_erase, ss->sg_kill, ss->sg_flags); @@ -83,9 +79,6 @@ print_svr4_tchars(str, st) const char *str; struct svr4_tchars *st; { - - GIANT_REQUIRED; - uprintf("%s\nintrc=%o quitc=%o ", str, st->t_intrc, st->t_quitc); uprintf("startc=%o stopc=%o eofc=%o brkc=%o\n", st->t_startc, st->t_stopc, st->t_eofc, st->t_brkc); @@ -96,9 +89,6 @@ print_svr4_ltchars(str, sl) const char *str; struct svr4_ltchars *sl; { - - GIANT_REQUIRED; - uprintf("%s\nsuspc=%o dsuspc=%o ", str, sl->t_suspc, sl->t_dsuspc); uprintf("rprntc=%o flushc=%o werasc=%o lnextc=%o\n", sl->t_rprntc, sl->t_flushc, sl->t_werasc, sl->t_lnextc); @@ -241,9 +231,7 @@ svr4_ttold_ioctl(fp, td, retval, fd, cmd, data) return copyout(&pid, data, sizeof(pid)); #else - mtx_lock(&Giant); uprintf("ioctl(TIOCGSID) for pid %d unsupported\n", td->td_proc->p_pid); - mtx_unlock(&Giant); return EINVAL; #endif } @@ -260,9 +248,7 @@ svr4_ttold_ioctl(fp, td, retval, fd, cmd, data) bsd_sgttyb_to_svr4_sgttyb(&bs, &ss); #ifdef DEBUG_SVR4 - mtx_lock(&Giant); print_svr4_sgttyb("SVR4_TIOCGETP", &ss); - mtx_unlock(&Giant); #endif /* DEBUG_SVR4 */ return copyout(&ss, data, sizeof(ss)); } @@ -278,9 +264,7 @@ svr4_ttold_ioctl(fp, td, retval, fd, cmd, data) svr4_sgttyb_to_bsd_sgttyb(&ss, &bs); #ifdef DEBUG_SVR4 - mtx_lock(&Giant); print_svr4_sgttyb("SVR4_TIOCSET{P,N}", &ss); - mtx_unlock(&Giant); #endif /* DEBUG_SVR4 */ cmd = (cmd == SVR4_TIOCSETP) ? TIOCSETP : TIOCSETN; return fo_ioctl(fp, cmd, (caddr_t) &bs, @@ -299,9 +283,7 @@ svr4_ttold_ioctl(fp, td, retval, fd, cmd, data) bsd_tchars_to_svr4_tchars(&bt, &st); #ifdef DEBUG_SVR4 - mtx_lock(&Giant); print_svr4_tchars("SVR4_TIOCGETC", &st); - mtx_unlock(&Giant); #endif /* DEBUG_SVR4 */ return copyout(&st, data, sizeof(st)); } @@ -316,9 +298,7 @@ svr4_ttold_ioctl(fp, td, retval, fd, cmd, data) svr4_tchars_to_bsd_tchars(&st, &bt); #ifdef DEBUG_SVR4 - mtx_lock(&Giant); print_svr4_tchars("SVR4_TIOCSETC", &st); - mtx_unlock(&Giant); #endif /* DEBUG_SVR4 */ return fo_ioctl(fp, TIOCSETC, (caddr_t) &bt, td->td_ucred, td); @@ -336,9 +316,7 @@ svr4_ttold_ioctl(fp, td, retval, fd, cmd, data) bsd_ltchars_to_svr4_ltchars(&bl, &sl); #ifdef DEBUG_SVR4 - mtx_lock(&Giant); print_svr4_ltchars("SVR4_TIOCGLTC", &sl); - mtx_unlock(&Giant); #endif /* DEBUG_SVR4 */ return copyout(&sl, data, sizeof(sl)); } @@ -353,9 +331,7 @@ svr4_ttold_ioctl(fp, td, retval, fd, cmd, data) svr4_ltchars_to_bsd_ltchars(&sl, &bl); #ifdef DEBUG_SVR4 - mtx_lock(&Giant); print_svr4_ltchars("SVR4_TIOCSLTC", &sl); - mtx_unlock(&Giant); #endif /* DEBUG_SVR4 */ return fo_ioctl(fp, TIOCSLTC, (caddr_t) &bl, td->td_ucred, td); diff --git a/sys/compat/svr4/svr4_util.h b/sys/compat/svr4/svr4_util.h index 54ed430..66902dd 100644 --- a/sys/compat/svr4/svr4_util.h +++ b/sys/compat/svr4/svr4_util.h @@ -42,10 +42,7 @@ #include <sys/uio.h> #ifdef DEBUG_SVR4 -#define DPRINTF(a) do { \ - mtx_lock(&Giant); \ - uprintf a; \ -} while (0) +#define DPRINTF(a) uprintf a; #else #define DPRINTF(a) #endif diff --git a/sys/gnu/fs/ext2fs/ext2_alloc.c b/sys/gnu/fs/ext2fs/ext2_alloc.c index f2a2d36..8acfda8 100644 --- a/sys/gnu/fs/ext2fs/ext2_alloc.c +++ b/sys/gnu/fs/ext2fs/ext2_alloc.c @@ -165,7 +165,6 @@ ext2_alloc(ip, lbn, bpref, size, cred, bnp) } nospace: ext2_fserr(fs, cred->cr_uid, "file system full"); - GIANT_REQUIRED; /* uprintf */ uprintf("\n%s: write failed, file system is full\n", fs->fs_fsmnt); return (ENOSPC); } @@ -412,7 +411,6 @@ printf("ext2_valloc: allocated inode %d\n", ino); return (0); noinodes: ext2_fserr(fs, cred->cr_uid, "out of inodes"); - GIANT_REQUIRED; /* uprintf */ uprintf("\n%s: create/symlink failed, no inodes free\n", fs->fs_fsmnt); return (ENOSPC); } diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 95aeea3..1e5a346 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -648,13 +648,11 @@ trap(frame) #ifdef DEBUG if (type <= MAX_TRAP_MSG) { - mtx_lock(&Giant); uprintf("fatal process exception: %s", trap_msg[type]); if ((type == T_PAGEFLT) || (type == T_PROTFLT)) uprintf(", fault VA = 0x%lx", (u_long)eva); uprintf("\n"); - mtx_unlock(&Giant); } #endif diff --git a/sys/i386/i386/vm86.c b/sys/i386/i386/vm86.c index 28e7eb5..e22929b 100644 --- a/sys/i386/i386/vm86.c +++ b/sys/i386/i386/vm86.c @@ -193,9 +193,7 @@ vm86_emulate(vmf) vmf->vmf_eflags |= PSL_VIF; vmf->vmf_ip += inc_ip; if ((vmf->vmf_eflags & PSL_VIP) == 0) { - mtx_lock(&Giant); uprintf("fatal sti\n"); - mtx_unlock(&Giant); return (SIGKILL); } break; diff --git a/sys/ia64/ia64/unaligned.c b/sys/ia64/ia64/unaligned.c index c778e7a..2635a96 100644 --- a/sys/ia64/ia64/unaligned.c +++ b/sys/ia64/ia64/unaligned.c @@ -30,8 +30,6 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/lock.h> -#include <sys/mutex.h> #include <sys/proc.h> #include <sys/sysctl.h> #include <vm/vm.h> @@ -265,11 +263,9 @@ unaligned_fixup(struct trapframe *tf, struct thread *td) ((tf->tf_special.psr & IA64_PSR_RI) == IA64_PSR_RI_1) ? 1 : 2; if (ia64_unaligned_print) { - mtx_lock(&Giant); uprintf("pid %d (%s): unaligned access: va=0x%lx, pc=0x%lx\n", td->td_proc->p_pid, td->td_proc->p_comm, tf->tf_special.ifa, tf->tf_special.iip + slot); - mtx_unlock(&Giant); } /* diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 77ec406..b469898 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -380,9 +380,7 @@ __elfN(load_section)(struct proc *p, struct vmspace *vmspace, */ if ((off_t)filsz + offset > object->un_pager.vnp.vnp_size || filsz > memsz) { - mtx_lock(&Giant); uprintf("elf_load_section: truncated ELF file\n"); - mtx_unlock(&Giant); return (ENOEXEC); } @@ -700,10 +698,8 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) brand_info = __elfN(get_brandinfo)(hdr, interp); if (brand_info == NULL) { - mtx_lock(&Giant); uprintf("ELF binary type \"%u\" not known.\n", hdr->e_ident[EI_OSABI]); - mtx_unlock(&Giant); error = ENOEXEC; goto fail; } @@ -844,9 +840,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) error = __elfN(load_file)(imgp->proc, interp, &addr, &imgp->entry_addr, sv->sv_pagesize); if (error != 0) { - mtx_lock(&Giant); uprintf("ELF interpreter %s not found\n", interp); - mtx_unlock(&Giant); goto fail; } } diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 7317799..f5583a6 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -201,9 +201,7 @@ nospace: } UFS_UNLOCK(ump); ffs_fserr(fs, ip->i_number, "filesystem full"); - mtx_lock(&Giant); uprintf("\n%s: write failed, filesystem is full\n", fs->fs_fsmnt); - mtx_unlock(&Giant); return (ENOSPC); } @@ -401,9 +399,7 @@ nospace: if (bp) brelse(bp); ffs_fserr(fs, ip->i_number, "filesystem full"); - mtx_lock(&Giant); uprintf("\n%s: write failed, filesystem is full\n", fs->fs_fsmnt); - mtx_unlock(&Giant); return (ENOSPC); } @@ -958,9 +954,7 @@ ffs_valloc(pvp, mode, cred, vpp) noinodes: UFS_UNLOCK(ump); ffs_fserr(fs, pip->i_number, "out of inodes"); - mtx_lock(&Giant); uprintf("\n%s: create/symlink failed, no inodes free\n", fs->fs_fsmnt); - mtx_unlock(&Giant); return (ENOSPC); } |