diff options
author | davide <davide@FreeBSD.org> | 2012-10-31 03:34:07 +0000 |
---|---|---|
committer | davide <davide@FreeBSD.org> | 2012-10-31 03:34:07 +0000 |
commit | 793cdde76e978e65ad5e743e35dbe3a92b381e90 (patch) | |
tree | 0c92e4f2f9c4d973dcd0bbeb244ef685f1342ee1 /sys/fs/smbfs/smbfs_subr.c | |
parent | a7cdc19e4b4ea767e597c3017133326b0697bd0d (diff) | |
download | FreeBSD-src-793cdde76e978e65ad5e743e35dbe3a92b381e90.zip FreeBSD-src-793cdde76e978e65ad5e743e35dbe3a92b381e90.tar.gz |
Fix panic due to page faults while in kernel mode, under conditions of
VM pressure. The reason is that in some codepaths pointers to stack
variables were passed from one thread to another.
In collaboration with: pho
Reported by: pho's stress2 suite
Sponsored by: iXsystems inc.
Diffstat (limited to 'sys/fs/smbfs/smbfs_subr.c')
-rw-r--r-- | sys/fs/smbfs/smbfs_subr.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/fs/smbfs/smbfs_subr.c b/sys/fs/smbfs/smbfs_subr.c index 51ee4d5..b95f92b 100644 --- a/sys/fs/smbfs/smbfs_subr.c +++ b/sys/fs/smbfs/smbfs_subr.c @@ -46,6 +46,7 @@ #include <fs/smbfs/smbfs_subr.h> MALLOC_DEFINE(M_SMBFSDATA, "smbfs_data", "SMBFS private data"); +MALLOC_DEFINE(M_SMBFSCRED, "smbfs_cred", "SMBFS cred data"); void smb_time_local2server(struct timespec *tsp, int tzoff, u_long *seconds) @@ -222,3 +223,15 @@ smbfs_fname_tolocal(struct smb_vc *vcp, char *name, int *nmlen, int caseopt) } return error; } + +void * +smbfs_malloc_scred(void) +{ + return (malloc(sizeof(struct smb_cred), M_SMBFSCRED, M_WAITOK)); +} + +void +smbfs_free_scred(void *scred) +{ + free(scred, M_SMBFSCRED); +} |