projects/linux·commit 754beeec

Merge tag 'char-misc-5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

754beeec · Linus Torvalds <[email protected]> · 2020-02-03 14:57:33 +00:00

Pull char/misc fix from Greg KH:
 "Here is a single patch, that fixes up a commit that came in the
  previous char/misc merge.

  It fixes a bug in the hpet driver that everyone keeps tripping over in
  their automated testing. Good thing is, people are catching it. Bad
  thing it wasn't caught by anyone testing before this. Oh well...

  This has been in linux-next for a few days with no reported issues"

* tag 'char-misc-5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  char: hpet: Fix out-of-bounds read bug
Commit
754beeec1d9024eef0db8dc4be2636331dd413c6
Parents
2367da5b · 98c49f17

Merge commit. Changes below are compared with the first parent: 2367da5b.

Changes

1 files changed · +1 −1

FileStatusAddDelContent
drivers/char/hpet.cmodified+1−1View file

drivers/char/hpet.c

View file
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index aed2c45..ed3b7da 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -855,7 +855,7 @@ int hpet_alloc(struct hpet_data *hdp)
return 0;
}
- hpetp = kzalloc(struct_size(hpetp, hp_dev, hdp->hd_nirqs - 1),
+ hpetp = kzalloc(struct_size(hpetp, hp_dev, hdp->hd_nirqs),
GFP_KERNEL);
if (!hpetp)