Commit Graph

154185 Commits

Author SHA1 Message Date
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
elad
cbcd623862 We are required to hold uvm.swap_data_lock here too. 2006-12-02 03:23:38 +00:00
elad
432c309931 Change kauth(9) KPI for kauth_authorize_device_passthru() to add another
argument, u_long, serving as a bit-mask of generic requests for the
passthru request.

Discussed on tech-security@ and tech-kern@. Okay tls@.
2006-12-02 03:10:42 +00:00
uwe
d14ca40433 arch/sh3e{b,l} files for gdb6 2006-12-02 01:20:40 +00:00
uwe
7ec58a9280 Do not include sh64 support into sh*-netbsdelf* targets unless
specifically requested with sh5* or sh64*.
2006-12-02 01:16:34 +00:00
uwe
0c5111b125 Hide sh5 stuff under #ifdef BFD64, so that we can build with 32-bit
support only.
2006-12-02 01:13:53 +00:00
riz
5a855ffac9 Move more stuff to CHANGES.prev in honor of the rebranch. 2006-12-02 00:50:31 +00:00
riz
711957a279 Welcome to 4.99.5 2006-12-02 00:48:45 +00:00
christos
3254d721de - add kernel frame unwinding support (copied from i386obsd-tdep.c)
- add a nasty hack to recognize elf kernels which do not have a PT_NOTE
  as NetBSD binaries.
2006-12-02 00:46:06 +00:00
dogcow
437f8cc149 make bootxx_msdos fit in 8k again; thanks, __internal_memset_, for spilling
registers all over the place.
2006-12-02 00:38:22 +00:00
martin
9be3ef677b On Christos' request, reinstantiate the packed->__packed__ part of the
backed out change.
2006-12-01 21:36:56 +00:00
martin
035130a4dd Fix PR kern/34202 differently, by aligning the variables "the traditional
way".
2006-12-01 21:23:57 +00:00
martin
d5c3b27938 Back out align(4) for all struct decls - it breaks various things all
over the tree (for example esiop on sparc64 won't boot any more).
2006-12-01 21:11:26 +00:00