diff options
-rw-r--r-- | share/man/man9/vrele.9 | 10 | ||||
-rw-r--r-- | sys/amd64/amd64/support.S | 1 | ||||
-rw-r--r-- | sys/dev/firewire/sbp_targ.c | 2 | ||||
-rw-r--r-- | sys/dev/ichsmb/ichsmb_pci.c | 16 | ||||
-rw-r--r-- | sys/dev/ixgbe/if_ix.c | 3 | ||||
-rw-r--r-- | sys/dev/pms/freebsd/driver/ini/src/osapi.c | 2 | ||||
-rw-r--r-- | sys/net/bpf.c | 32 | ||||
-rw-r--r-- | sys/netipsec/key.c | 3 | ||||
-rw-r--r-- | usr.bin/mail/def.h | 2 | ||||
-rw-r--r-- | usr.sbin/cron/cron/do_command.c | 5 | ||||
-rw-r--r-- | usr.sbin/cron/crontab/crontab.c | 2 |
11 files changed, 56 insertions, 22 deletions
diff --git a/share/man/man9/vrele.9 b/share/man/man9/vrele.9 index d29ca5b..1eae442 100644 --- a/share/man/man9/vrele.9 +++ b/share/man/man9/vrele.9 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2010 +.Dd February 24, 2016 .Dt VRELE 9 .Os .Sh NAME @@ -81,9 +81,11 @@ If the .Va v_usecount field of the non-doomed vnode reaches zero, then it will be inactivated and placed on the free list. -Since the functions might need to call VOPs for the vnode, the -.Va Giant -mutex should be conditionally locked around the call. +.Pp +The +.Fn vrele +function may lock the vnode. +All three functions may sleep. .Pp The hold count for the vnode is always greater or equal to the usecount. Non-forced unmount fails when mount point owns a vnode that has non-zero diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index f8b75ff..bc23e90 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -152,6 +152,7 @@ END(bcopy) */ ENTRY(memcpy) PUSH_FRAME_POINTER + movq %rdi,%rax movq %rdx,%rcx shrq $3,%rcx /* copy by 64-bit words */ cld /* copy forwards */ diff --git a/sys/dev/firewire/sbp_targ.c b/sys/dev/firewire/sbp_targ.c index 8026b79..9e0f691 100644 --- a/sys/dev/firewire/sbp_targ.c +++ b/sys/dev/firewire/sbp_targ.c @@ -1327,7 +1327,7 @@ sbp_targ_action1(struct cam_sim *sim, union ccb *ccb) | PIT_DISCONNECT | PIT_TERM_IO; cpi->transport = XPORT_SPI; /* FIXME add XPORT_FW type to cam */ - cpi->hba_misc = PIM_NOBUSRESET | PIM_NOBUSRESET; + cpi->hba_misc = PIM_NOBUSRESET | PIM_NO_6_BYTE; cpi->hba_eng_cnt = 0; cpi->max_target = 7; /* XXX */ cpi->max_lun = MAX_LUN - 1; diff --git a/sys/dev/ichsmb/ichsmb_pci.c b/sys/dev/ichsmb/ichsmb_pci.c index 5c1ef54..fc8024a 100644 --- a/sys/dev/ichsmb/ichsmb_pci.c +++ b/sys/dev/ichsmb/ichsmb_pci.c @@ -5,7 +5,7 @@ * Copyright (c) 2000 Whistle Communications, Inc. * All rights reserved. * Author: Archie Cobbs <archie@freebsd.org> - * + * * Subject to the following obligations and disclaimer of warranty, use and * redistribution of this software, in source or object code forms, with or * without modifications are expressly permitted by Whistle Communications; @@ -16,7 +16,7 @@ * Communications, Inc. trademarks, including the mark "WHISTLE * COMMUNICATIONS" on advertising, endorsements, or otherwise except as * such appears in the above copyright notice or in the software. - * + * * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, @@ -88,8 +88,11 @@ __FBSDID("$FreeBSD$"); #define ID_AVOTON 0x1f3c8086 #define ID_COLETOCRK 0x23B08086 #define ID_LPT 0x8c228086 +#define ID_LPTLP 0x9c228086 #define ID_WCPT 0x8ca28086 #define ID_WCPTLP 0x9ca28086 +#define ID_WELLSBURG 0x8d228086 +#define ID_SRPT 0xa1238086 #define PCIS_SERIALBUS_SMBUS_PROGIF 0x00 @@ -199,6 +202,9 @@ ichsmb_pci_probe(device_t dev) case ID_LPT: device_set_desc(dev, "Intel Lynx Point SMBus controller"); break; + case ID_LPTLP: + device_set_desc(dev, "Intel Lynx Point-LP SMBus controller"); + break; case ID_WCPT: device_set_desc(dev, "Intel Wildcat Point SMBus controller"); break; @@ -208,6 +214,12 @@ ichsmb_pci_probe(device_t dev) case ID_COLETOCRK: device_set_desc(dev, "Intel Coleto Creek SMBus controller"); break; + case ID_WELLSBURG: + device_set_desc(dev, "Intel Wellsburg SMBus controller"); + break; + case ID_SRPT: + device_set_desc(dev, "Intel Sunrise Point-H SMBus controller"); + break; default: return (ENXIO); } diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index d72833d..43ace37 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -315,7 +315,8 @@ SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix, CTLFLAG_RDTUN, &ixgbe_enable_msix, 0, */ static int ixgbe_num_queues = 0; SYSCTL_INT(_hw_ix, OID_AUTO, num_queues, CTLFLAG_RDTUN, &ixgbe_num_queues, 0, - "Number of queues to configure, 0 indicates autoconfigure"); + "Number of queues to configure up to a maximum of 8," + "0 indicates autoconfigure"); /* ** Number of TX descriptors per ring, diff --git a/sys/dev/pms/freebsd/driver/ini/src/osapi.c b/sys/dev/pms/freebsd/driver/ini/src/osapi.c index e47bf7c..f461923 100644 --- a/sys/dev/pms/freebsd/driver/ini/src/osapi.c +++ b/sys/dev/pms/freebsd/driver/ini/src/osapi.c @@ -313,7 +313,7 @@ ostiInitiatorIOCompleted(tiRoot_t *ptiRoot, } sense_len = MIN( pSenseData->senseLen, pccb->senseLen - csio->sense_resid ); - bzero(&csio->sense_data, sizeof(&csio->sense_data)); + bzero(&csio->sense_data, sizeof(csio->sense_data)); AGTIAPI_PRINTK("ostiInitiatorIOCompleted: check condition copying\n"); memcpy( (void *)pccb->pSenseData, pSenseData->senseData, diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 15ab5aa..c40e29f 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -2616,26 +2616,44 @@ bpf_ifdetach(void *arg __unused, struct ifnet *ifp) static int bpf_getdltlist(struct bpf_d *d, struct bpf_dltlist *bfl) { - int n, error; struct ifnet *ifp; struct bpf_if *bp; + u_int *lst; + int error, n, n1; BPF_LOCK_ASSERT(); ifp = d->bd_bif->bif_ifp; +again: + n1 = 0; + LIST_FOREACH(bp, &bpf_iflist, bif_next) { + if (bp->bif_ifp == ifp) + n1++; + } + if (bfl->bfl_list == NULL) { + bfl->bfl_len = n1; + return (0); + } + if (n1 > bfl->bfl_len) + return (ENOMEM); + BPF_UNLOCK(); + lst = malloc(n1 * sizeof(u_int), M_TEMP, M_WAITOK); n = 0; - error = 0; + BPF_LOCK(); LIST_FOREACH(bp, &bpf_iflist, bif_next) { if (bp->bif_ifp != ifp) continue; - if (bfl->bfl_list != NULL) { - if (n >= bfl->bfl_len) - return (ENOMEM); - error = copyout(&bp->bif_dlt, - bfl->bfl_list + n, sizeof(u_int)); + if (n > n1) { + free(lst, M_TEMP); + goto again; } + lst[n] = bp->bif_dlt; n++; } + BPF_UNLOCK(); + error = copyout(lst, bfl->bfl_list, sizeof(u_int) * n); + free(lst, M_TEMP); + BPF_LOCK(); bfl->bfl_len = n; return (error); } diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index 7705a63..2920fbb 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -7180,8 +7180,7 @@ key_parse(struct mbuf *m, struct socket *so) orglen = PFKEY_UNUNIT64(msg->sadb_msg_len); target = KEY_SENDUP_ONE; - if ((m->m_flags & M_PKTHDR) == 0 || - m->m_pkthdr.len != m->m_pkthdr.len) { + if ((m->m_flags & M_PKTHDR) == 0 || m->m_pkthdr.len != orglen) { ipseclog((LOG_DEBUG, "%s: invalid message length.\n",__func__)); PFKEYSTAT_INC(out_invlen); error = EINVAL; diff --git a/usr.bin/mail/def.h b/usr.bin/mail/def.h index e935c16..e637252 100644 --- a/usr.bin/mail/def.h +++ b/usr.bin/mail/def.h @@ -270,5 +270,5 @@ struct ignoretab { */ #define trunc(stream) { \ (void)fflush(stream); \ - (void)ftruncate(fileno(stream), (off_t)ftell(stream)); \ + (void)ftruncate(fileno(stream), ftello(stream)); \ } diff --git a/usr.sbin/cron/cron/do_command.c b/usr.sbin/cron/cron/do_command.c index 1ad8395..7a8d48a 100644 --- a/usr.sbin/cron/cron/do_command.c +++ b/usr.sbin/cron/cron/do_command.c @@ -337,8 +337,9 @@ child_process(e, u) _exit(OK_EXIT); } # endif /*DEBUGGING*/ - execle(shell, shell, "-c", e->cmd, (char *)0, e->envp); - warn("execl: couldn't exec `%s'", shell); + execle(shell, shell, "-c", e->cmd, (char *)NULL, + e->envp); + warn("execle: couldn't exec `%s'", shell); _exit(ERROR_EXIT); } break; diff --git a/usr.sbin/cron/crontab/crontab.c b/usr.sbin/cron/crontab/crontab.c index f2e97a7..2608be7 100644 --- a/usr.sbin/cron/crontab/crontab.c +++ b/usr.sbin/cron/crontab/crontab.c @@ -532,7 +532,7 @@ replace_cmd() { Set_LineNum(1) while (EOF != (ch = get_char(NewCrontab))) putc(ch, tmp); - ftruncate(fileno(tmp), ftell(tmp)); + ftruncate(fileno(tmp), ftello(tmp)); fflush(tmp); rewind(tmp); if (ferror(tmp)) { |