Commit Graph

121346 Commits

Author SHA1 Message Date
Matteo Riondato
ea759b3eb4 Add myself to the list (Ehi, I'm not the youngest!)
Approved by:	philip (mentor)
MFC after:	3 days
2006-01-20 13:07:09 +00:00
Andre Oppermann
f33bf4a394 m_getjcl() should return the address of the mbuf, not the
cluster.

Found by:	glebius
2006-01-20 13:06:22 +00:00
Gleb Smirnoff
5eb5c9639a An attemp to make driver more readable and attaractive for further
hacking:
  - Remove all spaces at eol.
  - Improve style(9) in most frequently edited functions.
  - In em_encap() push variables for 82544 workaround in the block
    where they are only used.
  - In em_get_buf() remove unused variable.
2006-01-20 11:38:25 +00:00
Christian S.J. Peron
9c57c204be - Change the return type for init_tables from void to int so we can propagate
errors from rn_inithead back to the ipfw initialization function.
- Check return value of rn_inithead for failure, if table allocation has
  failed for any reason, free up any tables we have created and return ENOMEM
- In ipfw_init check the return value of init_tables and free up any mutexes or
  UMA zones which may have been created.
- Assert that the supplied table is not NULL before attempting to dereference.

This fixes panics which were a result of invalid memory accesses due to failed
table allocation. This is an issue mainly because the R_Zalloc function is a
malloc(M_NOWAIT) wrapper, thus making it possible for allocations to fail.

Found by:	Coverity Prevent (tm)
Coverity ID:	CID79
MFC after:	1 week
2006-01-20 05:35:27 +00:00
Garance A Drosehn
616270cb21 Improve error-handling related to the fork() done to compress files after
they have been rotated.  Among other things, use warnx() instead of warn()
for some messages where the value if errno is irrelevant to the problem
being reported.

MFC after:	5 days
2006-01-20 05:18:01 +00:00
Ariff Abdullah
9ca45dd7dc Ruthless vchan speed workaround against the dreaded sb16 / sb16x. It appear
that nothing else using this weird 45k / 49k speed upper limit.
2006-01-20 03:46:02 +00:00
Christian S.J. Peron
e9186cb94b Destroy the dynamic rule zone in the event that we fail to insert the
initial default rule.

MFC after:	1 week
2006-01-20 03:21:25 +00:00
Jason Evans
677bc78b39 Use uintptr_t rather than size_t when casting pointers to integers. Also,
fix the few remaining casting style(9) errors that remained after the
functional change.

Reported by:	jmallett
2006-01-20 03:11:11 +00:00
Olivier Houchard
0e187240e1 Build a minimal pagetables, with only section mappings, mapped write through,
to speed up the decompression.
2006-01-20 00:46:44 +00:00
Jim Rees
c1f097baba Use nfs4_disconnect for connections opened with nfs4_connect.
Submitted by:	cel@citi.umich.edu
MFC after:	1 week
2006-01-19 22:48:31 +00:00
Ceri Davies
0ebb41bef5 Security levels are not discussed further in init.8; we moved that
discussion to this manual.
2006-01-19 20:01:43 +00:00
Jason Evans
5d11758a9f Revert addtion of assertions in revision 1.99. These assertions cause
problems in cases where regions are faked up for the purposes of red-black
tree searches, since those faked region headers reside on the stack, rather
than in a malloc chunk.
2006-01-19 19:20:42 +00:00
Jason Evans
ea41be77ba Add assertions that detect some forms of region separator corruption. 2006-01-19 19:08:11 +00:00
Jason Evans
a3bb22bc8e Remove loops in arena_coalesce(). They are no longer necessary, now that
internal allocation does not rely on recursive arena use (base_arena was
removed in revision 1.95).
2006-01-19 18:37:30 +00:00
Vasil Dimov
5f9cc6261d Add myself to the calendar
Approved by:	garga (mentor)
2006-01-19 18:35:44 +00:00
Andrey Slusar
91eee675f4 Add myself.
Feel free to donate me a beer :)
2006-01-19 15:31:37 +00:00
Daniel Hartmeier
31f9d10a77 fix a bug in the fragment cache (used for 'scrub fragment crop/drop-ovl',
but not 'fragment reassemble'), which can cause some fragments to get
inserted into the cache twice, thereby violating an invariant, and panic-
ing the system subsequently.

