Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
47c786e7
Commit
47c786e7
authored
Oct 11, 2005
by
Steve French
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CIFS] Add null malloc response check in notify experimental code
Signed-off-by: Steve French (sfrench@us.ibm.com)
parent
1047abc1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
fs/cifs/cifs_debug.c
fs/cifs/cifs_debug.c
+1
-1
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+19
-13
No files found.
fs/cifs/cifs_debug.c
View file @
47c786e7
...
@@ -217,7 +217,7 @@ cifs_stats_write(struct file *file, const char __user *buffer,
...
@@ -217,7 +217,7 @@ cifs_stats_write(struct file *file, const char __user *buffer,
if
(
rc
)
if
(
rc
)
return
rc
;
return
rc
;
if
(
c
==
'1'
||
c
==
'y'
||
c
==
'Y'
)
{
if
(
c
==
'1'
||
c
==
'y'
||
c
==
'Y'
||
c
==
'0'
)
{
read_lock
(
&
GlobalSMBSeslock
);
read_lock
(
&
GlobalSMBSeslock
);
list_for_each
(
tmp
,
&
GlobalTreeConnectionList
)
{
list_for_each
(
tmp
,
&
GlobalTreeConnectionList
)
{
tcon
=
list_entry
(
tmp
,
struct
cifsTconInfo
,
tcon
=
list_entry
(
tmp
,
struct
cifsTconInfo
,
...
...
fs/cifs/cifssmb.c
View file @
47c786e7
...
@@ -4294,20 +4294,26 @@ int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon,
...
@@ -4294,20 +4294,26 @@ int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon,
cFYI
(
1
,
(
"Error in Notify = %d"
,
rc
));
cFYI
(
1
,
(
"Error in Notify = %d"
,
rc
));
}
else
{
}
else
{
/* Add file to outstanding requests */
/* Add file to outstanding requests */
/* BB change to kmem cache alloc */
dnotify_req
=
(
struct
dir_notify_req
*
)
kmalloc
(
dnotify_req
=
(
struct
dir_notify_req
*
)
kmalloc
(
sizeof
(
struct
dir_notify_req
),
GFP_KERNEL
);
sizeof
(
struct
dir_notify_req
),
dnotify_req
->
Pid
=
pSMB
->
hdr
.
Pid
;
GFP_KERNEL
);
dnotify_req
->
PidHigh
=
pSMB
->
hdr
.
PidHigh
;
if
(
dnotify_req
)
{
dnotify_req
->
Mid
=
pSMB
->
hdr
.
Mid
;
dnotify_req
->
Pid
=
pSMB
->
hdr
.
Pid
;
dnotify_req
->
Tid
=
pSMB
->
hdr
.
Tid
;
dnotify_req
->
PidHigh
=
pSMB
->
hdr
.
PidHigh
;
dnotify_req
->
Uid
=
pSMB
->
hdr
.
Uid
;
dnotify_req
->
Mid
=
pSMB
->
hdr
.
Mid
;
dnotify_req
->
netfid
=
netfid
;
dnotify_req
->
Tid
=
pSMB
->
hdr
.
Tid
;
dnotify_req
->
pfile
=
pfile
;
dnotify_req
->
Uid
=
pSMB
->
hdr
.
Uid
;
dnotify_req
->
filter
=
filter
;
dnotify_req
->
netfid
=
netfid
;
dnotify_req
->
multishot
=
multishot
;
dnotify_req
->
pfile
=
pfile
;
spin_lock
(
&
GlobalMid_Lock
);
dnotify_req
->
filter
=
filter
;
list_add_tail
(
&
dnotify_req
->
lhead
,
&
GlobalDnotifyReqList
);
dnotify_req
->
multishot
=
multishot
;
spin_unlock
(
&
GlobalMid_Lock
);
spin_lock
(
&
GlobalMid_Lock
);
list_add_tail
(
&
dnotify_req
->
lhead
,
&
GlobalDnotifyReqList
);
spin_unlock
(
&
GlobalMid_Lock
);
}
else
rc
=
-
ENOMEM
;
}
}
cifs_buf_release
(
pSMB
);
cifs_buf_release
(
pSMB
);
return
rc
;
return
rc
;
...
...
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