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
4e09bf0b
Commit
4e09bf0b
authored
Apr 14, 2003
by
Andrew Morton
Committed by
Linus Torvalds
Apr 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] missing file_lock conversions
A few places were missing the rwlock->spinlock conversion.
parent
9c22f1bc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
15 deletions
+15
-15
arch/mips/kernel/irixioctl.c
arch/mips/kernel/irixioctl.c
+2
-2
net/ipv4/netfilter/ipt_owner.c
net/ipv4/netfilter/ipt_owner.c
+8
-8
net/ipv6/netfilter/ip6t_owner.c
net/ipv6/netfilter/ip6t_owner.c
+5
-5
No files found.
arch/mips/kernel/irixioctl.c
View file @
4e09bf0b
...
@@ -34,7 +34,7 @@ static struct tty_struct *get_tty(int fd)
...
@@ -34,7 +34,7 @@ static struct tty_struct *get_tty(int fd)
struct
file
*
filp
;
struct
file
*
filp
;
struct
tty_struct
*
ttyp
=
NULL
;
struct
tty_struct
*
ttyp
=
NULL
;
read
_lock
(
&
current
->
files
->
file_lock
);
spin
_lock
(
&
current
->
files
->
file_lock
);
filp
=
fcheck
(
fd
);
filp
=
fcheck
(
fd
);
if
(
filp
&&
filp
->
private_data
)
{
if
(
filp
&&
filp
->
private_data
)
{
ttyp
=
(
struct
tty_struct
*
)
filp
->
private_data
;
ttyp
=
(
struct
tty_struct
*
)
filp
->
private_data
;
...
@@ -42,7 +42,7 @@ static struct tty_struct *get_tty(int fd)
...
@@ -42,7 +42,7 @@ static struct tty_struct *get_tty(int fd)
if
(
ttyp
->
magic
!=
TTY_MAGIC
)
if
(
ttyp
->
magic
!=
TTY_MAGIC
)
ttyp
=
NULL
;
ttyp
=
NULL
;
}
}
read
_unlock
(
&
current
->
files
->
file_lock
);
spin
_unlock
(
&
current
->
files
->
file_lock
);
return
ttyp
;
return
ttyp
;
}
}
...
...
net/ipv4/netfilter/ipt_owner.c
View file @
4e09bf0b
...
@@ -26,16 +26,16 @@ match_comm(const struct sk_buff *skb, const char *comm)
...
@@ -26,16 +26,16 @@ match_comm(const struct sk_buff *skb, const char *comm)
task_lock
(
p
);
task_lock
(
p
);
files
=
p
->
files
;
files
=
p
->
files
;
if
(
files
)
{
if
(
files
)
{
read
_lock
(
&
files
->
file_lock
);
spin
_lock
(
&
files
->
file_lock
);
for
(
i
=
0
;
i
<
files
->
max_fds
;
i
++
)
{
for
(
i
=
0
;
i
<
files
->
max_fds
;
i
++
)
{
if
(
fcheck_files
(
files
,
i
)
==
skb
->
sk
->
socket
->
file
)
{
if
(
fcheck_files
(
files
,
i
)
==
skb
->
sk
->
socket
->
file
)
{
read
_unlock
(
&
files
->
file_lock
);
spin
_unlock
(
&
files
->
file_lock
);
task_unlock
(
p
);
task_unlock
(
p
);
read_unlock
(
&
tasklist_lock
);
read_unlock
(
&
tasklist_lock
);
return
1
;
return
1
;
}
}
}
}
read
_unlock
(
&
files
->
file_lock
);
spin
_unlock
(
&
files
->
file_lock
);
}
}
task_unlock
(
p
);
task_unlock
(
p
);
}
while_each_thread
(
g
,
p
);
}
while_each_thread
(
g
,
p
);
...
@@ -57,16 +57,16 @@ match_pid(const struct sk_buff *skb, pid_t pid)
...
@@ -57,16 +57,16 @@ match_pid(const struct sk_buff *skb, pid_t pid)
task_lock
(
p
);
task_lock
(
p
);
files
=
p
->
files
;
files
=
p
->
files
;
if
(
files
)
{
if
(
files
)
{
read
_lock
(
&
files
->
file_lock
);
spin
_lock
(
&
files
->
file_lock
);
for
(
i
=
0
;
i
<
files
->
max_fds
;
i
++
)
{
for
(
i
=
0
;
i
<
files
->
max_fds
;
i
++
)
{
if
(
fcheck_files
(
files
,
i
)
==
skb
->
sk
->
socket
->
file
)
{
if
(
fcheck_files
(
files
,
i
)
==
skb
->
sk
->
socket
->
file
)
{
read
_unlock
(
&
files
->
file_lock
);
spin
_unlock
(
&
files
->
file_lock
);
task_unlock
(
p
);
task_unlock
(
p
);
read_unlock
(
&
tasklist_lock
);
read_unlock
(
&
tasklist_lock
);
return
1
;
return
1
;
}
}
}
}
read
_unlock
(
&
files
->
file_lock
);
spin
_unlock
(
&
files
->
file_lock
);
}
}
task_unlock
(
p
);
task_unlock
(
p
);
out:
out:
...
@@ -90,14 +90,14 @@ match_sid(const struct sk_buff *skb, pid_t sid)
...
@@ -90,14 +90,14 @@ match_sid(const struct sk_buff *skb, pid_t sid)
task_lock
(
p
);
task_lock
(
p
);
files
=
p
->
files
;
files
=
p
->
files
;
if
(
files
)
{
if
(
files
)
{
read
_lock
(
&
files
->
file_lock
);
spin
_lock
(
&
files
->
file_lock
);
for
(
i
=
0
;
i
<
files
->
max_fds
;
i
++
)
{
for
(
i
=
0
;
i
<
files
->
max_fds
;
i
++
)
{
if
(
fcheck_files
(
files
,
i
)
==
file
)
{
if
(
fcheck_files
(
files
,
i
)
==
file
)
{
found
=
1
;
found
=
1
;
break
;
break
;
}
}
}
}
read
_unlock
(
&
files
->
file_lock
);
spin
_unlock
(
&
files
->
file_lock
);
}
}
task_unlock
(
p
);
task_unlock
(
p
);
if
(
found
)
if
(
found
)
...
...
net/ipv6/netfilter/ip6t_owner.c
View file @
4e09bf0b
...
@@ -29,16 +29,16 @@ match_pid(const struct sk_buff *skb, pid_t pid)
...
@@ -29,16 +29,16 @@ match_pid(const struct sk_buff *skb, pid_t pid)
task_lock
(
p
);
task_lock
(
p
);
files
=
p
->
files
;
files
=
p
->
files
;
if
(
files
)
{
if
(
files
)
{
read
_lock
(
&
files
->
file_lock
);
spin
_lock
(
&
files
->
file_lock
);
for
(
i
=
0
;
i
<
files
->
max_fds
;
i
++
)
{
for
(
i
=
0
;
i
<
files
->
max_fds
;
i
++
)
{
if
(
fcheck_files
(
files
,
i
)
==
skb
->
sk
->
socket
->
file
)
{
if
(
fcheck_files
(
files
,
i
)
==
skb
->
sk
->
socket
->
file
)
{
read
_unlock
(
&
files
->
file_lock
);
spin
_unlock
(
&
files
->
file_lock
);
task_unlock
(
p
);
task_unlock
(
p
);
read_unlock
(
&
tasklist_lock
);
read_unlock
(
&
tasklist_lock
);
return
1
;
return
1
;
}
}
}
}
read
_unlock
(
&
files
->
file_lock
);
spin
_unlock
(
&
files
->
file_lock
);
}
}
task_unlock
(
p
);
task_unlock
(
p
);
out:
out:
...
@@ -62,14 +62,14 @@ match_sid(const struct sk_buff *skb, pid_t sid)
...
@@ -62,14 +62,14 @@ match_sid(const struct sk_buff *skb, pid_t sid)
task_lock
(
p
);
task_lock
(
p
);
files
=
p
->
files
;
files
=
p
->
files
;
if
(
files
)
{
if
(
files
)
{
read
_lock
(
&
files
->
file_lock
);
spin
_lock
(
&
files
->
file_lock
);
for
(
i
=
0
;
i
<
files
->
max_fds
;
i
++
)
{
for
(
i
=
0
;
i
<
files
->
max_fds
;
i
++
)
{
if
(
fcheck_files
(
files
,
i
)
==
file
)
{
if
(
fcheck_files
(
files
,
i
)
==
file
)
{
found
=
1
;
found
=
1
;
break
;
break
;
}
}
}
}
read
_unlock
(
&
files
->
file_lock
);
spin
_unlock
(
&
files
->
file_lock
);
}
}
task_unlock
(
p
);
task_unlock
(
p
);
if
(
found
)
if
(
found
)
...
...
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