Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
0d6be9f4
Commit
0d6be9f4
authored
Aug 26, 2004
by
Steve French
Committed by
Steve French
Aug 26, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CIFS] misc kmalloc and kernel_thread failure checks
Signed-off-by: Steve French (sfrench@us.ibm.com)
parent
2143edbc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
10 deletions
+29
-10
fs/cifs/cifsencrypt.c
fs/cifs/cifsencrypt.c
+7
-1
fs/cifs/cifsfs.c
fs/cifs/cifsfs.c
+7
-4
fs/cifs/connect.c
fs/cifs/connect.c
+12
-1
fs/cifs/inode.c
fs/cifs/inode.c
+2
-0
fs/cifs/link.c
fs/cifs/link.c
+1
-4
No files found.
fs/cifs/cifsencrypt.c
View file @
0d6be9f4
...
...
@@ -153,7 +153,7 @@ int CalcNTLMv2_partial_mac_key(struct cifsSesInfo * ses, struct nls_table * nls_
wchar_t
*
unicode_buf
;
unsigned
int
i
,
user_name_len
,
dom_name_len
;
if
(
ses
)
if
(
ses
==
NULL
)
return
-
EINVAL
;
E_md4hash
(
ses
->
password
,
temp_hash
);
...
...
@@ -167,7 +167,13 @@ int CalcNTLMv2_partial_mac_key(struct cifsSesInfo * ses, struct nls_table * nls_
return
-
EINVAL
;
ucase_buf
=
kmalloc
((
MAX_USERNAME_SIZE
+
1
),
GFP_KERNEL
);
if
(
ucase_buf
==
NULL
)
return
-
ENOMEM
;
unicode_buf
=
kmalloc
((
MAX_USERNAME_SIZE
+
1
)
*
4
,
GFP_KERNEL
);
if
(
unicode_buf
==
NULL
)
{
kfree
(
ucase_buf
);
return
-
ENOMEM
;
}
for
(
i
=
0
;
i
<
user_name_len
;
i
++
)
ucase_buf
[
i
]
=
nls_info
->
charset2upper
[(
int
)
ses
->
userName
[
i
]];
...
...
fs/cifs/cifsfs.c
View file @
0d6be9f4
...
...
@@ -756,11 +756,14 @@ init_cifs(void)
if
(
!
rc
)
{
rc
=
register_filesystem
(
&
cifs_fs_type
);
if
(
!
rc
)
{
kernel_thread
(
cifs_oplock_thread
,
NULL
,
rc
=
(
int
)
kernel_thread
(
cifs_oplock_thread
,
NULL
,
CLONE_FS
|
CLONE_FILES
|
CLONE_VM
);
return
rc
;
/* Success */
}
else
cifs_destroy_request_bufs
();
if
(
rc
>
0
)
return
0
;
else
cERROR
(
1
,(
"error %d create oplock thread"
,
rc
));
}
cifs_destroy_request_bufs
();
}
cifs_destroy_mids
();
}
...
...
fs/cifs/connect.c
View file @
0d6be9f4
...
...
@@ -1314,8 +1314,19 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
so no need to spinlock this init of tcpStatus */
srvTcp
->
tcpStatus
=
CifsNew
;
init_MUTEX
(
&
srvTcp
->
tcpSem
);
kernel_thread
((
void
*
)(
void
*
)
cifs_demultiplex_thread
,
srvTcp
,
rc
=
(
int
)
kernel_thread
((
void
*
)(
void
*
)
cifs_demultiplex_thread
,
srvTcp
,
CLONE_FS
|
CLONE_FILES
|
CLONE_VM
);
if
(
rc
<
0
)
{
rc
=
-
ENOMEM
;
sock_release
(
csocket
);
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
if
(
volume_info
.
password
)
kfree
(
volume_info
.
password
);
FreeXid
(
xid
);
return
rc
;
}
else
rc
=
0
;
memcpy
(
srvTcp
->
workstation_RFC1001_name
,
volume_info
.
source_rfc1001_name
,
16
);
}
}
...
...
fs/cifs/inode.c
View file @
0d6be9f4
...
...
@@ -201,6 +201,8 @@ cifs_get_inode_info(struct inode **pinode, const unsigned char *search_path,
/* if file info not passed in then get it from server */
if
(
pfindData
==
NULL
)
{
buf
=
kmalloc
(
sizeof
(
FILE_ALL_INFO
),
GFP_KERNEL
);
if
(
buf
==
NULL
)
return
-
ENOMEM
;
pfindData
=
(
FILE_ALL_INFO
*
)
buf
;
/* could do find first instead but this returns more info */
rc
=
CIFSSMBQPathInfo
(
xid
,
pTcon
,
search_path
,
pfindData
,
...
...
fs/cifs/link.c
View file @
0d6be9f4
...
...
@@ -297,10 +297,7 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
if
(
referrals
)
kfree
(
referrals
);
kfree
(
tmp_path
);
if
(
referrals
)
{
kfree
(
referrals
);
}
}
}
/* BB add code like else decode referrals then memcpy to
tmpbuffer and free referrals string array BB */
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment