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 'staging-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging fixes from Greg KH:
"Here are some tiny drivers/staging/ fixes for 3.11-rc3

A number of bugfixes, all pretty tiny, but resolve issues that have
been reported (the kstrtos32 change fixes a data corruption problem
that Dan found). And a MAINTAINERS file update for the comedi
drivers"

* tag 'staging-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
MAINTAINERS: Update the list of maintainers for staging/comedi driver.
staging: tidspbridge: replace strict_strtol() with kstrtos32()
staging: android: logger: Correct write offset reset on error
staging: zram: protect zram_reset_device() call
staging: gdm72xx: potential use after free in send_qos_list()
staging: drm/imx: drop "select OF_VIDEOMODE"
staging: frontier: use after free in disconnect()
staging: comedi: fix a race between do_cmd_ioctl() and read/write
staging: comedi: COMEDI_CANCEL ioctl should wake up read/write

+38 -20
+1 -1
MAINTAINERS
··· 7818 7818 7819 7819 STAGING - COMEDI 7820 7820 M: Ian Abbott <abbotti@mev.co.uk> 7821 - M: Mori Hess <fmhess@users.sourceforge.net> 7821 + M: H Hartley Sweeten <hsweeten@visionengravers.com> 7822 7822 S: Odd Fixes 7823 7823 F: drivers/staging/comedi/ 7824 7824
+3 -1
drivers/staging/android/logger.c
··· 469 469 unsigned long nr_segs, loff_t ppos) 470 470 { 471 471 struct logger_log *log = file_get_log(iocb->ki_filp); 472 - size_t orig = log->w_off; 472 + size_t orig; 473 473 struct logger_entry header; 474 474 struct timespec now; 475 475 ssize_t ret = 0; ··· 489 489 return 0; 490 490 491 491 mutex_lock(&log->mutex); 492 + 493 + orig = log->w_off; 492 494 493 495 /* 494 496 * Fix up any readers, pulling them forward to the first readable
+1 -1
drivers/staging/comedi/TODO
··· 9 9 Please send patches to Greg Kroah-Hartman <greg@kroah.com> and 10 10 copy: 11 11 Ian Abbott <abbotti@mev.co.uk> 12 - Frank Mori Hess <fmhess@users.sourceforge.net> 12 + H Hartley Sweeten <hsweeten@visionengravers.com>
+21 -11
drivers/staging/comedi/comedi_fops.c
··· 1413 1413 DPRINTK("subdevice busy\n"); 1414 1414 return -EBUSY; 1415 1415 } 1416 - s->busy = file; 1417 1416 1418 1417 /* make sure channel/gain list isn't too long */ 1419 1418 if (cmd.chanlist_len > s->len_chanlist) { 1420 1419 DPRINTK("channel/gain list too long %u > %d\n", 1421 1420 cmd.chanlist_len, s->len_chanlist); 1422 - ret = -EINVAL; 1423 - goto cleanup; 1421 + return -EINVAL; 1424 1422 } 1425 1423 1426 1424 /* make sure channel/gain list isn't too short */ 1427 1425 if (cmd.chanlist_len < 1) { 1428 1426 DPRINTK("channel/gain list too short %u < 1\n", 1429 1427 cmd.chanlist_len); 1430 - ret = -EINVAL; 1431 - goto cleanup; 1428 + return -EINVAL; 1432 1429 } 1433 1430 1434 1431 async->cmd = cmd; ··· 1435 1438 kmalloc(async->cmd.chanlist_len * sizeof(int), GFP_KERNEL); 1436 1439 if (!async->cmd.chanlist) { 1437 1440 DPRINTK("allocation failed\n"); 1438 - ret = -ENOMEM; 1439 - goto cleanup; 1441 + return -ENOMEM; 1440 1442 } 1441 1443 1442 1444 if (copy_from_user(async->cmd.chanlist, user_chanlist, ··· 1487 1491 1488 1492 comedi_set_subdevice_runflags(s, ~0, SRF_USER | SRF_RUNNING); 1489 1493 1494 + /* set s->busy _after_ setting SRF_RUNNING flag to avoid race with 1495 + * comedi_read() or comedi_write() */ 1496 + s->busy = file; 1490 1497 ret = s->do_cmd(dev, s); 1491 1498 if (ret == 0) 1492 1499 return 0; ··· 1704 1705 void *file) 1705 1706 { 1706 1707 struct comedi_subdevice *s; 1708 + int ret; 1707 1709 1708 1710 if (arg >= dev->n_subdevices) 1709 1711 return -EINVAL; ··· 1721 1721 if (s->busy != file) 1722 1722 return -EBUSY; 1723 1723 1724 - return do_cancel(dev, s); 1724 + ret = do_cancel(dev, s); 1725 + if (comedi_get_subdevice_runflags(s) & SRF_USER) 1726 + wake_up_interruptible(&s->async->wait_head); 1727 + 1728 + return ret; 1725 1729 } 1726 1730 1727 1731 /* ··· 2057 2053 2058 2054 if (!comedi_is_subdevice_running(s)) { 2059 2055 if (count == 0) { 2056 + mutex_lock(&dev->mutex); 2060 2057 if (comedi_is_subdevice_in_error(s)) 2061 2058 retval = -EPIPE; 2062 2059 else 2063 2060 retval = 0; 2064 2061 do_become_nonbusy(dev, s); 2062 + mutex_unlock(&dev->mutex); 2065 2063 } 2066 2064 break; 2067 2065 } ··· 2162 2156 2163 2157 if (n == 0) { 2164 2158 if (!comedi_is_subdevice_running(s)) { 2159 + mutex_lock(&dev->mutex); 2165 2160 do_become_nonbusy(dev, s); 2166 2161 if (comedi_is_subdevice_in_error(s)) 2167 2162 retval = -EPIPE; 2168 2163 else 2169 2164 retval = 0; 2165 + mutex_unlock(&dev->mutex); 2170 2166 break; 2171 2167 } 2172 2168 if (file->f_flags & O_NONBLOCK) { ··· 2206 2198 buf += n; 2207 2199 break; /* makes device work like a pipe */ 2208 2200 } 2209 - if (comedi_is_subdevice_idle(s) && 2210 - async->buf_read_count - async->buf_write_count == 0) { 2211 - do_become_nonbusy(dev, s); 2201 + if (comedi_is_subdevice_idle(s)) { 2202 + mutex_lock(&dev->mutex); 2203 + if (async->buf_read_count - async->buf_write_count == 0) 2204 + do_become_nonbusy(dev, s); 2205 + mutex_unlock(&dev->mutex); 2212 2206 } 2213 2207 set_current_state(TASK_RUNNING); 2214 2208 remove_wait_queue(&async->wait_head, &wait);
+1 -1
drivers/staging/frontier/alphatrack.c
··· 827 827 mutex_unlock(&dev->mtx); 828 828 usb_alphatrack_delete(dev); 829 829 } else { 830 + atomic_set(&dev->writes_pending, 0); 830 831 dev->intf = NULL; 831 832 mutex_unlock(&dev->mtx); 832 833 } 833 834 834 - atomic_set(&dev->writes_pending, 0); 835 835 mutex_unlock(&disconnect_mutex); 836 836 837 837 dev_info(&intf->dev, "Alphatrack Surface #%d now disconnected\n",
+1 -1
drivers/staging/gdm72xx/gdm_qos.c
··· 250 250 251 251 list_for_each_entry_safe(entry, n, head, list) { 252 252 list_del(&entry->list); 253 - free_qos_entry(entry); 254 253 gdm_wimax_send_tx(entry->skb, entry->dev); 254 + free_qos_entry(entry); 255 255 } 256 256 } 257 257
-1
drivers/staging/imx-drm/Kconfig
··· 33 33 config DRM_IMX_LDB 34 34 tristate "Support for LVDS displays" 35 35 depends on DRM_IMX 36 - select OF_VIDEOMODE 37 36 help 38 37 Choose this to enable the internal LVDS Display Bridge (LDB) 39 38 found on i.MX53 and i.MX6 processors.
+5 -2
drivers/staging/tidspbridge/pmgr/dbll.c
··· 1120 1120 or DYN_EXTERNAL, then mem granularity information is present 1121 1121 within the section name - only process if there are at least three 1122 1122 tokens within the section name (just a minor optimization) */ 1123 - if (count >= 3) 1124 - strict_strtol(sz_last_token, 10, (long *)&req); 1123 + if (count >= 3) { 1124 + status = kstrtos32(sz_last_token, 10, &req); 1125 + if (status) 1126 + goto func_cont; 1127 + } 1125 1128 1126 1129 if ((req == 0) || (req == 1)) { 1127 1130 if (strcmp(sz_sec_last_token, "DYN_DARAM") == 0) {
+5 -1
drivers/staging/zram/zram_drv.c
··· 527 527 size_t index; 528 528 struct zram_meta *meta; 529 529 530 - if (!zram->init_done) 530 + down_write(&zram->init_lock); 531 + if (!zram->init_done) { 532 + up_write(&zram->init_lock); 531 533 return; 534 + } 532 535 533 536 meta = zram->meta; 534 537 zram->init_done = 0; ··· 552 549 553 550 zram->disksize = 0; 554 551 set_capacity(zram->disk, 0); 552 + up_write(&zram->init_lock); 555 553 } 556 554 557 555 static void zram_init_device(struct zram *zram, struct zram_meta *meta)