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
a0757bb5
Commit
a0757bb5
authored
Apr 03, 2002
by
Dave Kleikamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect bad JFS directory to avoid infinite loop
parent
5e4b5079
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
fs/jfs/jfs_dtree.c
fs/jfs/jfs_dtree.c
+9
-0
No files found.
fs/jfs/jfs_dtree.c
View file @
a0757bb5
...
@@ -3045,6 +3045,14 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
...
@@ -3045,6 +3045,14 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
t
=
(
dtslot_t
*
)
&
p
->
slot
[
next
];
t
=
(
dtslot_t
*
)
&
p
->
slot
[
next
];
name_ptr
+=
outlen
;
name_ptr
+=
outlen
;
d_namleft
-=
len
;
d_namleft
-=
len
;
/* Sanity Check */
if
(
d_namleft
==
0
)
{
jERROR
(
1
,(
"JFS:Dtree error: "
"ino = %ld, bn=%Ld, index = %d
\n
"
,
ip
->
i_ino
,
bn
,
i
));
updateSuper
(
ip
->
i_sb
,
FM_DIRTY
);
goto
skip_one
;
}
len
=
min
(
d_namleft
,
DTSLOTDATALEN
);
len
=
min
(
d_namleft
,
DTSLOTDATALEN
);
outlen
=
jfs_strfromUCS_le
(
name_ptr
,
t
->
name
,
outlen
=
jfs_strfromUCS_le
(
name_ptr
,
t
->
name
,
len
,
codepage
);
len
,
codepage
);
...
@@ -3056,6 +3064,7 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
...
@@ -3056,6 +3064,7 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
if
(
filldir
(
dirent
,
d_name
,
d_namlen
,
filp
->
f_pos
,
if
(
filldir
(
dirent
,
d_name
,
d_namlen
,
filp
->
f_pos
,
le32_to_cpu
(
d
->
inumber
),
DT_UNKNOWN
))
le32_to_cpu
(
d
->
inumber
),
DT_UNKNOWN
))
goto
out
;
goto
out
;
skip_one:
if
(
!
do_index
)
if
(
!
do_index
)
dtoffset
->
index
++
;
dtoffset
->
index
++
;
}
}
...
...
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