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
bbe7d996
Commit
bbe7d996
authored
Mar 13, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: move permissions check outside of hash table lock
parent
7fec647d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
100 additions
and
100 deletions
+100
-100
arch/ppc64/kernel/htab.c
arch/ppc64/kernel/htab.c
+100
-100
No files found.
arch/ppc64/kernel/htab.c
View file @
bbe7d996
...
@@ -780,7 +780,6 @@ void hpte_init_pSeries(void)
...
@@ -780,7 +780,6 @@ void hpte_init_pSeries(void)
*/
*/
int
hash_page
(
unsigned
long
ea
,
unsigned
long
access
)
int
hash_page
(
unsigned
long
ea
,
unsigned
long
access
)
{
{
int
rc
=
1
;
void
*
pgdir
=
NULL
;
void
*
pgdir
=
NULL
;
unsigned
long
va
,
vsid
,
vpn
;
unsigned
long
va
,
vsid
,
vpn
;
unsigned
long
newpp
,
hash_ind
,
prpn
;
unsigned
long
newpp
,
hash_ind
,
prpn
;
...
@@ -856,6 +855,16 @@ int hash_page(unsigned long ea, unsigned long access)
...
@@ -856,6 +855,16 @@ int hash_page(unsigned long ea, unsigned long access)
return
1
;
return
1
;
}
}
/*
* Check the user's access rights to the page. If access should be
* prevented then send the problem up to do_page_fault.
*/
access
|=
_PAGE_PRESENT
;
if
(
access
&
~
(
pte_val
(
*
ptep
)))
{
spin_unlock
(
&
mm
->
page_table_lock
);
return
1
;
}
/*
/*
* Acquire the hash table lock to guarantee that the linux
* Acquire the hash table lock to guarantee that the linux
* pte we fetch will not change
* pte we fetch will not change
...
@@ -890,13 +899,8 @@ int hash_page(unsigned long ea, unsigned long access)
...
@@ -890,13 +899,8 @@ int hash_page(unsigned long ea, unsigned long access)
* This case is always an error and is not dealt with further here.
* This case is always an error and is not dealt with further here.
* 5. This is a Kernel address (0xC---) for which there is no page directory.
* 5. This is a Kernel address (0xC---) for which there is no page directory.
* There is no HPTE for this page.
* There is no HPTE for this page.
* Check the user's access rights to the page. If access should be prevented
* then send the problem up to do_page_fault.
*/
*/
access
|=
_PAGE_PRESENT
;
if
(
0
==
(
access
&
~
(
pte_val
(
old_pte
))
)
)
{
/*
/*
* Check if pte might have an hpte, but we have
* Check if pte might have an hpte, but we have
* no slot information
* no slot information
...
@@ -995,13 +999,9 @@ int hash_page(unsigned long ea, unsigned long access)
...
@@ -995,13 +999,9 @@ int hash_page(unsigned long ea, unsigned long access)
}
}
/* Indicate success */
rc
=
0
;
}
spin_unlock
(
&
hash_table_lock
);
spin_unlock
(
&
hash_table_lock
);
spin_unlock
(
&
mm
->
page_table_lock
);
spin_unlock
(
&
mm
->
page_table_lock
);
return
rc
;
return
0
;
}
}
void
flush_hash_page
(
unsigned
long
context
,
unsigned
long
ea
,
pte_t
pte
)
void
flush_hash_page
(
unsigned
long
context
,
unsigned
long
ea
,
pte_t
pte
)
...
...
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