Remove DFLAG_SEEKABLE from fifo file descriptors: fifos are not seekable
according to POSIX, not to mention the fact that it doesn't make sense
(and hence isn't really implemented). This causes the fifo_misc
regression test to succeed.
Approved by: re (scottl)
Only poll the fifo for read events if the fifo is attached to a readable
file descriptor. Otherwise, the read end of a fifo might return that it
is writable (which it isn't).
Only poll the fifo for write events if the fifo attached to a writable
file descriptor. Otherwise, the write end of a fifo might return that
it is readable (which it isn't).
In the event that a file is FREAD|FWRITE (which is allowed by POSIX, but
has undefined behavior), we poll for both.
Approved by: re (kensmith)
After going to some trouble to identify only the write-related events
to poll the write socket for, the fifo polling code proceeded to poll
for the complete set of events. Use 'levents' instead of 'events' as
the argument to poll, and only poll the write socket if there is
interest in write events.
Approved by: re (kensmith)
Add an assertion that fifo_open() doesn't race against other threads
while sleeping to allocate fifo state: due to using the vnode lock to
serialize access to a fifo during open, it shouldn't happen (tm).
Approved by: re (kensmith)
Rather than reaching into the internals of the UNIX domain socket code
by calling uipc_connect2() to connect two socket endpoints to create a
fifo, call soconnect2().
Approved by: re (kensmith)
``Process one NMI interrupt per handler invocation as the processor
buffers pending NMIs from multiple interrupting PMCs and delivers
them serially.''
Approved by: re (kensmith)
When bge_stop() is called from bge_detach(), mii is already NULL, so check
before trying to use it.
This fix allows to 'kldunload if_bge' without panicing.
Reviewed by: bz
Approved by: re (scottl)
- Allow for VLAN-sized frames and set IFCAP_VLAN_MTU.
- On resume all registers have to be initialized again like after
power-on so reset sc_inited in gem_suspend() in order get all of
the registers set next time gem_init_regs() is called.
- On at least some ERI and GEM revisions GEM_MAC_RX_OVERFLOW happen
often due to a silicon bug and re-initializing is all we can do
about these errors so make handling them non-verbose.
- Remove a superfluous memset(3) call in gem_meminit(), all elements
are initialized to 0 anyway.
Approved by: re (scottl)
When padding with zero, do pad after prefixes rather than padding
before prefixes.
Use cases:
printf("%05d", -42); --> "00-42" (should be "-0042")
printf("%#05x", 12); --> "000xc" (should be "0x00c")
Submitted by: Oliver Fromme
PR: kern/85520
Approved by: re (kensmith)
nd6.c, r1.55; nd6_nbr.c, r1.33
> Add support for multicast to the bridge and allow inet6 addresses to be
> assigned to the interface.
>
> IPv6 auto-configuration is disabled. An IPv6 link-local address has a
> link-local scope within one link, the spec is unclear for the bridge case and
> it may cause scope violation.
>
> An address can be assigned in the usual way;
> ifconfig bridge0 inet6 xxxx:...
>
> Tested by: bmah
> Reviewed by: ume (netinet6)
> Approved by: mlaier (mentor)
Approved by: re (kensmith), mlaier (mentor)
- Do not hold route entry lock, when calling arprequest(). One such
call was introduced by me in 1.139, the other one was present before.
- Do all manipulations with rtentry and la before dropping the lock.
- Copy interface address from route into local variable before dropping
the lock. Supply this copy as argument to arprequest().
(LOR Ids in original commit message.)
Approved by: re (scottl)
Fix boot-time hang/panic on G3 systems when modifying IBAT0 in
pmap_bootstrap by using the sync;isync big hammer to make sure
all prior operations have completed.
Reported by: Nathan Whitehorn <nathan at uchicago edu>
Approved by: re (Ken Smith)
Fix an item leak, that happens when some node calls ng_callout() two
times consequently, without checking whether callout has been serviced
or not. (ng_pptpgre and ng_ppp were catched in this behavior).
- In ng_callout() save old item before calling callout_reset(). If the
latter has returned 1, then free this item.
- In ng_uncallout() clear c->c_arg.
Problem reported by: Alexandre Kardanev
Approved by: re (kensmith)
Make callout_reset() return a non-zero value if a pending callout
was rescheduled. If there was no pending callout, then return 0.
Reviewed by: iedowse, cperciva
Approved by: re (kensmith)
When a carp(4) interface is being destroyed and is in a promiscous mode,
first interface is detached from parent and then bpfdetach() is called.
If the interface was the last carp(4) interface attached to parent, then
the mutex on parent is destroyed. When bpfdetach() calls if_setflags()
we panic on destroyed mutex.
To prevent the above scenario, clear pointer to parent, when we detach
ourselves from parent.
Approved by: re (kensmith)
pf_ioctl.c Revision 1.153 Sun Aug 7 11:37:33 2005 UTC by dhartmei
| verify ticket in DIOCADDADDR, from Boris Polevoy, ok deraadt@
pf_ioctl.c Revision 1.158 Mon Sep 5 14:51:08 2005 UTC by dhartmei
| in DIOCCHANGERULE, properly initialize table, if used in NAT rule.
| from Boris Polevoy <vapcom at mail dot ru>, ok mcbride@
pf.c Revision 1.502 Mon Aug 22 11:54:25 2005 UTC by dhartmei
| when nat'ing icmp 'connections', replace icmp id with proxy values
| (similar to proxy ports for tcp/udp). not all clients use
| per-invokation random ids, this allows multiple concurrent
| connections from such clients.
| thanks for testing to Rod Whitworth, "looks ok" markus@
pf.c Revision 1.501 Mon Aug 22 09:48:05 2005 UTC by dhartmei
| fix rdr to bitmask replacement address pool. patch from Max Laier,
| reported by Boris Polevoy, tested by Jean Debogue, ok henning@
Approved by: re (scottl)
The number of raid controllers that violate the WHQL seems to be
growing in number and not isolated to old versions as previously
thought. Though the numbers of these seen in the wild is still
relatively small, they hang the system when parts of their devices are
powered down. The one area that these parts appear often are in the
higher end servers. As such, be conservative about powering down
devices that have no driver attached by default. Until a better
approach is proven in current, this is the prudent choice.
Laptop users wishing the benefits of powering down devices with no
drivers will now need to set hw.pci.do_powerstate=1 in their
/boot/loader.conf file. Some users will have devices that will
prevent this setting (hence the need to make it default 0).
Approved by: re@ (scottl)
src/sys/kern/kern_shutdown.c 1.175
src/sys/sys/buf.h 1.189
Modified files:
sys/gnu/fs/ext2fs fs.h
sys/kern kern_shutdown.c
sys/sys buf.h
Log:
Add a new struct buf flag bit, B_PERSISTENT, and use it to tag
struct bufs that are persistently held by ext2fs. Ignore any buffers
with this flag in the code in boot() that counts "busy" and dirty
buffers and attempts to sync the dirty buffers, which is done before
attempting to unmount all the file systems during shutdown.
This fixes the problem caused by any ext2fs file systems that are
mounted at system shutdown time, which caused boot() to give up on
a non-zero number of buffers and skip the call to vfs_unmountall().
This left all the mounted file systems in a dirty state and caused
them to all require cleanup by fsck on reboot.
Move the two separate copies of the "busy" buffer test in boot()
to a separate function.
Nuke the useless spl() stuff in the ext2fs ULCK_BUF() macro.
Bring the PRINT_BUF_FLAGS definition in sys/buf.h up to date with
this and previous flag changes.
PR: kern/56675, kern/85163
Tested by: "Matthias Andree" matthias.andree at gmx.de
Reviewed by: bde
MFC after: 3 days
PR: kern/56675, kern/85163
Tested by: "Hanspeter Roth" hampi at rootshell.be
Tested by: "Matthias Andree" matthias.andree at gmx.de
Reviewed by: bde
Approved by: re (scottl)
- in ng_ksocket_incoming2() clear m_nextpkt on all mbufs
read from socket.
- restore rev. 1.54 change in ng_ksocket_incoming().
PR: kern/84952
PR: kern/82413
In collaboration with: rwatson
Approved by: re (scottl)
Raise one more bit in READER_MASK. I believe that before this change
it was possible to have 1 reader and 1 writer thread working on
a node simultaneously.
Reviewed by: julian
Approved by: re (scottl)
Use non-debug macros inside debugging functions, to prevent
important information from being rewritten.
In INVARIANTS case also check that nodes do not pass queues of mbufs
each other.
Approved by: re (scottl)
scmouse.c, 1.39: In set_mouse_pos(), try to avoid division by zero errors.
scvidctl.c, 1.36:
In sc_set_text_mode(), reset fontwidth if it is <= 0.
Eliminates division by zero errors in syscons driver.
Approved by: re (scottl)
Don't free a struct inodedep if another process is allocating saved
inode memory for the same struct inodedep in
initiate_write_inodeblock_ufs[12]().
Handle disappearing dependencies in softdep_disk_io_initiation().
Approved by: re (scottl)
o ic_curchan
o beacon/listen interval split
o split tx+rx crypto key and h/w key index -> node mapping support
Also for ath:
o correct duration calculation when protection is enabled
Also for wi:
o handle all-zero mac address properly
o fix media status handling so devd recognizes cards on insert
Also for ipw/iwi:
o always include statistics sysctls (was only when compiled w/ debugging)
o honor manual roaming setting
Also for ral/ural:
o fix basic rate set
o fix IFS parameters
o honor operating mode when selecting ack rate
o honor manual roaming setting
Approved by: re (scottl)
o add ic_curchan to resolve issues with what the "current channel" is
o split beacon and listen interval
o fixup mac acl support so you can query state
o split h/w tx+rx key indices in crypto state
o add optional h/w key index -> node mapping
o change default key index allocator to DTRT for legacy parts
that are WPA capable
o define typedef for a h/w key index
o fix race on node refcnt handling with sending probe response frames
o isolate scanning-related input handling to reduce diffs against
future scanning code
o sanity check beacon interval in recv'd management frames and
discard frames with out-of-range data
o fix refcnt race sending null data frames
o lock ioctl to get sta info
o fix misc races in ap mode sta state teardown
Approved by: re (scottl)
Fix a typo in vop_rename_pre() where we ended up using vholdl()
instead of vhold(), even though the vnode interlock is unlocked.
Approved by: re (scottl)