Commit Graph

5389 Commits

Author SHA1 Message Date
Jeffrey Altman
00fee5efee windows-check-servers-20080828
LICENSE MIT

if the server count is zero, don't both trying
2008-08-28 10:45:45 +00:00
Jeffrey Altman
43eb87a916 windows-check-server-heap-overwrite2-20080827
LICENSE MIT

the incorporation of nconns into the foo incremental was a mistake
2008-08-28 00:42:26 +00:00
Jeffrey Altman
e68255c12c windows-check-server-heap-overwrite-20080827
LICENSE MIT

Protect against a heap overwrite that could occur is the number of file
servers or vldb servers grows while the maximum number of connections
is computed and when the connection list is populated.
2008-08-27 23:08:06 +00:00
Jeffrey Altman
0affa4b86a windows-callback-lock-order-20080827
LICENSE MIT

do not hold cm_server_t mutex when calling cm_FindVolumeByID because
the cm_volume_t lock must be obtained ahead of the cm_server_t mutex
2008-08-27 23:01:51 +00:00
Jeffrey Altman
c50857b05e windows-lock-order-20080827
LICENSE MIT

do not hold cm_scacheLock while obtaining cm_scache_t->rw
2008-08-27 13:17:05 +00:00
Jeffrey Altman
bef68684fd windows-short-names-20080827
LICENSE MIT

plus and equal are not valid characters in short names.
we replace them with left and right brace in order to
minimize the instability in the file names.
2008-08-27 12:47:23 +00:00
Matt Benjamin
a123bd8ccd freebsd-70-client-20080826
LICENSE IPL10

