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

vinput: Fix multiple issue #258

Merged
merged 3 commits into from
May 14, 2024
Merged

vinput: Fix multiple issue #258

merged 3 commits into from
May 14, 2024

Commits on May 8, 2024

  1. vinput: Remove redundant memset call

    Remove redundant memset calls as memory allocated with kzalloc is
    already zeroed due to the presence of the __GFP_ZERO gfp flag.
    visitorckw committed May 8, 2024
    Configuration menu
    Copy the full SHA
    1e26743 View commit details
    Browse the repository at this point in the history
  2. vinput: Fix NULL pointer dereference caused by failed kzalloc allocation

    When kzalloc fails to allocate memory and returns NULL, it leads to a
    NULL pointer dereference error later on. Add a check for the return
    value of kzalloc. When kzalloc fails to allocate memory, it prints an
    error message and returns ERR_PTR(-ENOMEM).
    visitorckw committed May 8, 2024
    Configuration menu
    Copy the full SHA
    c068fa4 View commit details
    Browse the repository at this point in the history
  3. vinput: Fix incorrect handling on raw_copy_to_user() failure

    When raw_copy_to_user() failed in vinput_read(), the function would set
    'count' to -EFAULT and then subtract EFAULT from '*offset'. However,
    modifying '*offset' on raw_copy_to_user() failure was incorrect. Fix
    this behavior by changing count = -EFAULT to return -EFAULT.
    visitorckw committed May 8, 2024
    Configuration menu
    Copy the full SHA
    0a23ecd View commit details
    Browse the repository at this point in the history