1. 23 Jul, 2016 12 commits
  2. 22 Jul, 2016 2 commits
  3. 21 Jul, 2016 3 commits
  4. 20 Jul, 2016 1 commit
  5. 19 Jul, 2016 3 commits
  6. 18 Jul, 2016 8 commits
    • Tejun Heo's avatar
      libata: LITE-ON CX1-JB256-HP needs lower max_sectors · 1488a1e3
      Tejun Heo authored
      Since 34b48db6 ("block: remove artifical max_hw_sectors cap"),
      max_sectors is no longer limited to BLK_DEF_MAX_SECTORS and LITE-ON
      CX1-JB256-HP keeps timing out with higher max_sectors.  Revert it to
      the previous value.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-by: dgerasimov@gmail.com
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=121671
      Cc: stable@vger.kernel.org # v3.19+
      Fixes: 34b48db6 ("block: remove artifical max_hw_sectors cap")
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      1488a1e3
    • Kazuki Oikawa's avatar
      ALSA: usb-audio: Fix quirks code is not called · 76df5296
      Kazuki Oikawa authored
      snd_usb_{set_interface,ctl_msg}_quirk checks chip->usb_id to need
      calling a quirks code. But existed code path that not calling
      dev_set_drvdata in usb_audio_probe.
      
      Fixes: 79289e24 ("ALSA: usb-audio: Refer to chip->usb_id for quirks and MIDI creation")
      Signed-off-by: default avatarKazuki Oikawa <k@oikw.org>
      Cc: <stable@vger.kernel.org> # v4.6+
      Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Tested-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      76df5296
    • Robert Jarzmik's avatar
      mmc: pxamci: fix potential oops · b3802db5
      Robert Jarzmik authored
      As reported by Dan in his report in [1], there is a potential NULL
      pointer derefence if these conditions are met :
       - there is no platform_data provided, ie. host->pdata = NULL
      
      Fix this by only using the platform data ro_invert when a gpio for
      read-only is provided by the platform data.
      
      This doesn't appear yet as every pxa board provides a platform_data, and
      calls pxa_set_mci_info() with a non NULL pointer.
      
      [1] [bug report] mmc: pxamci: fix card detect with slot-gpio API.
      The commit fd546ee6 ("mmc: pxamci: fix card detect with slot-gpio
      API") from Sep 26, 2015, leads to the following static checker warning:
      
      	drivers/mmc/host/pxamci.c:809 pxamci_probe()
      	warn: variable dereferenced before check 'host->pdata' (see line 798)
      
      Fixes: fd546ee6 ("mmc: pxamci: fix card detect with slot-gpio API")
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      b3802db5
    • Taras Kondratiuk's avatar
      mmc: block: fix packed command header endianness · f68381a7
      Taras Kondratiuk authored
      The code that fills packed command header assumes that CPU runs in
      little-endian mode. Hence the header is malformed in big-endian mode
      and causes MMC data transfer errors:
      
      [  563.200828] mmcblk0: error -110 transferring data, sector 2048, nr 8, cmd response 0x900, card status 0xc40
      [  563.219647] mmcblk0: packed cmd failed, nr 2, sectors 16, failure index: -1
      
      Convert header data to LE.
      Signed-off-by: default avatarTaras Kondratiuk <takondra@cisco.com>
      Fixes: ce39f9d1 ("mmc: support packed write command for eMMC4.5 devices")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      f68381a7
    • Ville Viinikka's avatar
      mmc: block: fix free of uninitialized 'idata->buf' · bfe5b1b1
      Ville Viinikka authored
      Set 'idata->buf' to NULL so that it never gets returned without
      initialization. This fixes a bug where mmc_blk_ioctl_cmd() would
      free both 'idata' and 'idata->buf' but 'idata->buf' was returned
      uninitialized.
      
      Fixes: 1ff8950c ("mmc: block: change to use kmalloc when copy data from userspace")
      Signed-off-by: default avatarVille Viinikka <ville@tuxera.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      bfe5b1b1
    • Mat Martineau's avatar
      KEYS: Fix for erroneous trust of incorrectly signed X.509 certs · acddc720
      Mat Martineau authored
      Arbitrary X.509 certificates without authority key identifiers (AKIs)
      can be added to "trusted" keyrings, including IMA or EVM certs loaded
      from the filesystem. Signature verification is currently bypassed for
      certs without AKIs.
      
      Trusted keys were recently refactored, and this bug is not present in
      4.6.
      
      restrict_link_by_signature should return -ENOKEY (no matching parent
      certificate found) if the certificate being evaluated has no AKIs,
      instead of bypassing signature checks and returning 0 (new certificate
      accepted).
      Reported-by: default avatarPetko Manolov <petkan@mip-labs.com>
      Signed-off-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      acddc720
    • Lans Zhang's avatar
      pefile: Fix the failure of calculation for digest · d128471a
      Lans Zhang authored
      Commit e68503bd forgot to set digest_len and thus cause the following
      error reported by kexec when launching a crash kernel:
      
      	kexec_file_load failed: Bad message
      
      Fixes: e68503bd (KEYS: Generalise system_verify_data() to provide access to internal content)
      Signed-off-by: default avatarLans Zhang <jia.zhang@windriver.com>
      Tested-by: default avatarDave Young <dyoung@redhat.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      cc: kexec@lists.infradead.org
      cc: linux-crypto@vger.kernel.org
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      d128471a
    • Lans Zhang's avatar
      PKCS#7: Fix panic when referring to the empty AKID when DEBUG defined · a46e6678
      Lans Zhang authored
      This fix resolves the following kernel panic if an empty or missing
      AuthorityKeyIdentifier is encountered and DEBUG is defined in
      pkcs7_verify.c.
      
      [  459.041989] PKEY: <==public_key_verify_signature() = 0
      [  459.041993] PKCS7: Verified signature 1
      [  459.041995] PKCS7: ==> pkcs7_verify_sig_chain()
      [  459.041999] PKCS7: verify Sample DB Certificate for SCP: 01
      [  459.042002] PKCS7: - issuer Sample KEK Certificate for SCP
      [  459.042014] BUG: unable to handle kernel NULL pointer dereference at           (null)
      [  459.042135] IP: [<ffffffff813e7b4c>] pkcs7_verify+0x72c/0x7f0
      [  459.042217] PGD 739e6067 PUD 77719067 PMD 0
      [  459.042286] Oops: 0000 [#1] PREEMPT SMP
      [  459.042328] Modules linked in:
      [  459.042368] CPU: 0 PID: 474 Comm: kexec Not tainted 4.7.0-rc7-WR8.0.0.0_standard+ #18
      [  459.042462] Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 10/09/2014
      [  459.042586] task: ffff880073a50000 ti: ffff8800738e8000 task.ti: ffff8800738e8000
      [  459.042675] RIP: 0010:[<ffffffff813e7b4c>]  [<ffffffff813e7b4c>] pkcs7_verify+0x72c/0x7f0
      [  459.042784] RSP: 0018:ffff8800738ebd58  EFLAGS: 00010246
      [  459.042845] RAX: 0000000000000000 RBX: ffff880076b7da80 RCX: 0000000000000006
      [  459.042929] RDX: 0000000000000001 RSI: ffffffff81c85001 RDI: ffffffff81ca00a9
      [  459.043014] RBP: ffff8800738ebd98 R08: 0000000000000400 R09: ffff8800788a304c
      [  459.043098] R10: 0000000000000000 R11: 00000000000060ca R12: ffff8800769a2bc0
      [  459.043182] R13: ffff880077358300 R14: 0000000000000000 R15: ffff8800769a2dc0
      [  459.043268] FS:  00007f24cc741700(0000) GS:ffff880074e00000(0000) knlGS:0000000000000000
      [  459.043365] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  459.043431] CR2: 0000000000000000 CR3: 0000000073a36000 CR4: 00000000001006f0
      [  459.043514] Stack:
      [  459.043530]  0000000000000000 ffffffbf00000020 31ffffff813e68b0 0000000000000002
      [  459.043644]  ffff8800769a2bc0 0000000000000000 00000000007197b8 0000000000000002
      [  459.043756]  ffff8800738ebdd8 ffffffff81153fb1 0000000000000000 0000000000000000
      [  459.043869] Call Trace:
      [  459.043898]  [<ffffffff81153fb1>] verify_pkcs7_signature+0x61/0x140
      [  459.043974]  [<ffffffff813e7f0b>] verify_pefile_signature+0x2cb/0x830
      [  459.044052]  [<ffffffff813e8470>] ? verify_pefile_signature+0x830/0x830
      [  459.044134]  [<ffffffff81048e25>] bzImage64_verify_sig+0x15/0x20
      [  459.046332]  [<ffffffff81046e09>] arch_kexec_kernel_verify_sig+0x29/0x40
      [  459.048552]  [<ffffffff810f10e4>] SyS_kexec_file_load+0x1f4/0x6c0
      [  459.050768]  [<ffffffff81050e36>] ? __do_page_fault+0x1b6/0x550
      [  459.052996]  [<ffffffff8199241f>] entry_SYSCALL_64_fastpath+0x17/0x93
      [  459.055242] Code: e8 0a d6 ff ff 85 c0 0f 88 7a fb ff ff 4d 39 fd 4d 89 7d 08 74 45 4d 89 fd e9 14 fe ff ff 4d 8b 76 08 31 c0 48 c7 c7 a9 00 ca 81 <41> 0f b7 36 49 8d 56 02 e8 d0 91 d6 ff 4d 8b 3c 24 4d 85 ff 0f
      [  459.060535] RIP  [<ffffffff813e7b4c>] pkcs7_verify+0x72c/0x7f0
      [  459.063040]  RSP <ffff8800738ebd58>
      [  459.065456] CR2: 0000000000000000
      [  459.075998] ---[ end trace c15f0e897cda28dc ]---
      Signed-off-by: default avatarLans Zhang <jia.zhang@windriver.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      cc: linux-crypto@vger.kernel.org
      cc: kexec@lists.infradead.org
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      a46e6678
  7. 16 Jul, 2016 1 commit
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20160715' of git://git.infradead.org/linux-mtd · 47ef4ad2
      Linus Torvalds authored
      Pull MTD fix from Brian Norris:
       "Late MTD fix for v4.7:
      
        One regression in the Device Tree handling for OMAP NAND handling of
        the ELM node.  TI migrated to using the property name "ti,elm-id", but
        forgot to keep compatibility with the old "elm_id" property.
      
        Also, might as well send out this MAINTAINERS fixup now"
      
      * tag 'for-linus-20160715' of git://git.infradead.org/linux-mtd:
        mtd: nand: omap2: Add check for old elm binding
        MAINTAINERS: Add file patterns for mtd device tree bindings
      47ef4ad2
  8. 15 Jul, 2016 10 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 63151703
      Linus Torvalds authored
      Pull input fixes from Dmitry Torokhov:
       "A few last-minute updates for the input subsystem"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: ts4800-ts - add missing of_node_put after calling of_parse_phandle
        Input: synaptics-rmi4 - use of_get_child_by_name() to fix refcount
        Revert "Input: wacom_w8001 - drop use of ABS_MT_TOOL_TYPE"
        Input: xpad - validate USB endpoint count during probe
        Input: add SW_PEN_INSERTED define
      63151703
    • Linus Torvalds's avatar
      Merge branch 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · 8dcf5a80
      Linus Torvalds authored
      Pull workqueue fix from Tejun Heo:
       "The optimization for setting unbound worker affinity masks collided
        with recent scheduler changes triggering warning messages.
      
        This late pull request fixes the bug by removing the optimization"
      
      * 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
        workqueue: Fix setting affinity of unbound worker threads
      8dcf5a80
    • Jann Horn's avatar
      xfs: fix type confusion in xfs_ioc_swapext · 3e0a3965
      Jann Horn authored
      Without this check, the following XFS_I invocations would return bad
      pointers when used on non-XFS inodes (perhaps pointers into preceding
      allocator chunks).
      
      This could be used by an attacker to trick xfs_swap_extents into
      performing locking operations on attacker-chosen structures in kernel
      memory, potentially leading to code execution in the kernel.  (I have
      not investigated how likely this is to be usable for an attack in
      practice.)
      Signed-off-by: default avatarJann Horn <jann@thejh.net>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Chinner <david@fromorbit.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3e0a3965
    • James Patrick-Evans's avatar
      media: fix airspy usb probe error path · aa93d1fe
      James Patrick-Evans authored
      Fix a memory leak on probe error of the airspy usb device driver.
      
      The problem is triggered when more than 64 usb devices register with
      v4l2 of type VFL_TYPE_SDR or VFL_TYPE_SUBDEV.
      
      The memory leak is caused by the probe function of the airspy driver
      mishandeling errors and not freeing the corresponding control structures
      when an error occours registering the device to v4l2 core.
      
      A badusb device can emulate 64 of these devices, and then through
      continual emulated connect/disconnect of the 65th device, cause the
      kernel to run out of RAM and crash the kernel, thus causing a local DOS
      vulnerability.
      
      Fixes CVE-2016-5400
      Signed-off-by: default avatarJames Patrick-Evans <james@jmp-e.com>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Cc: stable@vger.kernel.org # 3.17+
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      aa93d1fe
    • Tony Luck's avatar
      EDAC, sb_edac: Fix Knights Landing · 0ba169ac
      Tony Luck authored
      In commit 2c1ea4c7 ("EDAC, sb_edac: Use cpu family/model in driver
      detection") I broke Knights Landing because I failed to notice that it
      called a wrapper macro "sbridge_get_all_devices_knl" instead of
      "sbridge_get_all_devices" like all the other types.
      
      Now that we include the processor type in the pci_id_table structure we
      can skip the wrappers and just have the sbridge_get_all_devices() check
      the type to decide whether to allow duplicate devices and controllers to
      have registers spread across buses.
      
      Fixes: 2c1ea4c7 ("EDAC, sb_edac: Use cpu family/model in driver detection")
      Tested-by: default avatarLukasz Odzioba <lukasz.odzioba@intel.com>
      Acked-by: default avatarAristeu Rozanski <aris@redhat.com>
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0ba169ac
    • Peter Chen's avatar
      Input: ts4800-ts - add missing of_node_put after calling of_parse_phandle · 6a5029e6
      Peter Chen authored
      of_node_put needs to be called when the device node which is got
      from of_parse_phandle has finished using.
      Signed-off-by: default avatarPeter Chen <peter.chen@nxp.com>
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      6a5029e6
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · fa3a9f57
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "20 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        m32r: fix build warning about putc
        mm: workingset: printk missing log level, use pr_info()
        mm: thp: refix false positive BUG in page_move_anon_rmap()
        mm: rmap: call page_check_address() with sync enabled to avoid racy check
        mm: thp: move pmd check inside ptl for freeze_page()
        vmlinux.lds: account for destructor sections
        gcov: add support for gcc version >= 6
        mm, meminit: ensure node is online before checking whether pages are uninitialised
        mm, meminit: always return a valid node from early_pfn_to_nid
        kasan/quarantine: fix bugs on qlist_move_cache()
        uapi: export lirc.h header
        madvise_free, thp: fix madvise_free_huge_pmd return value after splitting
        Revert "scripts/gdb: add documentation example for radix tree"
        Revert "scripts/gdb: add a Radix Tree Parser"
        scripts/gdb: Perform path expansion to lx-symbol's arguments
        scripts/gdb: add constants.py to .gitignore
        scripts/gdb: rebuild constants.py on dependancy change
        scripts/gdb: silence 'nothing to do' message
        kasan: add newline to messages
        mm, compaction: prevent VM_BUG_ON when terminating freeing scanner
      fa3a9f57
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · 0a9cb481
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
       "Round three of 4.7 rc fixes:
         - two fixes for hfi1
         - two fixes for i40iw
         - one omission correction in the port table counter arrays"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        i40iw: Enable remote access rights for stag allocation
        i40iw: do not print unitialized variables in error message
        IB core: Add port_xmit_wait counter
        IB/hfi1: Fix sleep inside atomic issue in init_asic_data
        IB/hfi1: Correct issues with sc5 computation
      0a9cb481
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 1a86f944
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Four driver bugfixes for the I2C subsystem"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: mux: reg: wrong condition checked for of_address_to_resource return value
        i2c: tegra: Correct error path in probe
        i2c: remove __init from i2c_register_board_info()
        i2c: qup: Fix wrong value of index variable
      1a86f944
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.7-rc8-vmware' of git://people.freedesktop.org/~airlied/linux · 1f027f69
      Linus Torvalds authored
      Pull drm vmware fixes from Dave Airlie:
       "These are some fixes for the vmware graphics driver, that fix some
        black screen issues on at least Ubuntu 16.04, I think VMware would
        like to get these in so stable can pick them up ASAP"
      
      * tag 'drm-fixes-for-v4.7-rc8-vmware' of git://people.freedesktop.org/~airlied/linux:
        drm/vmwgfx: Fix error paths when mapping framebuffer
        drm/vmwgfx: Fix corner case screen target management
        drm/vmwgfx: Delay pinning fbdev framebuffer until after mode set
        drm/vmwgfx: Check pin count before attempting to move a buffer
        drm/ttm: Make ttm_bo_mem_compat available
        drm/vmwgfx: Add an option to change assumed FB bpp
        drm/vmwgfx: Work around mode set failure in 2D VMs
        drm/vmwgfx: Add a check to handle host message failure
      1f027f69