1. 14 Nov, 2015 11 commits
  2. 12 Nov, 2015 22 commits
  3. 09 Nov, 2015 7 commits
    • Ilia Mirkin's avatar
      drm/nouveau/gem: return only valid domain when there's only one · 237956f6
      Ilia Mirkin authored
      commit 2a6c521b upstream.
      
      On nv50+, we restrict the valid domains to just the one where the buffer
      was originally created. However after the buffer is evicted to system
      memory, we might move it back to a different domain that was not
      originally valid. When sharing the buffer and retrieving its GEM_INFO
      data, we still want the domain that will be valid for this buffer in a
      pushbuf, not the one where it currently happens to be.
      
      This resolves fdo#92504 and several others. These are due to suspend
      evicting all buffers, making it more likely that they temporarily end up
      in the wrong place.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92504Signed-off-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
      Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      237956f6
    • SeongJae Park's avatar
      spi: fix pointer-integer size mismatch warning · a0f5187e
      SeongJae Park authored
      commit e1bde3b1 upstream.
      
      Fix the pointer-integer size mismatch warning below:
      	drivers/spi/spi-gpio.c: In function ‘spi_gpio_setup’:
      	drivers/spi/spi-gpio.c:252:8: warning: cast from pointer to integer of
      			different size [-Wpointer-to-int-cast]
      	   cs = (unsigned int) spi->controller_data;
      	        ^
      Signed-off-by: default avatarSeongJae Park <sj38.park@gmail.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      a0f5187e
    • Lad, Prabhakar's avatar
      power: bq24190_charger: suppress build warning · dc062787
      Lad, Prabhakar authored
      commit 31f50e48 upstream.
      
      This patch fixes following build warning:
      
      In file included from include/linux/printk.h:261:0,
                       from include/linux/kernel.h:13,
                       from include/linux/list.h:8,
                       from include/linux/module.h:9,
                       from drivers/power/bq24190_charger.c:11:
      drivers/power/bq24190_charger.c: In function ‘bq24190_irq_handler_thread’:
      include/linux/dynamic_debug.h:86:20: warning: ‘ss_reg’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         __dynamic_dev_dbg(&descriptor, dev, fmt, \
                          ^
      drivers/power/bq24190_charger.c:1211:5: note: ‘ss_reg’ was declared here
        u8 ss_reg, f_reg;
           ^
      In file included from include/linux/printk.h:261:0,
                       from include/linux/kernel.h:13,
                       from include/linux/list.h:8,
                       from include/linux/module.h:9,
                       from drivers/power/bq24190_charger.c:11:
      include/linux/dynamic_debug.h:86:20: warning: ‘f_reg’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         __dynamic_dev_dbg(&descriptor, dev, fmt, \
                          ^
      drivers/power/bq24190_charger.c:1211:13: note: ‘f_reg’ was declared here
        u8 ss_reg, f_reg;
      Signed-off-by: default avatarLad, Prabhakar <prabhakar.csengg@gmail.com>
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      dc062787
    • David S. Miller's avatar
      sfc: Fix memcpy() with const destination compiler warning. · 86d16222
      David S. Miller authored
      commit 1d20a160 upstream.
      
      drivers/net/ethernet/sfc/selftest.c: In function ‘efx_iterate_state’:
      drivers/net/ethernet/sfc/selftest.c:388:9: warning: passing argument 1 of ‘memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-array-qualifiers]
      
      This is because the msg[] member of struct efx_loopback_payload
      is marked as 'const'.  Remove that.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      86d16222
    • Jan Kara's avatar
      mm: make sendfile(2) killable · ef1a1f76
      Jan Kara authored
      commit 296291cd upstream.
      
      Currently a simple program below issues a sendfile(2) system call which
      takes about 62 days to complete in my test KVM instance.
      
              int fd;
              off_t off = 0;
      
              fd = open("file", O_RDWR | O_TRUNC | O_SYNC | O_CREAT, 0644);
              ftruncate(fd, 2);
              lseek(fd, 0, SEEK_END);
              sendfile(fd, fd, &off, 0xfffffff);
      
      Now you should not ask kernel to do a stupid stuff like copying 256MB in
      2-byte chunks and call fsync(2) after each chunk but if you do, sysadmin
      should have a way to stop you.
      
      We actually do have a check for fatal_signal_pending() in
      generic_perform_write() which triggers in this path however because we
      always succeed in writing something before the check is done, we return
      value > 0 from generic_perform_write() and thus the information about
      signal gets lost.
      
      Fix the problem by doing the signal check before writing anything.  That
      way generic_perform_write() returns -EINTR, the error gets propagated up
      and the sendfile loop terminates early.
      Signed-off-by: default avatarJan Kara <jack@suse.com>
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      ef1a1f76
    • Charles Keepax's avatar
      ASoC: wm8904: Correct number of EQ registers · 688df031
      Charles Keepax authored
      commit 97aff2c0 upstream.
      
      There are 24 EQ registers not 25, I suspect this bug came about because
      the registers start at EQ1 not zero. The bug is relatively harmless as
      the extra register written is an unused one.
      Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      688df031
    • Vasant Hegde's avatar
      powerpc/rtas: Validate rtas.entry before calling enter_rtas() · 47dbcf2f
      Vasant Hegde authored
      commit 8832317f upstream.
      
      Currently we do not validate rtas.entry before calling enter_rtas(). This
      leads to a kernel oops when user space calls rtas system call on a powernv
      platform (see below). This patch adds code to validate rtas.entry before
      making enter_rtas() call.
      
        Oops: Exception in kernel mode, sig: 4 [#1]
        SMP NR_CPUS=1024 NUMA PowerNV
        task: c000000004294b80 ti: c0000007e1a78000 task.ti: c0000007e1a78000
        NIP: 0000000000000000 LR: 0000000000009c14 CTR: c000000000423140
        REGS: c0000007e1a7b920 TRAP: 0e40   Not tainted  (3.18.17-340.el7_1.pkvm3_1_0.2400.1.ppc64le)
        MSR: 1000000000081000 <HV,ME>  CR: 00000000  XER: 00000000
        CFAR: c000000000009c0c SOFTE: 0
        NIP [0000000000000000]           (null)
        LR [0000000000009c14] 0x9c14
        Call Trace:
        [c0000007e1a7bba0] [c00000000041a7f4] avc_has_perm_noaudit+0x54/0x110 (unreliable)
        [c0000007e1a7bd80] [c00000000002ddc0] ppc_rtas+0x150/0x2d0
        [c0000007e1a7be30] [c000000000009358] syscall_exit+0x0/0x98
      
      Fixes: 55190f88 ("powerpc: Add skeleton PowerNV platform")
      Reported-by: default avatarNAGESWARA R. SASTRY <nasastry@in.ibm.com>
      Signed-off-by: default avatarVasant Hegde <hegdevasant@linux.vnet.ibm.com>
      [mpe: Reword change log, trim oops, and add stable + fixes]
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      47dbcf2f