Commit Graph

147303 Commits

Author SHA1 Message Date
christos
d159dc82e4 Coverity CID 3494: Plug memory leak. 2006-05-21 17:23:36 +00:00
christos
124bff0089 PR/33522: Peter Bex: Sanity checks to avoid zerodivide. 2006-05-21 16:00:17 +00:00
cube
5536c0b46c Fix tyop reported by Yoshito Komatsu. 2006-05-21 11:39:27 +00:00
agc
e32a776a5a Adjust the data VPD returns, to work around a problem in the Cisco
initiator (used on Solaris 10 Update 1) - the initiator demands that a
UUID is returned, so give it one.

Add autoconf glue for that, and a compat uuid_create(3) and
uuid_to_string(3).

This still spews a lot of output via the target's syslog, but persevere,
since it does actually make the target work with the Solaris initiator:

	solaris10# format
	Searching for disks...done


	AVAILABLE DISK SELECTIONS:
	       0. c1d0 <DEFAULT cyl 29728 alt 2 hd 64 sec 63>
		  /pci@0,0/pci-ide@1f,1/ide@0/cmdk@0,0
	       1. c2t5d0 <DEFAULT cyl 96 alt 2 hd 64 sec 32>
		  /iscsi/disk@0000iqn.1994-04.org.netbsd.iscsi-target%3Atarget00001,0
	Specify disk (enter its number): ^D
	solaris10# df -k /mnt
	Filesystem            kbytes    used   avail capacity  Mounted on
	/dev/dsk/c2t5d0s0      91407    1041   81226     2%    /mnt
	solaris10# uname -a
	SunOS solaris10 5.10 Generic_118844-26 i86pc i386 i86pc
	solaris10#
2006-05-21 09:26:37 +00:00
christos
c03d07d01d Put the __insn_barrier() inside the spinloop for the DIAGNOSTIC case, so
that we have a barrier for the DIAGNOSTIC case too.
2006-05-21 06:17:12 +00:00
skrll
9e33bb5bf7 Copy across the pa/t-netbsd file. Add a CRTSTUFF_T_CFLAGS_S define. 2006-05-21 06:03:55 +00:00
christos
ce07c2d219 it is attributes no attribute 2006-05-21 05:49:54 +00:00
christos
2bea415e72 remove gcc4 stuff since it is done in bsd.kmod.mk 2006-05-21 05:43:49 +00:00
christos
c52ff7f9d5 Fixes from David Boggs; in his words:
/sys/net/if_spppvar.h says:

	"Lower layer drivers that are always ready to communicate
	(like hardware HDLC) can shortcut pp_up from pp_tls,
	and pp_down from pp_tlf."

	When I follow those instructions, I get a kernel stack
	overflow as soon as I open the HDLC device.

	Here is the loop:
	 sppp_ioctl calls sppp_lcp_open
	 sppp_lcp_open calls sppp_open_event
	 sppp_open_event calls sppp_lcp_tls
	 sppp_lcp_tls calls pp_tls
	 pp_tls is the SHORTCUT to sppp_lcp_up
	 sppp_lcp_up calls spp_lcp_open
	 ...and around we go until the stack overflows.

	The fix is to reverse the order of the action (tls)
	and the state change (from INITIAL to STARTING) in
	sppp_open_event.

	There is a similar loop during closing:
	 sppp_ioctl calls sppp_lcp_close
	 sppp_lcp_close calls sppp_close_event
	 spp_close_event calls sppp_lcp_tlf
	 sppp_lcp_tlf calls pp_tlf
	 pp_tlf is the SHORTCUT to sppp_lcp_down
	 sppp_lcp_down calls sppp_lcp_close
	 ...and around we go until the stack overflows.

	The fix is to reverse the order of the action (tlf)
	and the state change (from STARTING to INITIAL) in
	sppp_close_event.

	Separately, while I was discovering this, I noticed
	that pp_tlf was being called unconditionally rather
	than first checking to see if it is NULL.  pp_tlf
	is a callout from sppp to the hdlc device driver.
	Elsewhere in sppp, this is always checked for NULL
	before calling it, and the comments in if_spppvar.h
	imply that filling it in is optional.

	From spppvar.h:
	"These functions need to be filled in by the lower layer
	(hardware) drivers if they request notification from the
	PPP layer whether the link is actually required."
	This clearly says that pp_tlf and pp_tls are optional
	and so sppp must check before calling them.
2006-05-21 05:09:13 +00:00
christos
a4d71852e0 Put back -Wno-attribute for now since not all archs have been fixed. 2006-05-21 04:53:23 +00:00
christos
3c22b94a4a fix typo 2006-05-21 04:45:35 +00:00
christos
c9904084fe add -fno-strict-aliasing for gcc4 2006-05-21 04:43:58 +00:00
christos
a75306c3a4 Fix strict aliasing issues and while I am here fix a memory leak on error 2006-05-21 04:30:03 +00:00
mrg
53751ce0e9 - note sh3/vax mdreloc.c uninitialised variable warnings.
- note sh3 libbz2/gcc4 hack for blockstore.c
2006-05-21 04:19:12 +00:00
mrg
d677e4a13a avoid more GCC4 uninitialised variable problems. (sh3 known, vax guessed.) 2006-05-21 04:17:35 +00:00
mrg
e795c5750a use -O0 for blocksort.o on sh3 & GCC4. 2006-05-21 03:34:57 +00:00
mrg
15fc3900ea add a local prototype for fabs() 2006-05-21 02:51:15 +00:00
dan
60693294da note more gcc4 uninitialised appeasement (amd64 pmap.c) 2006-05-21 01:24:41 +00:00
dan
58c89e46e0 initialise a few "off"s to appease gcc4
these only turned up with -O2 and/or -march=nocona, not with default flags
2006-05-21 01:19:25 +00:00
mrg
331828317b mknative generated files for hppa and GCC4. seems to kinda of build, not run-tested. 2006-05-21 00:48:58 +00:00
mrg
84b833274a note ntp_request.c 1.4 2006-05-21 00:44:53 +00:00
mrg
8df5948192 make this work: #undef ASM_PREFERRED_EH_DATA_FORMAT and
ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX before defining them.  (XXX should we
use the versions in pa-linux.h?  or what?)

