Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
0ac8591d
Commit
0ac8591d
authored
Jan 22, 2021
by
Olivier Deprez
Committed by
TrustedFirmware Code Review
Jan 22, 2021
Browse files
Merge "DebugFS: Check channel index before calling clone function" into integration
parents
0b2b83ea
b226c747
Changes
2
Show whitespace changes
Inline
Side-by-side
lib/debugfs/dev.c
View file @
0ac8591d
/*
/*
* Copyright (c) 2019, Arm Limited. All rights reserved.
* Copyright (c) 2019
-2021
, Arm Limited. All rights reserved.
*
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-License-Identifier: BSD-3-Clause
*/
*/
...
@@ -333,6 +333,10 @@ noent:
...
@@ -333,6 +333,10 @@ noent:
******************************************************************************/
******************************************************************************/
chan_t
*
clone
(
chan_t
*
c
,
chan_t
*
nc
)
chan_t
*
clone
(
chan_t
*
c
,
chan_t
*
nc
)
{
{
if
(
c
->
index
==
NODEV
)
{
return
NULL
;
}
return
devtab
[
c
->
index
]
->
clone
(
c
,
nc
);
return
devtab
[
c
->
index
]
->
clone
(
c
,
nc
);
}
}
...
...
lib/debugfs/devfip.c
View file @
0ac8591d
/*
/*
* Copyright (c) 2019-202
0
, Arm Limited. All rights reserved.
* Copyright (c) 2019-202
1
, Arm Limited. All rights reserved.
*
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-License-Identifier: BSD-3-Clause
*/
*/
...
@@ -129,7 +129,10 @@ static int fipgen(chan_t *c, const dirtab_t *tab, int ntab, int n, dir_t *dir)
...
@@ -129,7 +129,10 @@ static int fipgen(chan_t *c, const dirtab_t *tab, int ntab, int n, dir_t *dir)
panic
();
panic
();
}
}
clone
(
archives
[
c
->
dev
].
c
,
&
nc
);
if
(
clone
(
archives
[
c
->
dev
].
c
,
&
nc
)
==
NULL
)
{
panic
();
}
fip
=
&
archives
[
nc
.
dev
];
fip
=
&
archives
[
nc
.
dev
];
off
=
STOC_HEADER
;
off
=
STOC_HEADER
;
...
@@ -202,7 +205,9 @@ static int fipread(chan_t *c, void *buf, int n)
...
@@ -202,7 +205,9 @@ static int fipread(chan_t *c, void *buf, int n)
panic
();
panic
();
}
}
clone
(
fip
->
c
,
&
cs
);
if
(
clone
(
fip
->
c
,
&
cs
)
==
NULL
)
{
panic
();
}
size
=
fip
->
size
[
c
->
qid
];
size
=
fip
->
size
[
c
->
qid
];
if
(
c
->
offset
>=
size
)
{
if
(
c
->
offset
>=
size
)
{
...
...
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