1. 18 Jul, 2016 3 commits
    • 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
  2. 11 Jul, 2016 2 commits
    • Linus Torvalds's avatar
      Linux 4.7-rc7 · 92d21ac7
      Linus Torvalds authored
      92d21ac7
    • Hugh Dickins's avatar
      tmpfs: fix regression hang in fallocate undo · 7f556567
      Hugh Dickins authored
      The well-spotted fallocate undo fix is good in most cases, but not when
      fallocate failed on the very first page.  index 0 then passes lend -1
      to shmem_undo_range(), and that has two bad effects: (a) that it will
      undo every fallocation throughout the file, unrestricted by the current
      range; but more importantly (b) it can cause the undo to hang, because
      lend -1 is treated as truncation, which makes it keep on retrying until
      every page has gone, but those already fully instantiated will never go
      away.  Big thank you to xfstests generic/269 which demonstrates this.
      
      Fixes: b9b4bb26 ("tmpfs: don't undo fallocate past its last page")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7f556567
  3. 10 Jul, 2016 1 commit
  4. 09 Jul, 2016 1 commit
  5. 08 Jul, 2016 19 commits
  6. 07 Jul, 2016 11 commits
  7. 06 Jul, 2016 3 commits