Reviewed by:	mlaier
MFC after:	1 day
2006-01-19 11:46:45 +00:00
Dag-Erling Smørgrav
254f2fa208 In order to maintain interoperability with certain broken FTP servers,
ignore a MODE failure if and only if the mode we attempted to set was S
(which is supposed to be the default).

PR:		bin/91973
2006-01-19 08:31:47 +00:00
Jason Evans
a4922fdaf5 Make all internal variables and functions static.
Reported by:	ache
2006-01-19 07:23:13 +00:00
Jason Evans
d72cd77975 Add the RB_PROTOTYPE_STATIC and RB_GENERATE_STATIC macros.
Approved by:	markm (mentor)
2006-01-19 07:20:20 +00:00
Jason Evans
2addd81287 Return NULL if there is an OOM error during initialization, rather than
allowing the error to be fatal.

Move a label in order to make sure to properly handle errors in malloc(0).

Reported by:	Alastair D'Silva, Saneto Takanori
2006-01-19 02:11:05 +00:00
Sam Leffler
239cc3b6ce Rev ioctl to get scan results:
o lock the list walk
o malloc a results buffer instead of copying out one result at a time
  using an on-stack buffer
o fix definition of ieee80211req_scan_result so size of variable-length
  information elements is large enough to hold all possible ie's
  (still only return wpa+wme, at some point may return all)
o make rssi+noise data signed; they should've been so all along
o add a bit more padding for future additions while we're here
o define a new ioctl for new api and add compat code for old ioctl
  under COMPAT_FREEBSD6 (temporarily enabled local to the file)

Reviewed by:	Scott Long
MFC after:	2 weeks
2006-01-18 22:17:50 +00:00
Pawel Jakub Dawidek
4f9bcb9f4f Fix bio leak in case of malloc(9) failure.
Found by:	Coverity Prevent(tm)
Coverity ID:	CID794
MFC after:	3 days
2006-01-18 21:44:57 +00:00
Pawel Jakub Dawidek
e9b936c73c Remove dead code.
Found by:	Coverity Prevent(tm)
Coverity ID:	CID105
MFC after:	3 days
2006-01-18 21:43:27 +00:00
Pawel Jakub Dawidek
a49c0bd40a Remove dead code.
Found by:	Coverity Prevent(tm)
Coverity ID:	CID104
MFC after:	3 days
2006-01-18 21:42:19 +00:00
Pav Lucistnik
6aa6311f40 - Fix typo
Reported by:	neologism/#freenode
2006-01-18 20:36:58 +00:00
Julian Elischer
11f4763dd4 Return the thread name in the kinfo_proc structure.
Also correct the comment describing what the value is.
2006-01-18 20:27:43 +00:00
Julian Elischer
e1189b25d4 Duh! put the thread name into the section that is zero'd on allocation
(by default there is no name)
2006-01-18 20:18:40 +00:00
Julian Elischer
2c9a55e142 Congratulations, we now have a place for a thread to store its name.
Will be needed when we start using real threads in the kernel instead
of whole pseudo-processes.
2006-01-18 20:12:14 +00:00
Sam Leffler
a1a5050276 bump the scan generation number before iterating so we're guaranteed
to have a value that's not been used before; this fixes the problem
where the first traversal of the scan list did nothing because the
entries were initialized with the current generation number (a
separate issue)

MFC after:	1 week
2006-01-18 19:56:17 +00:00
Julian Elischer
347daa0f17 Note that the size of /boot has blown oout to 140 MBytes unless the
right options are used. Tell how to avoid this.
2006-01-18 19:54:51 +00:00
Xin LI
b512f01068 Revert previous commit for now, which seems to have (re)introduced some
old bugs, as well as some unwanted side effects.  I will do more
investigation and fix these issues first.

Pointed out by:	dwmalone
2006-01-18 19:38:43 +00:00
Alexander Leidinger
391b39d8d7 - Bring some sysctl descriptions in sync with reality (additional
values/overrides). [1]
- Add some supported cards. [2]

PR:		91916 [1]
Submitted by:	mv <mv@hysteria.sk> [1]
Requested by:	joel [2] (after reading my commit log)
MFC after:	3 days
2006-01-18 19:14:33 +00:00
Andre Oppermann
0270746230 Do not derefence the ip header pointer in the IPv6 case.
This fixes a bug in the previous commit.

