Commit Graph

146159 Commits

Author SHA1 Message Date
christos f540054634 Coverity CID 735: Remove duplicate code. 2006-04-15 01:58:44 +00:00
christos 0b55b29a78 Coverity CID 734: Define NFS_TEST_HEAVY for testing nfsds, and use this to
ifdef out dead code. XXX: Why is this turned on by default?
2006-04-15 01:57:36 +00:00
christos 4ea21306a7 Coverity CID 736: Comment out dead code. 2006-04-15 01:54:46 +00:00
christos 0016be6042 Coverity CID 1175: Remove dead code. 2006-04-15 01:52:44 +00:00
christos 1ee078d67e Coverity CID 744: Conditionally define out dead code (only if it is dead) 2006-04-15 01:51:47 +00:00
christos 35829d71d3 Coverity CID 1141: Add a KASSERT before deref. 2006-04-15 01:45:15 +00:00
christos 98f00f5575 Add missing semi-colon. 2006-04-15 01:42:46 +00:00
christos c3a65fd394 Coverity CID 1142: Add a KASSERT before deref. 2006-04-15 01:41:46 +00:00
christos d008757117 Coverity CID 1143: Prevent NULL deref. 2006-04-15 01:39:15 +00:00
christos 09436af99e Coverity CID 1144: Protect against NULL deref. 2006-04-15 01:37:46 +00:00
christos 6668c9c154 Coverity CID 1162: Prevent NULL deref. 2006-04-15 01:35:12 +00:00
christos b31d7b8b49 Coverity CID 1165: Cannot have nfsiod without an lwp, so remove the superfluous
test.
2006-04-15 01:31:11 +00:00
christos b2bd561652 Coverity CID 2445: Only set from_p if we succeed so that we free it on error. 2006-04-15 01:25:54 +00:00
christos bd57687667 Don't leak mbufs on error. 2006-04-15 01:25:01 +00:00
christos 6555ff0ad3 From my posting of April 3 to tech-kern:
My understanding is that the CLRSIG() is supposed to clear the signal
that was sent to the syncer process to prevent it from being delivered
to the syncer process in case unmounting fails, so that the syncer process
does not die while the filesystem is still mounted. The typical scenario
is, the syncher process is tsleep()ing in the kernel, and waking up when
it needs to do work. If someone sends a signal to it, eg. kill -TERM
the mfs process, then the kernel will try to unmount the mfs filesystem
before delivering the signal to the process. If that unmount fails, then
we should not really kill the process because that will hang the mount.
So we call CLRSIG() to stop the signal from being delivered.

So the first call to issignal() will return the signal number that was
sent to the syncer process (unless someone malicious was able to send
a lower numbered signal between the time tsleep() returned and we called
issignal()... something that is not really easy to do). But you are
right, we should not be calling it many times as a side effect of this
macro.

Rewrite CLRSIG() clear all the signals and call issignal() the correct
number of times.
2006-04-15 01:16:40 +00:00
christos c76b868cf4 Imply DIAGNOSTIC if __COVERITY__. 2006-04-15 01:09:34 +00:00
christos de067efed8 Revert previous panic change, I'll fix it differently. 2006-04-15 01:07:51 +00:00
christos 881fbaa328 Coverity CID 2509: Initialize cache 2006-04-15 00:45:49 +00:00
christos ff33272e7b Coverity CID 2510-2514: Always initialize cache. 2006-04-15 00:44:18 +00:00
christos 4c9d749d77 Coverity CID 2515-2519: Initialize rexmit on error path. 2006-04-15 00:40:20 +00:00
christos 1099609bd0 Coverity CID 2520: rexmit can be uninitialized on error path. 2006-04-15 00:36:23 +00:00
elad 1ec3fc44a3 Coverity CID 1050, 1051: Correct NULL guards. 2006-04-15 00:34:42 +00:00
christos 55f3f4d6c8 Coverity CID 607: Remove bogus test. 2006-04-15 00:30:48 +00:00
christos 3e3a249d3c Move pf2 assignment after we've assigned pf. 2006-04-15 00:29:25 +00:00
christos 1eb02d66d2 Coverity CID 608: #ifdef out dead code. 2006-04-15 00:28:16 +00:00
christos f1a8105e4c Coverity CID 740: Change constant comparisons to MCLBYTES to KASSERT and remove
extraneous tests.
2006-04-15 00:24:12 +00:00
christos 0cc667d207 Coverity CID 856: m cannot be NULL here. Remove bogus test. 2006-04-15 00:13:23 +00:00
christos 826c34719e Coverity CID 857: Prevent NULL deref. 2006-04-15 00:09:29 +00:00
christos 5cd6dae082 Coverity CID 1157: Move deref after check. 2006-04-15 00:03:56 +00:00
christos 9202171a37 Coverity CID 1158: Add a KASSERT to appease coverity. 2006-04-15 00:01:50 +00:00
christos 4364818c59 Coverity CID 1159: Prevent NULL deref. 2006-04-14 23:56:20 +00:00
elad 31162c28c3 Coverity CID 1739: Plug leak. 2006-04-14 23:54:21 +00:00
christos 2b7ed695ce Coverity CID 860: Prevent NULL deref. 2006-04-14 23:53:53 +00:00
christos 690a0f638c Coverity CID 2431: Don't deref before test. 2006-04-14 23:47:57 +00:00
christos 57919c6b44 Coverity CID 1117: Prevent NULL deref. 2006-04-14 23:45:43 +00:00
christos 22c81cce82 Coverity CID 1116: Prevent NULL deref. 2006-04-14 23:43:07 +00:00
christos 9d14e1e4c9 Coverity CID 2692: First stop the timer and then free it. 2006-04-14 23:40:43 +00:00
christos c591e825ed Coverity CID 1161: Protect against NULL deref or mbuf, by returning EINVAL. 2006-04-14 23:31:33 +00:00
christos 6d29e52f5a Coverity CID 1160: Fix obvious bug introduced with m_len... 2006-04-14 23:25:46 +00:00
christos 519309ea6e Coverity CID 1154: Prevent NULL deref. 2006-04-14 23:17:24 +00:00
christos ce9b807645 Coverity CID 1089: Add more KASSERTs to prevent NULL deref. 2006-04-14 23:15:21 +00:00
christos ff57dc92a8 Coverity CID 1088: Add KASSERT to prevent NULL pointer deref. 2006-04-14 23:12:14 +00:00
christos 0f609f1bfa Coverity CID 738: Fix the query size vs. result returning setup. 2006-04-14 23:09:16 +00:00
christos d45bdd8edd Coverity CID 1096: l cannot be NULL for USER traps. Add KASSERT for it. 2006-04-14 22:55:32 +00:00
christos c8814860e9 Coverity CID 1095: p cannot be NULL for user traps. Add KASSERT. 2006-04-14 22:53:53 +00:00
christos 407368a46e Coverity CID 2453: Add negative checks. 2006-04-14 22:52:00 +00:00
christos 24f5b2aec3 Coverity CID 1127: Prevent NULL deref. 2006-04-14 22:43:12 +00:00
christos 4d098765d0 Turn on RAID KASSERTS if __COVERITY__ 2006-04-14 22:40:09 +00:00
christos 3456153a3d Coverity CID 2467: Check that we actually initialized addr before returning it. 2006-04-14 22:32:14 +00:00
christos 0310ff8964 Coverity CID 1542: Off by one in test. 2006-04-14 22:30:13 +00:00