mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
char/misc fixes for 4.6-rc4
Here are some small char/misc driver fixes for 4.6-rc4. Full details are in the shortlog, nothing major here. These have all been in linux-next for a while with no reported issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlcS4DQACgkQMUfUDdst+ylBIwCgtag4UtH2i+NwFiErDmmnokSz h5oAn1488h1FTiXolyA9MnmRkWlf0ZPI =aYD7 -----END PGP SIGNATURE----- Merge tag 'char-misc-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fixes from Greg KH: "Here are some small char/misc driver fixes for 4.6-rc4. Full details are in the shortlog, nothing major here. These have all been in linux-next for a while with no reported issues" * tag 'char-misc-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: lkdtm: do not leak free page on kmalloc failure lkdtm: fix memory leak of base lkdtm: fix memory leak of val extcon: palmas: Drop stray IRQF_EARLY_RESUME flag
This commit is contained in:
commit
b9f5dba225
@ -348,8 +348,7 @@ static int palmas_usb_probe(struct platform_device *pdev)
|
||||
palmas_vbus_irq_handler,
|
||||
IRQF_TRIGGER_FALLING |
|
||||
IRQF_TRIGGER_RISING |
|
||||
IRQF_ONESHOT |
|
||||
IRQF_EARLY_RESUME,
|
||||
IRQF_ONESHOT,
|
||||
"palmas_usb_vbus",
|
||||
palmas_usb);
|
||||
if (status < 0) {
|
||||
|
@ -458,8 +458,10 @@ static void lkdtm_do_action(enum ctype which)
|
||||
break;
|
||||
|
||||
val = kmalloc(len, GFP_KERNEL);
|
||||
if (!val)
|
||||
if (!val) {
|
||||
kfree(base);
|
||||
break;
|
||||
}
|
||||
|
||||
*val = 0x12345678;
|
||||
base[offset] = *val;
|
||||
@ -498,14 +500,17 @@ static void lkdtm_do_action(enum ctype which)
|
||||
}
|
||||
case CT_READ_BUDDY_AFTER_FREE: {
|
||||
unsigned long p = __get_free_page(GFP_KERNEL);
|
||||
int saw, *val = kmalloc(1024, GFP_KERNEL);
|
||||
int saw, *val;
|
||||
int *base;
|
||||
|
||||
if (!p)
|
||||
break;
|
||||
|
||||
if (!val)
|
||||
val = kmalloc(1024, GFP_KERNEL);
|
||||
if (!val) {
|
||||
free_page(p);
|
||||
break;
|
||||
}
|
||||
|
||||
base = (int *)p;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user