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

Mekhanik evgenii/fix 2328 2 #2333

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

EvgeniiMekhanik
Copy link
Contributor

No description provided.

@EvgeniiMekhanik EvgeniiMekhanik marked this pull request as draft January 27, 2025 22:25
`__get_free_pages` can fails in case of ENOMEM,
so we should remove WARN_ON_ONCE.
Previously there were some void functions with WARN_ON_ONCE
to check errors in them. But there are a lot of cases when
these functions can fail (for example ENOMEM), so remove
WARN_ON_ONCE and return error.
In case when some of `crypto_alloc_*` functions fails
it returns ERR_PTR not NULL, but when we call deallocation
function we check if `ctx->cipher_ctx` or `md_ctx->tfm` is
not NULL and try to deallocate it. We should check this pointer
using `IS_ERR_OR_NULL` to avoid BUG.
@EvgeniiMekhanik EvgeniiMekhanik force-pushed the MekhanikEvgenii/fix-2328-2 branch from 276e3ff to 6e9d4cc Compare January 29, 2025 15:54
@EvgeniiMekhanik EvgeniiMekhanik requested review from krizhanovsky and const-t and removed request for krizhanovsky January 29, 2025 15:54
@EvgeniiMekhanik EvgeniiMekhanik marked this pull request as ready for review January 29, 2025 15:54
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