Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Calling fswait can cause the kernel to crash. #272

Open
mxlgv opened this issue Apr 12, 2023 · 2 comments
Open

Calling fswait can cause the kernel to crash. #272

mxlgv opened this issue Apr 12, 2023 · 2 comments

Comments

@mxlgv
Copy link

mxlgv commented Apr 12, 2023

Here is the code that causes the kernel to crash:

#include <sys/fswait.h>

int main(void)
{
    int fds[2];
    fswait(-1, fds);

    return 0;
}

Fix please.

@klange
Copy link
Owner

klange commented Apr 12, 2023

Sounds like this is a running theme - maybe we should collect as many instances of these unintended uses of signed values as we can in one place?

Should be fixed with 534aca2

@mxlgv
Copy link
Author

mxlgv commented Apr 12, 2023

Fine. The next time I find more such problems, I will issue a common issue for them.
Or you can create an issue now and move the found similar issues there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants