]> Git Repo - J-linux.git/commitdiff
Merge tag 'hid-for-linus-20241105' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <[email protected]>
Wed, 6 Nov 2024 17:49:54 +0000 (07:49 -1000)
committerLinus Torvalds <[email protected]>
Wed, 6 Nov 2024 17:49:54 +0000 (07:49 -1000)
Pull HID fix from Jiri Kosina:

 - report buffer sanitization fix for HID core (Jiri Kosina)

* tag 'hid-for-linus-20241105' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: core: zero-initialize the report buffer

1  2 
drivers/hid/hid-core.c

diff --combined drivers/hid/hid-core.c
index 612ee6ddfc8db01228f9a4b960c709713864ac23,4aee4eae50fd38b4ec28b1ce6e132c59abf7c479..582fd234eec7892c3e0f0a64884d4c9bd054cc68
@@@ -20,7 -20,7 +20,7 @@@
  #include <linux/list.h>
  #include <linux/mm.h>
  #include <linux/spinlock.h>
 -#include <asm/unaligned.h>
 +#include <linux/unaligned.h>
  #include <asm/byteorder.h>
  #include <linux/input.h>
  #include <linux/wait.h>
@@@ -1875,7 -1875,7 +1875,7 @@@ u8 *hid_alloc_report_buf(struct hid_rep
  
        u32 len = hid_report_len(report) + 7;
  
-       return kmalloc(len, flags);
+       return kzalloc(len, flags);
  }
  EXPORT_SYMBOL_GPL(hid_alloc_report_buf);
  
This page took 0.051279 seconds and 4 git commands to generate.