lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 16 Jul 2018 19:09:04 -0700 From: Todd Poynor <toddpoynor@...il.com> To: Rob Springer <rspringer@...gle.com>, John Joseph <jnjoseph@...gle.com>, Ben Chan <benchan@...omium.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org> Cc: Zhongze Hu <frankhu@...omium.org>, Simon Que <sque@...omium.org>, Dmitry Torokhov <dtor@...omium.org>, Guenter Roeck <groeck@...omium.org>, devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org, Todd Poynor <toddpoynor@...gle.com> Subject: [PATCH 10/32] staging: gasket: fix gasket_wait_with_reschedule timeout return code From: Todd Poynor <toddpoynor@...gle.com> Return -ETIMEDOUT, not -EINVAL, on timeout, including callers. Reported-by: Dmitry Torokhov <dtor@...omium.org> Signed-off-by: Zhongze Hu <frankhu@...omium.org> Signed-off-by: Todd Poynor <toddpoynor@...gle.com> --- drivers/staging/gasket/apex_driver.c | 8 ++++---- drivers/staging/gasket/gasket_core.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket/apex_driver.c index a31937dfff836..3a83c3d4d5561 100644 --- a/drivers/staging/gasket/apex_driver.c +++ b/drivers/staging/gasket/apex_driver.c @@ -490,7 +490,7 @@ static int apex_enter_reset(struct gasket_dev *gasket_dev, uint type) gasket_log_error(gasket_dev, "DMAs did not quiesce within timeout (%d ms)", APEX_RESET_RETRY * APEX_RESET_DELAY); - return -EINVAL; + return -ETIMEDOUT; } /* - Enable GCB reset (0x1 to rg_rst_gcb) */ @@ -513,7 +513,7 @@ static int apex_enter_reset(struct gasket_dev *gasket_dev, uint type) gasket_dev, "RAM did not shut down within timeout (%d ms)", APEX_RESET_RETRY * APEX_RESET_DELAY); - return -EINVAL; + return -ETIMEDOUT; } return 0; @@ -562,7 +562,7 @@ static int apex_quit_reset(struct gasket_dev *gasket_dev, uint type) gasket_dev, "RAM did not enable within timeout (%d ms)", APEX_RESET_RETRY * APEX_RESET_DELAY); - return -EINVAL; + return -ETIMEDOUT; } /* - Wait for Reset complete. */ @@ -574,7 +574,7 @@ static int apex_quit_reset(struct gasket_dev *gasket_dev, uint type) gasket_dev, "GCB did not leave reset within timeout (%d ms)", APEX_RESET_RETRY * APEX_RESET_DELAY); - return -EINVAL; + return -ETIMEDOUT; } if (!allow_hw_clock_gating) { diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c index 248d717e1df65..803566229bfcb 100644 --- a/drivers/staging/gasket/gasket_core.c +++ b/drivers/staging/gasket/gasket_core.c @@ -2106,7 +2106,7 @@ int gasket_wait_with_reschedule( "%s timeout: reg %llx timeout (%llu ms)", __func__, offset, max_retries * delay_ms); - return -EINVAL; + return -ETIMEDOUT; } return 0; } -- 2.18.0.203.gfac676dfb9-goog
Powered by blists - more mailing lists