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

model: add more locking, and resource handler #1

Merged
merged 1 commit into from
May 16, 2024

Conversation

nmanthey
Copy link
Contributor

To obtain more a precise Coverity analysis, we add more functions of the kernel to the Coverity model. This way, the analysis finds more problematic code path.

Besides adding several locking and memory allocation families, this change also modifies the IS_ERR_OR_NULL function model. When freeing the pointer in this function, many double-free patterns have been reported. Without this change, these problems have not been seen, and we did not loose any other irrelevant defects.

To obtain more a precise Coverity analysis, we add more functions
of the kernel to the Coverity model. This way, the analysis finds
more problematic code path.

Besides adding several locking and memory allocation families, this
change also modifies the IS_ERR_OR_NULL function model. When freeing
the pointer in this function, many double-free patterns have been
reported. Without this change, these problems have not been seen,
and we did not loose any other irrelevant defects.

Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
@kees
Copy link
Owner

kees commented May 16, 2024

Looks good! I guess we'll see what happens with the NULL_OR_ERR. The old way didn't work very weird either. :P

@kees kees merged commit 42c9c05 into kees:trunk May 16, 2024
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.

None yet

2 participants