also, convert ASM_FILE_START into TARGET_ASM_FILE_START, using the
pa_linux_file_start version.
2006-05-21 00:43:37 +00:00
dan
d0a17c26df note uninitialsed appeasement in libexec/ld.elf_so/arch/x86_64/mdreloc.c 2006-05-20 23:41:16 +00:00
dan
b995f58933 appease gcc4 uninitialiased warning
ok mrg.
2006-05-20 23:38:27 +00:00
jnemeth
563d9df051 Victoria Day in Canada occurs on the Monday prior to May 25th 2006-05-20 22:31:02 +00:00
christos
589a4be805 Add -Wno-pointer-sign for gcc4 2006-05-20 22:22:04 +00:00
christos
57f1eb7d75 XXX: GCC uninitialized 2006-05-20 22:15:20 +00:00
gdt
42ecd6e67d Enable ugensa. 2006-05-20 22:03:56 +00:00
mrg
19ad9e5482 change some variable types from int to size_t, since that's what libsa
dv_strategy() wants for the 6th argument.
2006-05-20 20:38:39 +00:00
mrg
2d245c626f change some char to u_char to match other variables and functions. 2006-05-20 20:37:15 +00:00
mrg
e9d0e73f70 generated sh5 mknative GCC4 files. seems to build ok, but as-yet untested. 2006-05-20 20:36:03 +00:00
christos
de7cebdcc7 remove ypserv from the gcc4 hacks since it has been fixed. 2006-05-20 20:34:29 +00:00
christos
d05d5214fe Add another fixup entry Arthur Dimitrelis 2006-05-20 20:32:16 +00:00
mrg
1a1dc23a34 #include <stdlib.h> for exit(3) prototype 2006-05-20 20:30:34 +00:00
dsl
ded5cac581 Checkpoint this as 'WIP' before I break it again!
(Not complied by default.)
2006-05-20 20:07:35 +00:00
christos
fb4d7a1a6e - fix pointer problems and unsigned int -> int confusion that lead to
undetected errors.
- factor out the socket creation code so that we don't have 4 copies.
- add -p <port> argument
- fix the majority of the lint problems.
- change all the strncpy's to strlcpy's.
2006-05-20 20:03:28 +00:00
mrg
696ab05f50 add (char *) cast to quieten GCC. 2006-05-20 19:40:46 +00:00
mrg
995cc7365d initialise tmp_clock() for GCC4. 2006-05-20 19:22:36 +00:00
mrg
041a6c9d7d pull across missing files from GCC3 tree. these don't work yet as they
used old-style GCC3 functions and macros.
2006-05-20 19:21:56 +00:00
elad
b3e7e1b010 Better implementation of PaX MPROTECT, after looking some more into the
code and not trying to use temporary solutions.

Lots of comments and help from YAMAMOTO Takashi, also thanks to the PaX
author for being quick to recognize that something fishy's going on. :)

Hook up in mmap/vmcmd rather than (ugh!) uvm_map_protect().

Next time I suggest to commit a temporary solution just revoke my
commit bit.
2006-05-20 15:45:37 +00:00
rpaulo
d330ad3005 The check for LMC cards should return NULL, not 0.
No functional change.
2006-05-20 14:23:07 +00:00
dsl
0e765f005a When expanding "$@" add a \0 byte after the last argument (as well as all
the earlier ones) so that a separator is added before it when it is empty.
This wasn't needed before a recent change that chenged the behaviour of
trailing whitespace IFS characters.
Fixed PR/33472
2006-05-20 13:57:27 +00:00
uwe
64f867a645 Redo previous fix properly. Original code had a typo caused by very similar
function and variable names.  We need to protect tag comparison b/c we don't
want to perform it against an uninitialized tag.
2006-05-20 12:29:57 +00:00
yamt
0f0124d1a9 remove NOLOCKF and use normal NULL instead. 2006-05-20 12:20:55 +00:00
yamt
b22546608e remove an debug printf slipped into the previous. 2006-05-20 12:19:30 +00:00
yamt
a6518311cc fix F_SETLKW deadlock detection, which has been broken since lwpify.
although this doesn't work for processes with multiple lwps, it's better
than not working at all.
2006-05-20 12:06:20 +00:00
yamt
cecc761849 make lockfpool static. 2006-05-20 12:04:21 +00:00
yamt
408b7c1e5c move lockf implementation details from sys/lockf.h to kern/vfs_lockf.c. 2006-05-20 12:02:47 +00:00
mrg
9200f66337 update the uninit gcc4 list a bit more. 2006-05-20 11:17:55 +00:00
mrg
bf7f38130a fix merge botch 2006-05-20 11:06:50 +00:00