Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'char-misc-4.10-rc4' 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 char/misc driver fixes for 4.10-rc4 that resolve
some reported issues.

The MEI driver issue resolves a lot of problems that people have been
having, as does the mem driver fix. The other minor fixes resolve
other reported issues.

All of these have been in linux-next for a while"

* tag 'char-misc-4.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
vme: Fix wrong pointer utilization in ca91cx42_slave_get
auxdisplay: fix new ht16k33 build errors
ppdev: don't print a free'd string
extcon: return error code on failure
drivers: char: mem: Fix thinkos in kmem address checks
mei: bus: enable OS version only for SPT and newer

+34 -16
+3 -3
drivers/auxdisplay/Kconfig
··· 132 132 tristate "Holtek Ht16K33 LED controller with keyscan" 133 133 depends on FB && OF && I2C && INPUT 134 134 select FB_SYS_FOPS 135 - select FB_CFB_FILLRECT 136 - select FB_CFB_COPYAREA 137 - select FB_CFB_IMAGEBLIT 135 + select FB_SYS_FILLRECT 136 + select FB_SYS_COPYAREA 137 + select FB_SYS_IMAGEBLIT 138 138 select INPUT_MATRIXKMAP 139 139 select FB_BACKLIGHT 140 140 help
+4 -6
drivers/char/mem.c
··· 381 381 char *kbuf; /* k-addr because vread() takes vmlist_lock rwlock */ 382 382 int err = 0; 383 383 384 - if (!pfn_valid(PFN_DOWN(p))) 385 - return -EIO; 386 - 387 384 read = 0; 388 385 if (p < (unsigned long) high_memory) { 389 386 low_count = count; ··· 409 412 * by the kernel or data corruption may occur 410 413 */ 411 414 kbuf = xlate_dev_kmem_ptr((void *)p); 415 + if (!virt_addr_valid(kbuf)) 416 + return -ENXIO; 412 417 413 418 if (copy_to_user(buf, kbuf, sz)) 414 419 return -EFAULT; ··· 481 482 * corruption may occur. 482 483 */ 483 484 ptr = xlate_dev_kmem_ptr((void *)p); 485 + if (!virt_addr_valid(ptr)) 486 + return -ENXIO; 484 487 485 488 copied = copy_from_user(ptr, buf, sz); 486 489 if (copied) { ··· 512 511 ssize_t virtr = 0; 513 512 char *kbuf; /* k-addr because vwrite() takes vmlist_lock rwlock */ 514 513 int err = 0; 515 - 516 - if (!pfn_valid(PFN_DOWN(p))) 517 - return -EIO; 518 514 519 515 if (p < (unsigned long) high_memory) { 520 516 unsigned long to_write = min_t(unsigned long, count,
+8 -5
drivers/char/ppdev.c
··· 290 290 struct pardevice *pdev = NULL; 291 291 char *name; 292 292 struct pardev_cb ppdev_cb; 293 + int rc = 0; 293 294 294 295 name = kasprintf(GFP_KERNEL, CHRDEV "%x", minor); 295 296 if (name == NULL) ··· 299 298 port = parport_find_number(minor); 300 299 if (!port) { 301 300 pr_warn("%s: no associated port!\n", name); 302 - kfree(name); 303 - return -ENXIO; 301 + rc = -ENXIO; 302 + goto err; 304 303 } 305 304 306 305 memset(&ppdev_cb, 0, sizeof(ppdev_cb)); ··· 309 308 ppdev_cb.private = pp; 310 309 pdev = parport_register_dev_model(port, name, &ppdev_cb, minor); 311 310 parport_put_port(port); 312 - kfree(name); 313 311 314 312 if (!pdev) { 315 313 pr_warn("%s: failed to register device!\n", name); 316 - return -ENXIO; 314 + rc = -ENXIO; 315 + goto err; 317 316 } 318 317 319 318 pp->pdev = pdev; 320 319 dev_dbg(&pdev->dev, "registered pardevice\n"); 321 - return 0; 320 + err: 321 + kfree(name); 322 + return rc; 322 323 } 323 324 324 325 static enum ieee1284_phase init_phase(int mode)
+1 -1
drivers/extcon/extcon.c
··· 453 453 dev_err(&edev->dev, "out of memory in extcon_set_state\n"); 454 454 kobject_uevent(&edev->dev.kobj, KOBJ_CHANGE); 455 455 456 - return 0; 456 + return -ENOMEM; 457 457 } 458 458 459 459 length = name_show(&edev->dev, NULL, prop_buf);
+3
drivers/misc/mei/bus-fixup.c
··· 152 152 { 153 153 int ret; 154 154 155 + if (!cldev->bus->hbm_f_os_supported) 156 + return; 157 + 155 158 ret = mei_cldev_enable(cldev); 156 159 if (ret) 157 160 return;
+2
drivers/misc/mei/debugfs.c
··· 180 180 dev->hbm_f_ev_supported); 181 181 pos += scnprintf(buf + pos, bufsz - pos, "\tFA: %01d\n", 182 182 dev->hbm_f_fa_supported); 183 + pos += scnprintf(buf + pos, bufsz - pos, "\tOS: %01d\n", 184 + dev->hbm_f_os_supported); 183 185 } 184 186 185 187 pos += scnprintf(buf + pos, bufsz - pos, "pg: %s, %s\n",
+4
drivers/misc/mei/hbm.c
··· 989 989 /* Fixed Address Client Support */ 990 990 if (dev->version.major_version >= HBM_MAJOR_VERSION_FA) 991 991 dev->hbm_f_fa_supported = 1; 992 + 993 + /* OS ver message Support */ 994 + if (dev->version.major_version >= HBM_MAJOR_VERSION_OS) 995 + dev->hbm_f_os_supported = 1; 992 996 } 993 997 994 998 /**
+6
drivers/misc/mei/hw.h
··· 76 76 #define HBM_MINOR_VERSION_FA 0 77 77 #define HBM_MAJOR_VERSION_FA 2 78 78 79 + /* 80 + * MEI version with OS ver message support 81 + */ 82 + #define HBM_MINOR_VERSION_OS 0 83 + #define HBM_MAJOR_VERSION_OS 2 84 + 79 85 /* Host bus message command opcode */ 80 86 #define MEI_HBM_CMD_OP_MSK 0x7f 81 87 /* Host bus message command RESPONSE */
+2
drivers/misc/mei/mei_dev.h
··· 406 406 * @hbm_f_ev_supported : hbm feature event notification 407 407 * @hbm_f_fa_supported : hbm feature fixed address client 408 408 * @hbm_f_ie_supported : hbm feature immediate reply to enum request 409 + * @hbm_f_os_supported : hbm feature support OS ver message 409 410 * 410 411 * @me_clients_rwsem: rw lock over me_clients list 411 412 * @me_clients : list of FW clients ··· 488 487 unsigned int hbm_f_ev_supported:1; 489 488 unsigned int hbm_f_fa_supported:1; 490 489 unsigned int hbm_f_ie_supported:1; 490 + unsigned int hbm_f_os_supported:1; 491 491 492 492 struct rw_semaphore me_clients_rwsem; 493 493 struct list_head me_clients;
+1 -1
drivers/vme/bridges/vme_ca91cx42.c
··· 464 464 vme_bound = ioread32(bridge->base + CA91CX42_VSI_BD[i]); 465 465 pci_offset = ioread32(bridge->base + CA91CX42_VSI_TO[i]); 466 466 467 - *pci_base = (dma_addr_t)vme_base + pci_offset; 467 + *pci_base = (dma_addr_t)*vme_base + pci_offset; 468 468 *size = (unsigned long long)((vme_bound - *vme_base) + granularity); 469 469 470 470 *enabled = 0;