Commit Graph

154147 Commits

Author SHA1 Message Date
dyoung
dcabc5c2e5 Make code concise by removing uninformative #ifdef's. 2006-12-04 03:02:48 +00:00
dyoung
9534d9db92 Indent these macros for readability. People have to read this
code, too.
2006-12-04 02:59:35 +00:00
dyoung
1b9b487578 Lightly constify. Helps compile-time checking that we are not
scribbling over shared or read-only memory---e.g., in mbufs.
2006-12-04 02:58:06 +00:00
dyoung
a291eaf06c KNF. 2006-12-04 02:53:17 +00:00
dyoung
a2ab81c489 Change date to reflect today's change.
Try to get groff -mdoc to stop inserting extraneous linebreaks---no
luck!
2006-12-04 02:51:07 +00:00
dyoung
627864e36f Per discussion on tech-net@, discard the address-munging hack that
let one create a tunnel with equal inner and outer destination IP
numbers.  Update gre(4) documentation for this change.

Extract subroutine  gre_update_route() from gre_compute_route(),
and always call it in gre_output() to freshen the route for
tunnel-encapsulated packets.
2006-12-04 02:40:15 +00:00
dyoung
fdab81c3b0 No need for a struct route_in6 in pf_route6(). Replace it with a
sockaddr_in6.

In pf_calc_mss(), factor common code out of PF_INET and PF_INET6
switch cases.
2006-12-04 02:28:12 +00:00
dyoung
31730224f4 In gre_clone_destroy,
1 use splnet() to synchronize gre clone destruction with interrupts,
  and
2 wait to call if_detach() until after joining the gre kernel
  thread.
2006-12-04 01:49:47 +00:00
dyoung
e45f67b8b4 Extract subroutines rn_walkfirst() and rn_walknext() from rn_walktree().
No functional change intended.

Add some new diagnostic code, bracketed by #ifdef RN_DEBUG, that
uses the two new subroutines to walk and print a tree.

XXX The format of the diagnostic print-outs needs improvement.
2006-12-04 01:45:50 +00:00
dyoung
add8c1de7f Add rtw at pci to the GENERIC kernel. 2006-12-04 01:32:37 +00:00
dyoung
571fae988f Compile gre(4) into the GENERIC kernel. 2006-12-04 01:30:56 +00:00
dyoung
7e5a475027 Replace the temporary variable ndst with rt_key(rt). This will
simplify the application of RADIX_MPATH patches.

No functional change intended.
2006-12-04 00:56:44 +00:00
dyoung
8a5a3d2d66 Paranoid protection against use after free: in rtfree(), set rt_ifa
and rt_ifp to NULL.
2006-12-04 00:52:47 +00:00
dyoung
b0520122af Cosmetic: remove extra empty line. 2006-12-04 00:48:59 +00:00
pavel
9b8e4189e5 Restore compatibility of USB_DEVICEINFO ioctl and reads from /dev/usb with
NetBSD 3.x. Patch from Stephan Thesing provided in
http://mail-index.netbsd.org/current-users/2006/03/21/0002.html, with some
modifications by me.
See also
http://mail-index.netbsd.org/current-users/2006/08/29/0017.html

The code is conditionally compiled depending on COMPAT_30.

Also fix a leak of struct usb_event in usbread() introduced while converting
on-stack variables to dynamic allocation.

Reviewed by martin@.
2006-12-03 22:34:58 +00:00
dyoung
c8485f3e10 Remove superfluous parentheses. 2006-12-03 21:56:30 +00:00
dsl
8416a0f46b Unknot this code slightly by avoiding 'break/return; else' and by putting
the short parts of some conditionals first.
First step towards speeding up the parsing of makefiles (esp. the unwanted
parts of .if clauses).
There should be no changes to the logic.
2006-12-03 20:40:44 +00:00
dsl
8b27f0807d Some minor changes:
- Only test 'printVars' once.
  Has side effect of not trying to find the 'main' target for '-V varname'.
- Only reap the single child process in Cmd_Exec(),
  I think this is for 'xx != cmd' so probobably no other children should exist.
- Don't read and parse .depend if '-r' and '-V varname' are set.
  I suspect that .depend shouldn't affect the output of any -V command...
2006-12-03 20:37:39 +00:00
dyoung
626b8f05e2 Fix spelling, s/straglers/stragglers/. 2006-12-03 19:17:41 +00:00
dsl
66a1a1560d Add -DUNALIGNED_ACCESS here, libsa/dosfs.c seems to need it.
Probably it ought to come from some generic .h file, but I've no idea
which - nor if any existing define has the same effect.
In any case this saves oodles of bytes in bootxx_msdos.
2006-12-03 19:14:08 +00:00
christos
fd2ea8ece6 kill statck protector warning completely because more files use alloca than
then ones that don't.
2006-12-03 18:17:36 +00:00
christos
1ef246e307 Fix SSP build for the poor archs that have not converted yet. 2006-12-03 18:13:23 +00:00
christos
1194ba0741 Document the new threading etc. features. From Anon Ymous. 2006-12-03 18:09:09 +00:00
tnozaki
787d7a82ef update CP942 iconv data - don't share Unicode mapping table with JISX0208:1978. 2006-12-03 14:28:46 +00:00
elad
8a806df7dc Move kauth(9) call to where it belongs. Noticed by Nicolas Joly, thanks! 2006-12-03 13:24:10 +00:00
tnozaki
da493f6484 - correct JISX0208:1978 <-> Unicode mappings.
- gives priority to JISX0212 more than JISX0208:1978.
2006-12-03 12:02:05 +00:00
wiz
11b2ef8137 Remove a troff command that added some empty lines to the man(1) output. 2006-12-03 11:35:07 +00:00
tsutsui
535e9512ea Rename pccons(4) device node from ttyC0 to MI ttyv0
to avoid conflict with com(4).
2006-12-03 05:37:36 +00:00
tsutsui
32402b1bfe Remove an invalid (and nonexistent) .Xr usage. 2006-12-03 05:28:33 +00:00
macallan
5d88b0aa20 make /dev/openfirm work in GENERIC again 2006-12-03 04:13:55 +00:00
tsutsui
b0f03bc527 - pull the following fix from FreeBSD's rgephy.c rev 1.14:
> - Don't set MIIF_NOISOLATE so rgephy(4) can be used in configurations
  >   with multiple PHYs and un-comment case IFM_NONE in case MII_MEDIACHG
  >   rgephy_service(). There doesn't seem to be a problem with isolating
  >   RTL8169S and their internal PHY.
  and rev 1.12:
  > - Fix some spelling in comments.
  > - Remove superfluous returns at the end of void functions.
  > - Remove unused static global rgephy_mii_model.