Found by:	Coverity Prevent(tm)
Coverity ID:	CID253
Sponsored by:	TCP/IP Optimization Fundraise 2005
MFC after:	3 days
2006-01-18 18:59:30 +00:00
Marcel Moolenaar
383bd4fd1e Remove ELF dynamic tag definitions that aren't used. Ideally,
those that are used should come from <machine/elf.h>.
2006-01-18 18:49:25 +00:00
Andre Oppermann
8f8d29f686 In in_delayed_cksum() we can't perform a m_pullup() as it may
change the mbuf pointer and we don't have any way of passing
it back to the callers.  Instead just fail silently without
updating the checksum but leaving the mbuf+chain intact.

A search in our GNATS database did not turn up any match for
the existing warning message when this case is encountered.

Found by:	Coverity Prevent(tm)
Coverity ID:	CID779
Sponsored by:	TCP/IP Optimization Fundraise 2005
MFC after:	3 days
2006-01-18 18:49:16 +00:00
Alexander Leidinger
59e301b7eb Those files are present on -current (but empty). And they are needed
if you don't want to get some errors (e.g. in the build of
x11/XFree86-4-documents). So they don't belong here.

Noticed by:	Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>
2006-01-18 18:48:42 +00:00
Andre Oppermann
79eb490467 In syncache_expand() insert a proper syncache_free() to fix a case
that currently can't be triggered.  But better be safe than sorry
later on.  Additionally it properly silences Coverity Prevent for
future tests.

Found by:	Coverity Prevent(tm)
Coverity ID:	CID802
Sponsored by:	TCP/IP Optimization Fundraise 2005
MFC after:	3 days
2006-01-18 18:25:03 +00:00
John Baldwin
25e498b4b0 Always include the lock_classes[] array in the kernel. The
"is it a spinlock" test in mtx_destroy() needs it even in non-debug
kernels.

Reported by:	danfe
2006-01-18 18:02:50 +00:00
Sam Leffler
949c433eab don't widen the ssid field by default, this screws up other formatting;
make it available with the -v option
2006-01-18 17:45:38 +00:00
Ruslan Ermilov
4006cd2b3f Fix two accesses to uninitialized variables that a revision 1.27
has introduced.

Found with:	Coverity Prevent(tm)
2006-01-18 16:09:00 +00:00
Andre Oppermann
39550088cf Prevent dereferencing a NULL route pointer when trying to update the
route MTU.

This bug is very difficult to reach and not remotely exploitable.

Found by:	Coverity Prevent(tm)
Coverity ID:	CID162
Sponsored by:	TCP/IP Optimization Fundraise 2005
MFC after:	3 days
2006-01-18 15:05:05 +00:00
Gleb Smirnoff
4e7ba1ab94 Be ready to a case when not a constant number of segments is returned
by bus_dmamap_load_mbuf_sg() on jumbo buffer allocation.

Reviewed by:	scottl, gallatin
2006-01-18 14:31:21 +00:00
Andre Oppermann
5d691e6da8 Return mbuf pointer or NULL from ip_fastforward() as the mbuf pointer
may have changed by m_pullup() during fastforward processing.

While this is a bug it is actually never triggered in real world
situations and it is not remotely exploitable.

Found by:	Coverity Prevent(tm)
Coverity ID:	CID780
Sponsored by:	TCP/IP Optimization Fundraise 2005
2006-01-18 14:24:39 +00:00
Søren Schmidt
b258da4ee8 Correct two promise entries, these are only 2port SATA. 2006-01-18 13:34:28 +00:00
Søren Schmidt
8453acf105 Whitespace cleanup. 2006-01-18 13:10:17 +00:00
Pawel Jakub Dawidek
481b55b1e3 Style cleanups.
X-MFC-after:	Already MFCed to RELENG_6 by accident.
2006-01-18 11:03:20 +00:00
Pawel Jakub Dawidek
90742659d7 Resolve the mount point's path with realpath(2) before checking if file
system is mounted. This prevevents duplicated mounts.

The change I made against the original patch is to fall back to the given
path on realpath(2) failure instead of exiting with an error.

Submitted by:	Andreas Kohn <andreas@syndrom23.de>
PR:		bin/89782
MFC after:	3 days
2006-01-18 11:00:34 +00:00
Søren Schmidt
ac1731fb20 Properly report SATA connection speed. 2006-01-18 10:02:23 +00:00
Søren Schmidt
d0b8e03914 Properly print the SATA protocal version. 2006-01-18 10:01:43 +00:00