Merge tag 'char-misc-4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
"Here are some small driver fixes for 4.12-rc5. Nothing major here,
just some small bugfixes found by people testing, and a MAINTAINERS
file update for the genwqe driver.

All have been in linux-next with no reported issues"

[ The cxl driver fix came in through the powerpc tree earlier ]

* tag 'char-misc-4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
cxl: Avoid double free_irq() for psl,slice interrupts
mei: make sysfs modalias format similar as uevent modalias
drivers: char: mem: Fix wraparound check to allow mappings up to the end
MAINTAINERS: Change maintainer of genwqe driver
goldfish_pipe: use GFP_ATOMIC under spin lock
firmware: vpd: do not leak kobjects
firmware: vpd: avoid potential use-after-free when destroying section
firmware: vpd: do not leave freed section attributes to the list

Changed files
+10 -8
drivers
char
firmware
google
misc
mei
platform
goldfish
+1 -1
MAINTAINERS
··· 5622 5622 5623 5623 GENWQE (IBM Generic Workqueue Card) 5624 5624 M: Frank Haverkamp <haver@linux.vnet.ibm.com> 5625 - M: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com> 5625 + M: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> 5626 5626 S: Supported 5627 5627 F: drivers/misc/genwqe/ 5628 5628
+1 -1
drivers/char/mem.c
··· 343 343 phys_addr_t offset = (phys_addr_t)vma->vm_pgoff << PAGE_SHIFT; 344 344 345 345 /* It's illegal to wrap around the end of the physical address space. */ 346 - if (offset + (phys_addr_t)size < offset) 346 + if (offset + (phys_addr_t)size - 1 < offset) 347 347 return -EINVAL; 348 348 349 349 if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size))
+4 -4
drivers/firmware/google/vpd.c
··· 136 136 info->value = value; 137 137 138 138 INIT_LIST_HEAD(&info->list); 139 - list_add_tail(&info->list, &sec->attribs); 140 139 141 140 ret = sysfs_create_bin_file(sec->kobj, &info->bin_attr); 142 141 if (ret) 143 142 goto free_info_key; 144 143 144 + list_add_tail(&info->list, &sec->attribs); 145 145 return 0; 146 146 147 147 free_info_key: ··· 158 158 struct vpd_attrib_info *temp; 159 159 160 160 list_for_each_entry_safe(info, temp, &sec->attribs, list) { 161 - kfree(info->key); 162 161 sysfs_remove_bin_file(sec->kobj, &info->bin_attr); 162 + kfree(info->key); 163 163 kfree(info); 164 164 } 165 165 } ··· 244 244 { 245 245 if (sec->enabled) { 246 246 vpd_section_attrib_destroy(sec); 247 - kobject_del(sec->kobj); 247 + kobject_put(sec->kobj); 248 248 sysfs_remove_bin_file(vpd_kobj, &sec->bin_attr); 249 249 kfree(sec->raw_name); 250 250 iounmap(sec->baseaddr); ··· 331 331 { 332 332 vpd_section_destroy(&ro_vpd); 333 333 vpd_section_destroy(&rw_vpd); 334 - kobject_del(vpd_kobj); 334 + kobject_put(vpd_kobj); 335 335 } 336 336 337 337 module_init(vpd_platform_init);
+3 -1
drivers/misc/mei/bus.c
··· 763 763 { 764 764 struct mei_cl_device *cldev = to_mei_cl_device(dev); 765 765 const uuid_le *uuid = mei_me_cl_uuid(cldev->me_cl); 766 + u8 version = mei_me_cl_ver(cldev->me_cl); 766 767 767 - return scnprintf(buf, PAGE_SIZE, "mei:%s:%pUl:", cldev->name, uuid); 768 + return scnprintf(buf, PAGE_SIZE, "mei:%s:%pUl:%02X:", 769 + cldev->name, uuid, version); 768 770 } 769 771 static DEVICE_ATTR_RO(modalias); 770 772
+1 -1
drivers/platform/goldfish/goldfish_pipe.c
··· 704 704 /* Reallocate the array */ 705 705 u32 new_capacity = 2 * dev->pipes_capacity; 706 706 struct goldfish_pipe **pipes = 707 - kcalloc(new_capacity, sizeof(*pipes), GFP_KERNEL); 707 + kcalloc(new_capacity, sizeof(*pipes), GFP_ATOMIC); 708 708 if (!pipes) 709 709 return -ENOMEM; 710 710 memcpy(pipes, dev->pipes, sizeof(*pipes) * dev->pipes_capacity);