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
nexedi
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,
...
@@ -436,13 +436,13 @@ gss_pipe_upcall(struct file *filp, struct rpc_pipe_msg *msg,
return
mlen
;
return
mlen
;
}
}
#define MSG_BUF_MAXSIZE 1024
static
ssize_t
static
ssize_t
gss_pipe_downcall
(
struct
file
*
filp
,
const
char
*
src
,
size_t
mlen
)
gss_pipe_downcall
(
struct
file
*
filp
,
const
char
*
src
,
size_t
mlen
)
{
{
char
buf
[
1024
];
struct
xdr_netobj
obj
=
{
struct
xdr_netobj
obj
=
{
.
len
=
mlen
,
.
len
=
mlen
,
.
data
=
buf
,
};
};
struct
inode
*
inode
=
filp
->
f_dentry
->
d_inode
;
struct
inode
*
inode
=
filp
->
f_dentry
->
d_inode
;
struct
rpc_inode
*
rpci
=
RPC_I
(
inode
);
struct
rpc_inode
*
rpci
=
RPC_I
(
inode
);
...
@@ -458,11 +458,16 @@ gss_pipe_downcall(struct file *filp, const char *src, size_t mlen)
...
@@ -458,11 +458,16 @@ gss_pipe_downcall(struct file *filp, const char *src, size_t mlen)
int
err
;
int
err
;
int
gss_err
;
int
gss_err
;
if
(
mlen
>
sizeof
(
buf
))
if
(
mlen
>
MSG_BUF_MAXSIZE
)
return
-
ENOSPC
;
return
-
EFBIG
;
left
=
copy_from_user
(
buf
,
src
,
mlen
);
obj
.
data
=
kmalloc
(
mlen
,
GFP_KERNEL
);
if
(
left
)
if
(
!
obj
.
data
)
return
-
EFAULT
;
return
-
ENOMEM
;
left
=
copy_from_user
(
obj
.
data
,
src
,
mlen
);
if
(
left
)
{
err
=
-
EFAULT
;
goto
out
;
}
clnt
=
rpci
->
private
;
clnt
=
rpci
->
private
;
atomic_inc
(
&
clnt
->
cl_users
);
atomic_inc
(
&
clnt
->
cl_users
);
auth
=
clnt
->
cl_auth
;
auth
=
clnt
->
cl_auth
;
...
@@ -487,12 +492,15 @@ gss_pipe_downcall(struct file *filp, const char *src, size_t mlen)
...
@@ -487,12 +492,15 @@ gss_pipe_downcall(struct file *filp, const char *src, size_t mlen)
}
else
}
else
spin_unlock
(
&
gss_auth
->
lock
);
spin_unlock
(
&
gss_auth
->
lock
);
rpc_release_client
(
clnt
);
rpc_release_client
(
clnt
);
kfree
(
obj
.
data
);
dprintk
(
"RPC: gss_pipe_downcall returning length %u
\n
"
,
mlen
);
dprintk
(
"RPC: gss_pipe_downcall returning length %u
\n
"
,
mlen
);
return
mlen
;
return
mlen
;
err:
err:
if
(
ctx
)
if
(
ctx
)
gss_destroy_ctx
(
ctx
);
gss_destroy_ctx
(
ctx
);
rpc_release_client
(
clnt
);
rpc_release_client
(
clnt
);
out:
kfree
(
obj
.
data
);
dprintk
(
"RPC: gss_pipe_downcall returning %d
\n
"
,
err
);
dprintk
(
"RPC: gss_pipe_downcall returning %d
\n
"
,
err
);
return
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