- remove #ifdef'ed out code whcih has also been removed in FreeBSD
- some style cosmetics
2006-12-03 03:16:48 +00:00
yamt
7c9ade2fc1 yamt-splraiseipl: dreamcast, pmppc. 2006-12-03 02:24:33 +00:00
tls
53786c9e89 Add arch/xen/i386/gdt.c to list of kernel files that do variable-size
allocations on the stack.  This allocation could potentially be quite
large -- I am not sure how to best fix that.

Fixes USE_SSP i386 build.sh failure.
2006-12-03 01:45:57 +00:00
christos
9f409e218e eliminate an alloca use. 2006-12-03 01:18:34 +00:00
christos
8b3eb79f93 PR/35170: Guy Harris: confstr() should return 0, not -1, on errors 2006-12-03 00:39:19 +00:00
freza
b9d66ca8f1 Mention evbppc/virtex. 2006-12-02 22:37:38 +00:00
yamt
04ce9348ed yamt-splraiseipl: mipsco, mvmeppc, ofppc. 2006-12-02 22:31:05 +00:00
freza
e388b581bd Welcome to evbppc/virtex -- port to Xilinx Virtex series FPGA's with embedded
ibm405d5 core.

OK by Simon Burge
2006-12-02 22:18:47 +00:00
dyoung
7b85ed030b In if_rt_walktree(), make absolutely certain not to leave a dangling
pointer, rt_ifp, from an rtentry to an interface that we are going
to destroy.
2006-12-02 20:48:13 +00:00
dyoung
8068916447 Synchronize access to the ifaddr list by in6_update_ifa() and
in6_control() with splnet()/splx().  I was being a bit paranoid
here.  Following a cursory analysis of the code, this still looked
necessary.  We don't spend a lot of time in these calls, so it
should not be too harmful to suspend network interrupts.

In in6_unlink_ifa(), call in6_delmulti() just once on each multicast
address (in6_multi).  Previously, in6_unlink_ifa() called in6_delmulti()
on each in6_multi until in6_delmulti() removed the in6_multi from
the list and freed its memory.  That's not justified: the multicast
list holds *one* reference.  All other references belong to other
entities.  We must wait to free the memory until the other entities
release their references, to protect against dereferencing a freed
in6_multi.

XXX I need to revisit in6_delmulti(), in6_unlink_ifa(), and friends,
XXX to pry apart the conditions where an in6_multi is removed from
XXX its list and where it is freed.  Following my change, above,
XXX we still risk dereferencing a freed in6_multi.

Prevent in6_update_ifa() and in6_addremloop() from creating dangling
pointers to interfaces in the routing table.  Previously, my NetBSD
tunnel concentrator, which adds and deletes a lot of P2P interfaces
with the same local address, crashed in 8 hours or less when it
dereferenced a dangling pointer to a deleted ifnet.  Now, its uptime
is greater than 3 days.
2006-12-02 20:40:58 +00:00
dyoung
3b46d8b708 Use the queue(3) macros instead of open-coding them. Shorten
staircases.  Remove unnecessary casts.  Where appropriate, s/8/NBBY/.
De-__P().  KNF.

No functional changes intended.
2006-12-02 18:59:17 +00:00
hannken
818b049a35 On snapshot creation be sure the snapshot vnode has valid quota information.
Fixes PR kern/35121
2006-12-02 17:21:11 +00:00
dsl
dc6b659187 Simplify the code that processes .if lines.
It doesn't need a two-dimensional array to remember the states of .if lines.
It would be even simpler if we didn't try to detect .else and .elif lines
that follow .else lines.
Unfortunately this isn't the code that is stupendously slow...
2006-12-02 15:50:45 +00:00
tnozaki
afa086e571 1. add IBM codepage 853 support to iconv.
2. correct JISX0208:1978 <-> Unicode mapping for IBM942.
2006-12-02 14:36:13 +00:00
bouyer
13e29fff26 Don't call the done callback twice if a special action is waiting on the queue.
Don't forget to free the xfer in the normal bio path.
2006-12-02 13:35:52 +00:00
christos
456024195b revert previous commit (size_t -> int change). Thanks cube. 2006-12-02 06:22:09 +00:00
christos
c54ef0193c restore binary compatibility. 2006-12-02 05:27:27 +00:00
christos
972b81c7cd int -> size_t 2006-12-02 05:16:01 +00:00
christos
6420383ae6 keep the note section 2006-12-02 04:49:37 +00:00
christos
5d02b2963e Enable NetBSD note on i386. Portmasters, please fix your ldscripts :-) 2006-12-02 04:48:34 +00:00