summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-02-03 14:57:33 +0000
committerLinus Torvalds <torvalds@linux-foundation.org>2020-02-03 14:57:33 +0000
commit754beeec1d9024eef0db8dc4be2636331dd413c6 (patch)
treeb87ccd28ab58ee17eca76402d99fd0c359a91786 /drivers/char
parent2367da5b51cd2819d630432e6a8876f973b1bbc3 (diff)
parent98c49f1746ac44ccc164e914b9a44183fad09f51 (diff)
Merge tag 'char-misc-5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
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
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/hpet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index aed2c45f7968..ed3b7dab678d 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)