FreeBSD 7.0 client support (and 8.0 support but that's a moving target)
2008-08-26 15:59:42 +00:00
Tom Keiser
4d245c6a19 studio12-solaris-updates-20080826
LICENSE IPL10
FIXES 113671

update so we build with studio 12 on solaris
2008-08-26 15:11:28 +00:00
Derrick Brashear
82c62ae0e3 linux-rpm-make-dkms-remove-work-20080826
LICENSE IPL10

rpm -e failed because of a typo here when removing our dkms rpm
2008-08-26 14:44:31 +00:00
Jeffrey Altman
e16c4f8a96 windows-scache-lock-20080825
LICENSE MIT

restore a missing obtain write lock
2008-08-26 05:55:40 +00:00
Jeffrey Altman
e0380d54ba windows-misc-20080825
LICENSE MIT

avoid a deadlock in cm_GiveUpAllCallbacks

log UAEEXIST / EEXIST in cm_Analyze
2008-08-26 05:36:34 +00:00
Jeffrey Altman
cb455744d4 windows-client-osi-20080825
LICENSE MIT

add more asserts to attempt to catch locks released in threads other
than the one that obtained them.
2008-08-26 05:14:14 +00:00
Derrick Brashear
12c8abc690 server-argument-consistency-and-jumbograms-off-20080824
LICENSE IPL10
FIXES 108703

go through and make servers able to take debug log level on command line;
add -jumbo; default to -nojumbo
2008-08-25 02:14:39 +00:00
Jeffrey Altman
a88d12746a windows-smb-more-check-open-done-20080824
LICENSE MIT

call cm_CheckNTOpenDone() in error conditions as well
2008-08-24 22:45:24 +00:00
Jeffrey Altman
82741251b1 windows-prefetch-lock-order-20080824
LICENSE MIT

lock order violation between cm_daemonLock and cm_scache_t rw lock
2008-08-24 18:46:23 +00:00
Jeffrey Altman
24f8b1b4c3 windows-smb-locks-20080224
LICENSE MIT

smb_dirSearch_t refCount field is protected by smb_globalLock not the
smb_dirSearch_t mutex.

Do not hold the smb_fid_t mutex across calls to smb_NotifyChange()
2008-08-24 17:31:28 +00:00
Jeffrey Altman
cc48a5a3b4 windows-check-nt-open-lock-sync-20080224
LICENSE MIT

Move cm_SyncOpDone(CM_SCACHESYNC_LOCK) from cm_CheckNTOpen to
cm_CheckNTOpenDone.  This is necessary to synchronize lock operations.
2008-08-24 17:25:57 +00:00
Jeffrey Altman
25b819543e windows-callback-shutdown-head-20080801
LICENSE MIT

When the cache manager is shutting down, return an error to all
callback requests.  Otherwise, it is possible for a callback to get
stuck waiting for a lock and when the lock clears to be left with
nothing but invalid memory addresses to crash on.

In the meantime, the file server is waiting for the response.
2008-08-22 21:57:53 +00:00
Derrick Brashear
186f707378 darwin-fake-afs-bigger-20080822
LICENSE IPL10
FIXES 112564

set up max uint64 "free" in afs so finder isn't dumb.
2008-08-22 20:26:38 +00:00
Derrick Brashear
ea81e608ba analyze-srvr-safety-check-20080822
LICENSE IPL10
FIXES 112681

safety check to make sure a conn's srvr is set before dereferencing it
2008-08-22 19:52:44 +00:00
Jeffrey Altman
ef10390e12 windows-misc-20080822
LICENSE MIT

1. In multi-threaded applications deadlocking is always a problem.
Deadlock avoidance requires a strict adherence to a documented
hierarchy.  The lock hierarchy for OAFW is described in a file
called locks.txt.  There are two problems.  First, some of the
locks are not included in locks.txt.  Second, it is nearly
impossible given the depth of function calls for any programmer
 to identify all of the locks that are held at any given time
a function is called.  This patch implements a new locking order
verification mechanism.  Each lock is assigned a lock level at
initialization.  Each thread maintains a queue of held locks.
Each time a lock is acquired the queue is checked to ensure that
no locks with a higher level than the requested lock has already
been acquired.  If a violation occurs, the service panics.

2. When the service panics ensure that a minidump will always be generated.

3. Remove unused lock cm_bufGetMutex.

4. The lock order verifier identified approximately a dozen
lock order violations that are corrected.

5. A race condition within the function path cm_GetSCache() ->
cm_GetNewSCache() -> cm_RecycleSCache() permitted a cm_scache_t
object to be issued simultaneously to two threads.  This would
eventually result in a panic due to the resulting under count.

6. Fix interpretation of the empty string as the ioctl path to
mean the current directory.   "fs lsm", "symlink list", etc.
now return a "not a ..." error instead of "does not exist".

7. Add SMB_STRF_SRCNULTERM flag to smb_ParseStringXXX functions
to indicate that the input string is a nul terminated string.
Assign it when input strings are nul terminated.

8. The CIFS protocol specification for handling NT_TRANSACT_CREATE
does not match the observed behavior.  The 'nameLength' is specified
in bytes not in characters.  Fix the implementation to match.

9. The cm_HaveAccessRights() attempt at deadlock avoidance by calling
lock_TryRead() on the parent directory cm_scache_t rw-lock does not
avoid the deadlock.  Avoid the deadlock by enforcing the lock order
of lowest vnode first.  Then remove the infinite loop avoidance in
cm_SyncOp() that was returning an unwarranted access denied error.
2008-08-22 19:06:04 +00:00
Derrick Brashear
46dbd67871 rx-allow-jumbogram-disabling-really-20080822
LICENSE IPL10

right now, jumbograms can still be sent when -nojumbo is specified. make the
current macro a default and override when we're supposed to.
2008-08-22 05:31:32 +00:00
Jeffrey Altman
a00f706eb6 windows-list-symlink-20080820
LICENSE MIT

Another casaulty of the Unicode transition, the return value of the
ListLink operation was not being convered from wchar to char before
it was copied into the output buffer.
2008-08-20 20:44:56 +00:00
Jeffrey Altman
9488898fdb windows-afsd-service-20080820
LICENSE MIT

When afsd_service.exe is not running as a service do not call the
Service Manager functions.  Doing so causes invalid access exceptions
to be thrown in the kernel and can corrupt the heap.
2008-08-20 20:41:17 +00:00
Derrick Brashear
651f25b9c8 redhat-spec-default-build-authlibs-20080820
LICENSE IPL10
FIXES 101879

make build_authlibs default usefully
2008-08-20 19:45:05 +00:00
Derrick Brashear
03982bd548 namei-by-default-on-sol10-20080816
LICENSE IPL10

default to namei, not inode, on solaris 10 except by request
2008-08-16 22:37:29 +00:00
Dan Hyde
b080c5d82b volser-initialize-volume-updatedate-20080816
LICENSE IPL10
FIXES 110943

right now this isn't set until a vnode update happens. technically creating
the root directory is an update, so let's set it to now.
2008-08-16 21:07:30 +00:00
Tracy Di Marco White
8190e75b38 netbsd-sigwait-broken-til-nbsd5-20080816
LICENSE IPL10
FIXES 111404

work around netbsd sigwait brokenness
2008-08-16 20:46:44 +00:00
Marc Dionne
d7a5619e5b linux-2-6-27-20080816
LICENSE IPL10
FIXES 111634

add support for 2.6.27, which removes asm/semaphore.h
2008-08-16 20:42:34 +00:00
Jeffrey Altman
4274e854c5 windows-build-20080815
LICENSE MIT

remove duplicate rules for man-pages
2008-08-16 18:39:33 +00:00
Jeffrey Altman
dbd98583d3 windows-rx-extra-packets-20080816
LICENSE MIT

Make the default number of pre-allocated rx packets equal to the number
of threads times the rx window size.
2008-08-16 18:00:50 +00:00
Jeffrey Altman
ffbee95174 windows-pioctl-getdrivetype-20080816
LICENSE MIT

Use GetDriveType() to check if the current path is a local disk.
If it is, fail the pioctl attempt immediately.  This should avoid
the reported 30 second delay in the AFS Shell Extension.
2008-08-16 17:48:17 +00:00
Jeffrey Altman
20d38bc268 windows-freelance-deadlock-20080815
LICENSE MIT

avoid a deadlock in cm_reInitLockMountPoints() and make the function
useful again by actually using the index value in the construction
of the FIDs
2008-08-15 21:17:02 +00:00
Jeffrey Altman
aa011cc0d8 windows-shlibafsauthent-20080814
LICENSE MIT

export pioctl_utf8
2008-08-15 00:37:20 +00:00
Jeffrey Altman
357223aefd windows-server-dereference-null-two-20080814
LICENSE MIT

protect against a potential null pointer dereference of a cm_server_t
object
2008-08-14 21:22:49 +00:00
Jeffrey Altman
90fe95e994 windows-server-dereference-null-20080814
LICENSE MIT

protect against a null pointer dereference of a cm_server_t object
2008-08-14 21:19:34 +00:00
Jeffrey Altman
f430aee67c windows-memdump-20080814
LICENSE MIT

add locks, waiting lock requests, smb user, smb tid, and cell expiration
to the memory dump output (fs memdump)
2008-08-14 18:23:28 +00:00
Jeffrey Altman
06b5006517 windows-free-server-deadlock-20080813
LICENSE MIT

avoid a deadloc when freeing servers.  cm_serverLock must be released
around cm_GCConnections()
2008-08-14 03:36:43 +00:00
Jeffrey Altman
4e7e66d4dc windows-search-cell-file-20080813
LICENSE MIT

if a cell has been found with addresses and the next cell name
is reached before the EOF, return success.

If the cell has been found and there are no addresses, return -6
2008-08-14 03:32:54 +00:00
Jeffrey Altman
919fb5e14b rx-buffer-allocation-corrected-20080813
LICENSE MIT

a corrected version of delta rx-buffer-allocation-20080812
2008-08-14 03:27:36 +00:00
Jeffrey Altman
844d7e5707 windows-build-man-pages-20080813
LICENSE MIT

move building of man pages to installer phase
2008-08-14 03:15:34 +00:00
Derrick Brashear
04a25e0a40 nfstrans-extra-protection-20080813
LICENSE IPL10

ensure, at least, that there is a filehandle for everything we check
2008-08-14 00:49:15 +00:00
Rainer Toebbicke
e5bf9b91ea salvager-dont-corrupt-dir-lengths-20080812
LICENSE IPL10
FIXES 111585

make the int64 macros work when the "64 bit" number to fill isn't.
use the correct variable type for length in salvager
2008-08-14 00:44:16 +00:00
Jeffrey Altman
156b13f74d rx-buffer-allocation-pulled-20080813
LICENSE MIT

remove delta rx-buffer-allocation-20080812 as it leads to data corruption
2008-08-13 15:10:42 +00:00
Jeffrey Altman
643a632a38 rx-buffer-allocation-20080812
LICENSE MIT

Prevent rxi_MorePacketsNoLock() from dereferencing a NULL pointer if
the requested allocation size cannot be satsified.  In that case back
off the number of packets until osi_Alloc() succeeds or panic if no
packets can be allocated at all.

In AllocPacketBufs() do not transfer more than rx_TSFPQGlobSize packets.

Modify RX_TS_FPQ_GTOL2() macro to protect against transfering more packets
that are actually free.

Modify RX_TS_FPQ_COMPUTE_LIMITS() to enforce a rx_TSFPQGlobSize maximum
value of 64 packets to prevent ever increasing allocation sizes within
AllocPacketBufs()
2008-08-12 19:39:59 +00:00
Jeffrey Altman
c19c4b3ebb windows-stack-overruns-20080811
LICENSE MIT

prevent stack overruns
2008-08-12 05:29:52 +00:00
Jeffrey Altman
1f6c7ca14a windows-fs-mkmount-20080811
LICENSE MIT

fix volume name validity test.  strip trailing '.' from volume name
2008-08-12 00:54:48 +00:00
Jeffrey Altman
eaf2843a81 windows-make-nls-win2000-compat-20080809
LICENSE MIT

make the nls module compatible with windows 2000.
cannot use LOCALE_INVARIANT instead must lie and
say everyone is US English.  windows 2000 does not
have normalization functions and now doesn't have
case insensitive string comparison functions either
for languages other than English.

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
LICENSE MIT

not all applications that link to cm_nls perform initialization.
Call initialization if it has not already been done explicitly.
2008-08-10 01:00:59 +00:00
Jeffrey Altman
d5af3b4236 windows-freelance-deadlock-20080809
LICENSE MIT

avoid a deadlock between cm_freelanceLock and cm_scacheLock
2008-08-09 23:31:09 +00:00
Jeffrey Altman
cd316ff51c windows-rx-udpbufsize-20080809
LICENSE MIT

Set UdpBufSize to 256K.  Add RxUdpBufSize registry value to permit
runtime configuration.
2008-08-09 05:52:36 +00:00