Linux 4.9.12
Greg KH
maintainerI'm announcing the release of the 4.9.12 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/media/uapi/v4l/pixfmt-007.rst | 23 ++++++++++---- Makefile | 2 - arch/arm/lib/getuser.S | 2 - arch/powerpc/mm/init_64.c | 3 + drivers/gpu/drm/drm_dp_mst_topology.c | 2 - drivers/gpu/drm/radeon/radeon_cursor.c | 4 +- drivers/i2c/busses/i2c-designware-core.c | 45 ++++++---------------------- drivers/i2c/busses/i2c-designware-core.h | 1 drivers/input/mouse/elan_i2c_core.c | 1 drivers/md/bcache/bcache.h | 4 +- drivers/md/bcache/btree.c | 39 ++++++++++++------------ drivers/md/bcache/btree.h | 3 - drivers/md/bcache/request.c | 4 -- drivers/md/bcache/super.c | 2 + drivers/media/usb/siano/smsusb.c | 18 ++++++++--- drivers/mmc/core/mmc.c | 4 +- drivers/ntb/ntb_transport.c | 5 +-- drivers/ntb/test/ntb_perf.c | 2 + drivers/pci/pcie/pme.c | 12 +++++++ drivers/scsi/scsi_lib.c | 3 + drivers/scsi/sg.c | 4 ++ fs/fuse/dev.c | 5 +++ fs/splice.c | 1 include/uapi/linux/videodev2.h | 7 +--- kernel/futex.c | 2 - kernel/printk/printk.c | 2 - kernel/time/timekeeping_debug.c | 4 +- 27 files changed, 112 insertions(+), 92 deletions(-)
Al Viro (1):
Fix missing sanity check in /dev/sg
Allen Hubbe (1):
NTB: ntb_transport: fix debugfs_remove_recursive
Anssi Hannula (1):
mmc: core: fix multi-bit bus width without high-speed mode
Dave Jiang (1):
ntb: ntb_perf missing dmaengine_unmap_put
Greg Kroah-Hartman (1):
Linux 4.9.12
Hans Verkuil (1):
videodev2.h: go back to limited range Y'CbCr for SRGB and, ADOBERGB
IHARA Hiroka (1):
Input: elan_i2c - add ELAN0605 to the ACPI table
Jarkko Nikula (1):
Revert "i2c: designware: detect when dynamic tar update is possible"
Johannes Thumshirn (1):
scsi: don't BUG_ON() empty DMA transfers
Kees Cook (1):
ARM: 8658/1: uaccess: fix zeroing of 64-bit get_user()
Kent Overstreet (1):
bcache: Make gc wakeup sane, remove set_task_state()
Mauro Carvalho Chehab (1):
siano: make it work again with CONFIG_VMAP_STACK
Michel Dänzer (1):
drm/radeon: Use mode h/vdisplay fields to hide out of bounds HW cursor
Miklos Szeredi (2):
vfs: fix uninitialized flags in splice_to_pipe()
fuse: fix uninitialized flags in pipe_buffer
Paul Mackerras (1):
powerpc/64: Disable use of radix under a hypervisor
Pierre-Louis Bossart (1):
drm/dp/mst: fix kernel oops when turning off secondary monitor
Sahitya Tummala (1):
fuse: fix use after free issue in fuse_dev_do_read()
Sergey Senozhatsky (2):
printk: use rcuidle console tracepoint
timekeeping: Use deferred printk() in debug code
Thomas VanSelus (1):
ntb_transport: Pick an unused queue
Yang Yang (1):
futex: Move futex_init() to core_initcall
Yinghai Lu (1):
PCI/PME: Restore pcie_pme_driver.remove
Greg KH
maintainerDocumentation/media/uapi/v4l/pixfmt-007.rst +17 -6
@@ -211,7 +211,13 @@ Colorspace sRGB (V4L2_COLORSPACE_SRGB) The :ref:`srgb` standard defines the colorspace used by most webcams and computer graphics. The default transfer function is ``V4L2_XFER_FUNC_SRGB``. The default Y'CbCr encoding is -``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is full range. +``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is limited range. + +Note that the :ref:`sycc` standard specifies full range quantization, +however all current capture hardware supported by the kernel convert +R'G'B' to limited range Y'CbCr. So choosing full range as the default +would break how applications interpret the quantization range. + The chromaticities of the primary colors and the white reference are:
@@ -276,7 +282,7 @@ the following ``V4L2_YCBCR_ENC_601`` encoding as defined by :ref:`sycc`: Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. This transform is identical to one defined in SMPTE -170M/BT.601. The Y'CbCr quantization is full range. +170M/BT.601. The Y'CbCr quantization is limited range. .. _col-adobergb:
@@ -288,10 +294,15 @@ The :ref:`adobergb` standard defines the colorspace used by computer graphics that use the AdobeRGB colorspace. This is also known as the :ref:`oprgb` standard. The default transfer function is ``V4L2_XFER_FUNC_ADOBERGB``. The default Y'CbCr encoding is -``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is full -range. The chromaticities of the primary colors and the white reference -are: +``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is limited +range. + +Note that the :ref:`oprgb` standard specifies full range quantization, +however all current capture hardware supported by the kernel convert +R'G'B' to limited range Y'CbCr. So choosing full range as the default +would break how applications interpret the quantization range. +The chromaticities of the primary colors and the white reference are: .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
@@ -344,7 +355,7 @@ the following ``V4L2_YCBCR_ENC_601`` encoding: Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. This transform is identical to one defined in SMPTE -170M/BT.601. The Y'CbCr quantization is full range. +170M/BT.601. The Y'CbCr quantization is limited range. .. _col-bt2020:
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 11 +SUBLEVEL = 12 EXTRAVERSION = NAME = Roaring Lionus
arch/arm/lib/getuser.S +1 -1
@@ -67,7 +67,7 @@ ENTRY(__get_user_4) ENDPROC(__get_user_4) ENTRY(__get_user_8) - check_uaccess r0, 8, r1, r2, __get_user_bad + check_uaccess r0, 8, r1, r2, __get_user_bad8 #ifdef CONFIG_THUMB2_KERNEL 5: TUSER(ldr) r2, [r0] 6: TUSER(ldr) r3, [r0, #4]
arch/powerpc/mm/init_64.c +2 -1
@@ -424,7 +424,8 @@ early_param("disable_radix", parse_disable_radix);void __init mmu_early_init_devtree (void ) {/* Disable radix mode based on kernel command line. */ -if (disable_radix) +/* We don't yet have the machinery to do radix as a guest. */ +if (disable_radix || !(mfmsr () &MSR_HV )) cur_cpu_spec->mmu_features &= ~MMU_FTR_TYPE_RADIX ;if (early_radix_enabled ())
drivers/gpu/drm/drm_dp_mst_topology.c +1 -1
@@ -1817,7 +1817,7 @@ int drm_dp_update_payload_part1(struct drm_dp_mst_topology_mgr *mgr) mgr->payloads[i].vcpi = req_payload.vcpi; }else if (mgr->payloads[i].num_slots) { mgr->payloads[i].num_slots =0 ; -drm_dp_destroy_payload_step1 (mgr, port, port->vcpi.vcpi, &mgr->payloads[i]); +drm_dp_destroy_payload_step1 (mgr, port, mgr->payloads[i].vcpi, &mgr->payloads[i]); req_payload.payload_state = mgr->payloads[i].payload_state; mgr->payloads[i].start_slot =0 ; }
drivers/gpu/drm/radeon/radeon_cursor.c +2 -2
@@ -205,8 +205,8 @@ static int radeon_cursor_move_locked(struct drm_crtc *crtc, int x, int y) }if (x <= (crtc->x - w) || y <= (crtc->y - radeon_crtc->cursor_height) || - x >= (crtc->x + crtc->mode.crtc_hdisplay) || - y >= (crtc->y + crtc->mode.crtc_vdisplay)) + x >= (crtc->x + crtc->mode.hdisplay) || + y >= (crtc->y + crtc->mode.vdisplay)) goto out_of_bounds; x += xorigin;
drivers/i2c/busses/i2c-designware-core.c +11 -34
74 lines not on this page · raw message
drivers/i2c/busses/i2c-designware-core.h +0 -1
@@ -117,7 +117,6 @@ struct dw_i2c_dev {int (*acquire_lock)(struct dw_i2c_dev *dev);void (*release_lock)(struct dw_i2c_dev *dev);bool pm_runtime_disabled; -bool dynamic_tar_update_enabled; };#define ACCESS_SWAP 0x00000001
drivers/input/mouse/elan_i2c_core.c +1 -0
@@ -1232,6 +1232,7 @@ static const struct acpi_device_id elan_acpi_id[] = { { "ELAN0000", 0 }, { "ELAN0100", 0 }, { "ELAN0600", 0 }, + { "ELAN0605", 0 }, { "ELAN1000", 0 }, { } };
drivers/md/bcache/bcache.h +2 -2
@@ -425,7 +425,7 @@ struct cache {* until a gc finishes - otherwise we could pointlessly burn a ton of * cpu */ - unsigned invalidate_needs_gc:1; +unsigned invalidate_needs_gc;bool discard;/* Get rid of? */
@@ -593,8 +593,8 @@ struct cache_set {/* Counts how many sectors bio_insert has added to the cache */ atomic_t sectors_to_gc; +wait_queue_head_t gc_wait; -wait_queue_head_t moving_gc_wait;struct keybuf moving_gc_keys;/* Number of moving GC bios in flight */ struct semaphore moving_in_flight;
drivers/md/bcache/btree.c +20 -19
@@ -1757,32 +1757,34 @@ static void bch_btree_gc(struct cache_set *c)bch_moving_gc (c); } -static int bch_gc_thread (void *arg) +static bool gc_should_run (struct cache_set *c) { -struct cache_set *c = arg;struct cache *ca;unsigned i; -while (1 ) { -again: -bch_btree_gc (c); +for_each_cache (ca, c, i) +if (ca->invalidate_needs_gc) +return true; -set_current_state (TASK_INTERRUPTIBLE ); -if (kthread_should_stop ()) -break ; +if (atomic_read (&c->sectors_to_gc) <0 ) +return true; -mutex_lock (&c->bucket_lock); +return false; +} -for_each_cache (ca, c, i) -if (ca->invalidate_needs_gc) { -mutex_unlock (&c->bucket_lock); -set_current_state (TASK_RUNNING ); - goto again; - } +static int bch_gc_thread (void *arg) +{ +struct cache_set *c = arg; -mutex_unlock (&c->bucket_lock); +while (1 ) { +wait_event_interruptible (c->gc_wait, +kthread_should_stop () ||gc_should_run (c)); -schedule (); +if (kthread_should_stop ()) +break ; + +set_gc_sectors (c); +bch_btree_gc (c); }return 0 ;
@@ -1790,11 +1792,10 @@ static int bch_gc_thread(void *arg)int bch_gc_thread_start (struct cache_set *c) { - c->gc_thread =kthread_create (bch_gc_thread, c,"bcache_gc" ); + c->gc_thread =kthread_run (bch_gc_thread, c,"bcache_gc" );if (IS_ERR (c->gc_thread))return PTR_ERR (c->gc_thread); -set_task_state (c->gc_thread,TASK_INTERRUPTIBLE );return 0 ; }
drivers/md/bcache/btree.h +1 -2
@@ -260,8 +260,7 @@ void bch_initial_mark_key(struct cache_set *, int, struct bkey *);static inline void wake_up_gc (struct cache_set *c) { -if (c->gc_thread) -wake_up_process (c->gc_thread); +wake_up (&c->gc_wait); }#define MAP_DONE 0
drivers/md/bcache/request.c +1 -3
@@ -196,10 +196,8 @@ static void bch_data_insert_start(struct closure *cl) struct data_insert_op *op = container_of(cl, struct data_insert_op, cl);struct bio *bio = op->bio, *n; -if (atomic_sub_return (bio_sectors (bio), &op->c->sectors_to_gc) <0 ) { -set_gc_sectors (op->c); +if (atomic_sub_return (bio_sectors (bio), &op->c->sectors_to_gc) <0 )wake_up_gc (op->c); - }if (op->bypass)return bch_data_invalidate (cl);
drivers/md/bcache/super.c +2 -0
@@ -1491,6 +1491,7 @@ struct cache_set *bch_cache_set_alloc(struct cache_sb *sb)mutex_init (&c->bucket_lock);init_waitqueue_head (&c->btree_cache_wait);init_waitqueue_head (&c->bucket_wait); +init_waitqueue_head (&c->gc_wait);sema_init (&c->uuid_write_mutex,1 );spin_lock_init (&c->btree_gc_time.lock);
@@ -1550,6 +1551,7 @@ static void run_cache_set(struct cache_set *c)for_each_cache (ca, c, i) c->nbuckets += ca->sb.nbuckets; +set_gc_sectors (c);if (CACHE_SYNC (&c->sb)) {LIST_HEAD (journal);
drivers/media/usb/siano/smsusb.c +13 -5
@@ -218,22 +218,30 @@ static int smsusb_start_streaming(struct smsusb_device_t *dev)static int smsusb_sendrequest (void *context,void *buffer,size_t size) {struct smsusb_device_t *dev = (struct smsusb_device_t *) context; -struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) buffer; -int dummy; +struct sms_msg_hdr *phdr; +int dummy, ret;if (dev->state !=SMSUSB_ACTIVE ) {pr_debug ("Device not active yet\n" );return -ENOENT ; } + phdr =kmalloc (size,GFP_KERNEL ); +if (!phdr) +return -ENOMEM ; +memcpy (phdr, buffer, size); +pr_debug ("sending %s(%d) size: %d\n" ,smscore_translate_msg (phdr->msg_type), phdr->msg_type, phdr->msg_length);smsendian_handle_tx_message ((struct sms_msg_data *) phdr); -smsendian_handle_message_header ((struct sms_msg_hdr *)buffer); -return usb_bulk_msg (dev->udev,usb_sndbulkpipe (dev->udev,2 ), - buffer, size, &dummy,1000 ); +smsendian_handle_message_header ((struct sms_msg_hdr *)phdr); + ret =usb_bulk_msg (dev->udev,usb_sndbulkpipe (dev->udev,2 ), + phdr, size, &dummy,1000 ); + +kfree (phdr); +return ret; }static char *smsusb1_fw_lkup[] = {
drivers/mmc/core/mmc.c +2 -2
@@ -1690,10 +1690,10 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, err =mmc_select_hs400 (card);if (err) goto free_card; - }else if (mmc_card_hs (card)) { + }else {/* Select the desired bus width optionally */ err =mmc_select_bus_width (card); -if (err >0 ) { +if (err >0 &&mmc_card_hs (card)) { err =mmc_select_hs_ddr (card);if (err) goto free_card;
drivers/ntb/ntb_transport.c +2 -3
@@ -1799,7 +1799,7 @@ ntb_transport_create_queue(void *data, struct device *client_dev, node =dev_to_node (&ndev->dev); - free_queue =ffs (nt->qp_bitmap); + free_queue =ffs (nt->qp_bitmap_free);if (!free_queue) goto err;
@@ -2270,9 +2270,8 @@ module_init(ntb_transport_init); static void __exit ntb_transport_exit(void) { -debugfs_remove_recursive (nt_debugfs_dir); -ntb_unregister_client (&ntb_transport_client);bus_unregister (&ntb_transport_bus); +debugfs_remove_recursive (nt_debugfs_dir); }module_exit (ntb_transport_exit);
drivers/ntb/test/ntb_perf.c +2 -0
@@ -265,6 +265,8 @@ static ssize_t perf_copy(struct pthr_ctx *pctx, char __iomem *dst,if (dma_submit_error (cookie)) goto err_set_unmap; +dmaengine_unmap_put (unmap); +atomic_inc (&pctx->dma_sync);dma_async_issue_pending (chan);
drivers/pci/pcie/pme.c +12 -0
@@ -448,6 +448,17 @@ static int pcie_pme_resume(struct pcie_device *srv)return 0 ; } +/** +* pcie_pme_remove - Prepare PCIe PME service device for removal. +* @srv - PCIe service device to remove. +*/ +static void pcie_pme_remove (struct pcie_device *srv) +{ +pcie_pme_suspend (srv); +free_irq (srv->irq, srv); +kfree (get_service_data (srv)); +} +static struct pcie_port_service_driver pcie_pme_driver = { .name ="pcie_pme" , .port_type =PCI_EXP_TYPE_ROOT_PORT ,
@@ -456,6 +467,7 @@ static struct pcie_port_service_driver pcie_pme_driver = { .probe = pcie_pme_probe, .suspend = pcie_pme_suspend, .resume = pcie_pme_resume, + .remove = pcie_pme_remove, };/**
drivers/scsi/scsi_lib.c +2 -1
@@ -1031,7 +1031,8 @@ int scsi_init_io(struct scsi_cmnd *cmd)bool is_mq = (rq->mq_ctx !=NULL );int error; -BUG_ON (!rq->nr_phys_segments); +if (WARN_ON_ONCE (!rq->nr_phys_segments)) +return -EINVAL ; error =scsi_init_sgtable (rq, &cmd->sdb);if (error)
drivers/scsi/sg.c +4 -0
@@ -1753,6 +1753,10 @@ sg_start_req(Sg_request *srp, unsigned char *cmd)return res;iov_iter_truncate (&i, hp->dxfer_len); +if (!iov_iter_count (&i)) { +kfree (iov); +return -EINVAL ; + } res =blk_rq_map_user_iov (q, rq, md, &i,GFP_ATOMIC );kfree (iov);
fs/fuse/dev.c +5 -0
@@ -399,6 +399,10 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req)static void queue_interrupt (struct fuse_iqueue *fiq,struct fuse_req *req) {spin_lock (&fiq->waitq.lock); +if (test_bit (FR_FINISHED , &req->flags)) { +spin_unlock (&fiq->waitq.lock); +return ; + }if (list_empty (&req->intr_entry)) {list_add_tail (&req->intr_entry, &fiq->interrupts);wake_up_locked (&fiq->waitq);
@@ -1372,6 +1376,7 @@ static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos,* code can Oops if the buffer persists after module unload. */ bufs[page_nr].ops = &nosteal_pipe_buf_ops; + bufs[page_nr].flags =0 ; ret =add_to_pipe (pipe, &bufs[page_nr++]);if (unlikely (ret <0 ))break ;
fs/splice.c +1 -0
@@ -203,6 +203,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe, buf->len = spd->partial[page_nr].len; buf->private = spd->partial[page_nr].private; buf->ops = spd->ops; + buf->flags =0 ; pipe->nrbufs++; page_nr++;
include/uapi/linux/videodev2.h +3 -4
@@ -349,8 +349,8 @@ enum v4l2_quantization {/* * The default for R'G'B' quantization is always full range, except * for the BT2020 colorspace. For Y'CbCr the quantization is always -* limited range, except for COLORSPACE_JPEG, SRGB, ADOBERGB, -* XV601 or XV709: those are full range. +* limited range, except for COLORSPACE_JPEG, XV601 or XV709: those +* are full range. */ V4L2_QUANTIZATION_DEFAULT =0 , V4L2_QUANTIZATION_FULL_RANGE = 1,
@@ -365,8 +365,7 @@ enum v4l2_quantization {#define V4L2_MAP_QUANTIZATION_DEFAULT (is_rgb, colsp, ycbcr_enc) \ (((is_rgb) && (colsp) == V4L2_COLORSPACE_BT2020) ? V4L2_QUANTIZATION_LIM_RANGE : \ (((is_rgb) || (ycbcr_enc) == V4L2_YCBCR_ENC_XV601 || \ - (ycbcr_enc) == V4L2_YCBCR_ENC_XV709 || (colsp) == V4L2_COLORSPACE_JPEG) || \ - (colsp) == V4L2_COLORSPACE_ADOBERGB || (colsp) == V4L2_COLORSPACE_SRGB ? \ + (ycbcr_enc) == V4L2_YCBCR_ENC_XV709 || (colsp) == V4L2_COLORSPACE_JPEG) ? \ V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE))enum v4l2_priority {
kernel/futex.c +1 -1
@@ -3323,4 +3323,4 @@ static int __init futex_init(void)return 0 ; } -__initcall (futex_init); +core_initcall (futex_init);
kernel/printk/printk.c +1 -1
@@ -1564,7 +1564,7 @@ static void call_console_drivers(int level, {struct console *con; -trace_console (text, len); +trace_console_rcuidle (text, len);if (!console_drivers)return ;
kernel/time/timekeeping_debug.c +2 -2
@@ -75,7 +75,7 @@ void tk_debug_account_sleep_time(struct timespec64 *t)int bin =min (fls (t->tv_sec),NUM_BINS -1 ); sleep_time_bin[bin]++; -pr_info ("Suspended for %lld.%03lu seconds\n" , (s64 )t->tv_sec, - t->tv_nsec /NSEC_PER_MSEC ); +printk_deferred (KERN_INFO "Suspended for %lld.%03lu seconds\n" , + (s64 )t->tv_sec, t->tv_nsec /NSEC_PER_MSEC ); }