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
d6f7aa27
Commit
d6f7aa27
authored
Jun 13, 2015
by
James Morris
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'smack-for-4.2-stacked' of
https://github.com/cschaufler/smack-next
into next
parents
9fc2b4b4
54302094
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
security/smack/smackfs.c
security/smack/smackfs.c
+9
-7
No files found.
security/smack/smackfs.c
View file @
d6f7aa27
...
@@ -2253,8 +2253,8 @@ static const struct file_operations smk_access2_ops = {
...
@@ -2253,8 +2253,8 @@ static const struct file_operations smk_access2_ops = {
static
ssize_t
smk_write_revoke_subj
(
struct
file
*
file
,
const
char
__user
*
buf
,
static
ssize_t
smk_write_revoke_subj
(
struct
file
*
file
,
const
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
size_t
count
,
loff_t
*
ppos
)
{
{
char
*
data
=
NULL
;
char
*
data
;
const
char
*
cp
=
NULL
;
const
char
*
cp
;
struct
smack_known
*
skp
;
struct
smack_known
*
skp
;
struct
smack_rule
*
sp
;
struct
smack_rule
*
sp
;
struct
list_head
*
rule_list
;
struct
list_head
*
rule_list
;
...
@@ -2276,18 +2276,18 @@ static ssize_t smk_write_revoke_subj(struct file *file, const char __user *buf,
...
@@ -2276,18 +2276,18 @@ static ssize_t smk_write_revoke_subj(struct file *file, const char __user *buf,
if
(
copy_from_user
(
data
,
buf
,
count
)
!=
0
)
{
if
(
copy_from_user
(
data
,
buf
,
count
)
!=
0
)
{
rc
=
-
EFAULT
;
rc
=
-
EFAULT
;
goto
free_out
;
goto
out_data
;
}
}
cp
=
smk_parse_smack
(
data
,
count
);
cp
=
smk_parse_smack
(
data
,
count
);
if
(
IS_ERR
(
cp
))
{
if
(
IS_ERR
(
cp
))
{
rc
=
PTR_ERR
(
cp
);
rc
=
PTR_ERR
(
cp
);
goto
free_out
;
goto
out_data
;
}
}
skp
=
smk_find_entry
(
cp
);
skp
=
smk_find_entry
(
cp
);
if
(
skp
==
NULL
)
if
(
skp
==
NULL
)
goto
free_out
;
goto
out_cp
;
rule_list
=
&
skp
->
smk_rules
;
rule_list
=
&
skp
->
smk_rules
;
rule_lock
=
&
skp
->
smk_rules_lock
;
rule_lock
=
&
skp
->
smk_rules_lock
;
...
@@ -2299,9 +2299,11 @@ static ssize_t smk_write_revoke_subj(struct file *file, const char __user *buf,
...
@@ -2299,9 +2299,11 @@ static ssize_t smk_write_revoke_subj(struct file *file, const char __user *buf,
mutex_unlock
(
rule_lock
);
mutex_unlock
(
rule_lock
);
free_out:
out_cp:
kfree
(
data
);
kfree
(
cp
);
kfree
(
cp
);
out_data:
kfree
(
data
);
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