Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scst_targ: Check prepare_to_wait_exclusive_head() return value #177

Merged
merged 2 commits into from
Jun 30, 2023

Conversation

lnocturno
Copy link
Contributor

No description provided.

@lnocturno lnocturno force-pushed the gleb/3.8/fix_scst_wait branch from c305d28 to 4266c5a Compare June 30, 2023 07:42
The scst_wait_event_interruptible_lock_irq() function now implicitly
checks for pending signals. Therefore, there is no need to check for
these signals explicitly. This patch replaces the explicit check with a
simple evaluation of the function's return value.

This patch doesn't change any functionality.
The prepare_to_wait_exclusive_head() function was modified in
commit d8894cb ("scst.h: Refactor wait_event_locked() to enhance
usability and clarity"). It now returns an error if the current
interruptible thread has pending signals.

This patch introduces the scst_wait_for_cmd() helper function for the
scst_cmd_thread(). This new function handles the return value of the
prepare_to_wait_exclusive_head() appropriately.

This patch fixes the following Coverity complaint:

    CID 321410 (#1 of 1): Unchecked return value (CHECKED_RETURN)
    check_return: Calling prepare_to_wait_exclusive_head without
    checking return value.
@lnocturno lnocturno force-pushed the gleb/3.8/fix_scst_wait branch from 4266c5a to 20c5d1e Compare June 30, 2023 07:45
@lnocturno lnocturno merged commit 86d5b21 into master Jun 30, 2023
@lnocturno lnocturno deleted the gleb/3.8/fix_scst_wait branch June 30, 2023 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant