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
04d0f23c
Commit
04d0f23c
authored
May 20, 2004
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
From: Dave Jones <davej@redhat.com>
Remove a local 1k array.
parent
863a6d53
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
net/sunrpc/auth_gss/auth_gss.c
net/sunrpc/auth_gss/auth_gss.c
+15
-7
No files found.
net/sunrpc/auth_gss/auth_gss.c
View file @
04d0f23c
...
...
@@ -436,13 +436,13 @@ gss_pipe_upcall(struct file *filp, struct rpc_pipe_msg *msg,
return
mlen
;
}
#define MSG_BUF_MAXSIZE 1024
static
ssize_t
gss_pipe_downcall
(
struct
file
*
filp
,
const
char
*
src
,
size_t
mlen
)
{
char
buf
[
1024
];
struct
xdr_netobj
obj
=
{
.
len
=
mlen
,
.
data
=
buf
,
};
struct
inode
*
inode
=
filp
->
f_dentry
->
d_inode
;
struct
rpc_inode
*
rpci
=
RPC_I
(
inode
);
...
...
@@ -458,11 +458,16 @@ gss_pipe_downcall(struct file *filp, const char *src, size_t mlen)
int
err
;
int
gss_err
;
if
(
mlen
>
sizeof
(
buf
))
return
-
ENOSPC
;
left
=
copy_from_user
(
buf
,
src
,
mlen
);
if
(
left
)
return
-
EFAULT
;
if
(
mlen
>
MSG_BUF_MAXSIZE
)
return
-
EFBIG
;
obj
.
data
=
kmalloc
(
mlen
,
GFP_KERNEL
);
if
(
!
obj
.
data
)
return
-
ENOMEM
;
left
=
copy_from_user
(
obj
.
data
,
src
,
mlen
);
if
(
left
)
{
err
=
-
EFAULT
;
goto
out
;
}
clnt
=
rpci
->
private
;
atomic_inc
(
&
clnt
->
cl_users
);
auth
=
clnt
->
cl_auth
;
...
...
@@ -487,12 +492,15 @@ gss_pipe_downcall(struct file *filp, const char *src, size_t mlen)
}
else
spin_unlock
(
&
gss_auth
->
lock
);
rpc_release_client
(
clnt
);
kfree
(
obj
.
data
);
dprintk
(
"RPC: gss_pipe_downcall returning length %u
\n
"
,
mlen
);
return
mlen
;
err:
if
(
ctx
)
gss_destroy_ctx
(
ctx
);
rpc_release_client
(
clnt
);
out:
kfree
(
obj
.
data
);
dprintk
(
"RPC: gss_pipe_downcall returning %d
\n
"
,
err
);
return
err
;
}
...
...
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