diff mbox series

[1/2] core: Avoid possible uninitialized pointer read (CID 209502)

Message ID 20180115051800.19398-1-cyril.bur@au1.ibm.com
State Accepted
Headers show
Series [1/2] core: Avoid possible uninitialized pointer read (CID 209502) | expand

Commit Message

Cyril Bur Jan. 15, 2018, 5:17 a.m. UTC
A likely copy and paste oversight.

Fixes: 0d84ea6b (core: Add support for quiescing OPAL)
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
---
 core/opal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nicholas Piggin Jan. 15, 2018, 1:34 p.m. UTC | #1
On Mon, 15 Jan 2018 16:17:59 +1100
Cyril Bur <cyril.bur@au1.ibm.com> wrote:

> A likely copy and paste oversight.
> 
> Fixes: 0d84ea6b (core: Add support for quiescing OPAL)
> Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>

> ---
>  core/opal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/core/opal.c b/core/opal.c
> index 1bca774c..e862b4c6 100644
> --- a/core/opal.c
> +++ b/core/opal.c
> @@ -283,7 +283,7 @@ int64_t opal_quiesce(uint32_t quiesce_type, int32_t cpu_target)
>  	if (target) {
>  		while (target->in_opal_call) {
>  			if (tb_compare(mftb(), end) == TB_AAFTERB) {
> -				printf("OPAL quiesce CPU:%04x stuck in OPAL\n", c->pir);
> +				printf("OPAL quiesce CPU:%04x stuck in OPAL\n", target->pir);
>  				stuck = true;
>  				break;
>  			}
Stewart Smith Feb. 1, 2018, 8:20 a.m. UTC | #2
Cyril Bur <cyril.bur@au1.ibm.com> writes:
> A likely copy and paste oversight.
>
> Fixes: 0d84ea6b (core: Add support for quiescing OPAL)
> Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
> ---
>  core/opal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, series merged to master as of 9b2136247e009fd0e82a88611095654f45ab0c79
diff mbox series

Patch

diff --git a/core/opal.c b/core/opal.c
index 1bca774c..e862b4c6 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -283,7 +283,7 @@  int64_t opal_quiesce(uint32_t quiesce_type, int32_t cpu_target)
 	if (target) {
 		while (target->in_opal_call) {
 			if (tb_compare(mftb(), end) == TB_AAFTERB) {
-				printf("OPAL quiesce CPU:%04x stuck in OPAL\n", c->pir);
+				printf("OPAL quiesce CPU:%04x stuck in OPAL\n", target->pir);
 				stuck = true;
 				break;
 			}