Skip to content
  1. Aug 01, 2015
    • Jeff Layton's avatar
      nfsd: do nfs4_check_fh in nfs4_check_file instead of nfs4_check_olstateid · 8fcd461d
      Jeff Layton authored
      
      
      Currently, preprocess_stateid_op calls nfs4_check_olstateid which
      verifies that the open stateid corresponds to the current filehandle in the
      call by calling nfs4_check_fh.
      
      If the stateid is a NFS4_DELEG_STID however, then no such check is done.
      This could cause incorrect enforcement of permissions, because the
      nfsd_permission() call in nfs4_check_file uses current the current
      filehandle, but any subsequent IO operation will use the file descriptor
      in the stateid.
      
      Move the call to nfs4_check_fh into nfs4_check_file instead so that it
      can be done for all stateid types.
      
      Signed-off-by: default avatarJeff Layton <jeff.layton@primarydata.com>
      Cc: stable@vger.kernel.org
      [bfields: moved fh check to avoid NULL deref in special stateid case]
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      8fcd461d
  2. Jul 21, 2015
    • Kinglong Mee's avatar
      nfsd: Fix a file leak on nfsd4_layout_setlease failure · 1ca4b88e
      Kinglong Mee authored
      If nfsd4_layout_setlease fails, nfsd will not put ls->ls_file.
      
      Fix commit c5c707f9
      
       "nfsd: implement pNFS layout recalls".
      
      Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      1ca4b88e
    • Kinglong Mee's avatar
      nfsd: Drop BUG_ON and ignore SECLABEL on absent filesystem · c2227a39
      Kinglong Mee authored
      
      
      On an absent filesystem (one served by another server), we need to be
      able to handle requests for certain attributest (like fs_locations, so
      the client can find out which server does have the filesystem), but
      others we can't.
      
      We forgot to take that into account when adding another attribute
      bitmask work for the SECURITY_LABEL attribute.
      
      There an export entry with the "refer" option can result in:
      
      [   88.414272] kernel BUG at fs/nfsd/nfs4xdr.c:2249!
      [   88.414828] invalid opcode: 0000 [#1] SMP
      [   88.415368] Modules linked in: rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache nfsd xfs libcrc32c iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi iosf_mbi ppdev btrfs coretemp crct10dif_pclmul crc32_pclmul crc32c_intel xor ghash_clmulni_intel raid6_pq vmw_balloon parport_pc parport i2c_piix4 shpchp vmw_vmci acpi_cpufreq auth_rpcgss nfs_acl lockd grace sunrpc vmwgfx drm_kms_helper ttm drm mptspi mptscsih serio_raw mptbase e1000 scsi_transport_spi ata_generic pata_acpi [last unloaded: nfsd]
      [   88.417827] CPU: 0 PID: 2116 Comm: nfsd Not tainted 4.0.7-300.fc22.x86_64 #1
      [   88.418448] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/20/2014
      [   88.419093] task: ffff880079146d50 ti: ffff8800785d8000 task.ti: ffff8800785d8000
      [   88.419729] RIP: 0010:[<ffffffffa04b3c10>]  [<ffffffffa04b3c10>] nfsd4_encode_fattr+0x820/0x1f00 [nfsd]
      [   88.420376] RSP: 0000:ffff8800785db998  EFLAGS: 00010206
      [   88.421027] RAX: 0000000000000001 RBX: 000000000018091a RCX: ffff88006668b980
      [   88.421676] RDX: 00000000fffef7fc RSI: 0000000000000000 RDI: ffff880078d05000
      [   88.422315] RBP: ffff8800785dbb58 R08: ffff880078d043f8 R09: ffff880078d4a000
      [   88.422968] R10: 0000000000010000 R11: 0000000000000002 R12: 0000000000b0a23a
      [   88.423612] R13: ffff880078d05000 R14: ffff880078683100 R15: ffff88006668b980
      [   88.424295] FS:  0000000000000000(0000) GS:ffff88007c600000(0000) knlGS:0000000000000000
      [   88.424944] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   88.425597] CR2: 00007f40bc370f90 CR3: 0000000035af5000 CR4: 00000000001407f0
      [   88.426285] Stack:
      [   88.426921]  ffff8800785dbaa8 ffffffffa049e4af ffff8800785dba08 ffffffff813298f0
      [   88.427585]  ffff880078683300 ffff8800769b0de8 0000089d00000001 0000000087f805e0
      [   88.428228]  ffff880000000000 ffff880079434a00 0000000000000000 ffff88006668b980
      [   88.428877] Call Trace:
      [   88.429527]  [<ffffffffa049e4af>] ? exp_get_by_name+0x7f/0xb0 [nfsd]
      [   88.430168]  [<ffffffff813298f0>] ? inode_doinit_with_dentry+0x210/0x6a0
      [   88.430807]  [<ffffffff8123833e>] ? d_lookup+0x2e/0x60
      [   88.431449]  [<ffffffff81236133>] ? dput+0x33/0x230
      [   88.432097]  [<ffffffff8123f214>] ? mntput+0x24/0x40
      [   88.432719]  [<ffffffff812272b2>] ? path_put+0x22/0x30
      [   88.433340]  [<ffffffffa049ac87>] ? nfsd_cross_mnt+0xb7/0x1c0 [nfsd]
      [   88.433954]  [<ffffffffa04b54e0>] nfsd4_encode_dirent+0x1b0/0x3d0 [nfsd]
      [   88.434601]  [<ffffffffa04b5330>] ? nfsd4_encode_getattr+0x40/0x40 [nfsd]
      [   88.435172]  [<ffffffffa049c991>] nfsd_readdir+0x1c1/0x2a0 [nfsd]
      [   88.435710]  [<ffffffffa049a530>] ? nfsd_direct_splice_actor+0x20/0x20 [nfsd]
      [   88.436447]  [<ffffffffa04abf30>] nfsd4_encode_readdir+0x120/0x220 [nfsd]
      [   88.437011]  [<ffffffffa04b58cd>] nfsd4_encode_operation+0x7d/0x190 [nfsd]
      [   88.437566]  [<ffffffffa04aa6dd>] nfsd4_proc_compound+0x24d/0x6f0 [nfsd]
      [   88.438157]  [<ffffffffa0496103>] nfsd_dispatch+0xc3/0x220 [nfsd]
      [   88.438680]  [<ffffffffa006f0cb>] svc_process_common+0x43b/0x690 [sunrpc]
      [   88.439192]  [<ffffffffa0070493>] svc_process+0x103/0x1b0 [sunrpc]
      [   88.439694]  [<ffffffffa0495a57>] nfsd+0x117/0x190 [nfsd]
      [   88.440194]  [<ffffffffa0495940>] ? nfsd_destroy+0x90/0x90 [nfsd]
      [   88.440697]  [<ffffffff810bb728>] kthread+0xd8/0xf0
      [   88.441260]  [<ffffffff810bb650>] ? kthread_worker_fn+0x180/0x180
      [   88.441762]  [<ffffffff81789e58>] ret_from_fork+0x58/0x90
      [   88.442322]  [<ffffffff810bb650>] ? kthread_worker_fn+0x180/0x180
      [   88.442879] Code: 0f 84 93 05 00 00 83 f8 ea c7 85 a0 fe ff ff 00 00 27 30 0f 84 ba fe ff ff 85 c0 0f 85 a5 fe ff ff e9 e3 f9 ff ff 0f 1f 44 00 00 <0f> 0b 66 0f 1f 44 00 00 be 04 00 00 00 4c 89 ef 4c 89 8d 68 fe
      [   88.444052] RIP  [<ffffffffa04b3c10>] nfsd4_encode_fattr+0x820/0x1f00 [nfsd]
      [   88.444658]  RSP <ffff8800785db998>
      [   88.445232] ---[ end trace 6cb9d0487d94a29f ]---
      
      Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      c2227a39
  3. Jul 20, 2015
    • Linus Torvalds's avatar
      Linux 4.2-rc3 · 52721d9d
      Linus Torvalds authored
      v4.2-rc3
      52721d9d
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · fdbd55fd
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Two fairly simple fixes: one is a change that causes us to have a very
        low queue depth leading to performance issues and the other is a null
        deref occasionally in tapes thanks to use after put"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: fix host max depth checking for the 'queue_depth' sysfs interface
        st: null pointer dereference panic caused by use after kref_put by st_open
      fdbd55fd
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 8bff8399
      Linus Torvalds authored
      Pull MIPS fixes from Ralf Baechle:
       "Another round of MIPS fixes for 4.2.
      
        Things are looking quite decent at this stage but the recent work on
        the FPU support took its toll:
      
         - fix an incorrect overly restrictive ifdef
      
         - select O32 64-bit FP support for O32 binary compatibility
      
         - remove workarounds for Sibyte SB1250 Pass1 parts.  There are rare
           fixing the workarounds is not worth the effort.
      
         - patch up an outdated and now incorrect comment"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: fpu.h: Allow 64-bit FPU on a 64-bit MIPS R6 CPU
        MIPS: SB1: Remove support for Pass 1 parts.
        MIPS: Require O32 FP64 support for MIPS64 with O32 compat
        MIPS: asm-offset.c: Patch up various comments refering to the old filename.
      8bff8399
    • Linus Torvalds's avatar
      Merge branch 'parisc-4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · ff72bf7a
      Linus Torvalds authored
      Pull parisc fix from Helge Deller:
       "A memory leak fix from Christophe Jaillet which was introduced with
        kernel 4.0 and which leads to kernel crashes on parisc after 1-3 days"
      
      * 'parisc-4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: mm: Fix a memory leak related to pmd not attached to the pgd
      ff72bf7a
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 10b97f38
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "By far most of the fixes here are updates to DTS files to deal with
        some mostly minor bugs.
      
        There's also a fix to deal with non-PM kernel configs on i.MX, a
        regression fix for ethernet on PXA platforms and a dependency fix for
        OMAP"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: keystone: dts: rename pcie nodes to help override status
        ARM: keystone: dts: fix dt bindings for PCIe
        ARM: pxa: fix dm9000 platform data regression
        ARM: dts: Correct audio input route & set mic bias for am335x-pepper
        ARM: OMAP2+: Add HAVE_ARM_SCU for AM43XX
        MAINTAINERS: digicolor: add dts files
        ARM: ux500: fix MMC/SD card regression
        ARM: ux500: define serial port aliases
        ARM: dts: OMAP5: Add #iommu-cells property to IOMMUs
        ARM: dts: OMAP4: Add #iommu-cells property to IOMMUs
        ARM: dts: Fix frequency scaling on Gumstix Pepper
        ARM: dts: configure regulators for Gumstix Pepper
        ARM: dts: omap3: overo: Update LCD panel names
        ARM: dts: cros-ec-keyboard: Add support for some Japanese keys
        ARM: imx6: gpc: always enable PU domain if CONFIG_PM is not set
        ARM: dts: imx53-qsb: fix TVE entry
        ARM: dts: mx23: fix iio-hwmon support
        ARM: dts: imx27: Adjust the GPT compatible string
        ARM: socfpga: dts: Fix entries order
        ARM: socfpga: dts: Fix adxl34x formating and compatible string
      10b97f38
  4. Jul 19, 2015
    • Markos Chandras's avatar
      MIPS: fpu.h: Allow 64-bit FPU on a 64-bit MIPS R6 CPU · fcc53b5f
      Markos Chandras authored
      Commit 6134d949
      
       ("MIPS: asm: fpu: Allow 64-bit FPU on MIPS32 R6")
      added support for 64-bit FPU on a 32-bit MIPS R6 processor but it missed
      the 64-bit CPU case leading to FPU failures when requesting FR=1 mode
      (which is always the case for MIPS R6 userland) when running a 32-bit
      kernel on a 64-bit CPU. We also fix the MIPS R2 case.
      
      Signed-off-by: default avatarMarkos Chandras <markos.chandras@imgtec.com>
      Fixes: 6134d949
      
       ("MIPS: asm: fpu: Allow 64-bit FPU on MIPS32 R6")
      Reviewed-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: <stable@vger.kernel.org> # 4.0+
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/10734/
      
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      fcc53b5f
    • Christophe Jaillet's avatar
      parisc: mm: Fix a memory leak related to pmd not attached to the pgd · 4c4ac9a4
      Christophe Jaillet authored
      Commit 0e0da48d
      
       ("parisc: mm: don't count preallocated pmds")
      introduced a memory leak.
      
      After this commit, the 'return' statement in pmd_free is executed in all
      cases. Even for pmd that are not attached to the pgd.  So 'free_pages'
      can never be called anymore, leading to a memory leak.
      
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Acked-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Acked-by: default avatarHelge Deller <deller@gmx.de>
      Cc: stable@vger.kernel.org  # v4.0+
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      4c4ac9a4
    • Olof Johansson's avatar
      Merge tag 'pxa-fixes-v4.2-rc2' of https://github.com/rjarzmik/linux into fixesD · 3eae03da
      Olof Johansson authored
      Merge "pxa fixes for v4.2" from Robert Jarzmik:
      
      ARM: pxa: fixes for v4.2-rc2
      
      This single fix reenables ethernet cards for several pxa boards,
      broken by regulator addition to dm9000 driver.
      
      * tag 'pxa-fixes-v4.2-rc2' of https://github.com/rjarzmik/linux:
        ARM: pxa: fix dm9000 platform data regression
      3eae03da
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · 9d37e667
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "A small set of ARM fixes for -rc3, most of them not far off
        one-liners, with the exception of fixing the V7 cache invalidation for
        incoming SMP processors which was causing problems for SoCFPGA
        devices"
      
      * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: fix __virt_to_idmap build error on !MMU
        ARM: invalidate L1 before enabling coherency
        ARM: 8404/1: dma-mapping: fix off-by-one error in bitmap size check
        ARM: 8402/1: perf: Don't use of_node after putting it
        ARM: 8400/1: use virt_to_idmap to get phys_reset address
      9d37e667
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0e1dbccd
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Two families of fixes:
      
         - Fix an FPU context related boot crash on newer x86 hardware with
           larger context sizes than what most people test.  To fix this
           without ugly kludges or extensive reverts we had to touch core task
           allocator, to allow x86 to determine the task size dynamically, at
           boot time.
      
           I've tested it on a number of x86 platforms, and I cross-built it
           to a handful of architectures:
      
                                              (warns)               (warns)
             testing     x86-64:  -git:  pass (    0),  -tip:  pass (    0)
             testing     x86-32:  -git:  pass (    0),  -tip:  pass (    0)
             testing        arm:  -git:  pass ( 1359),  -tip:  pass ( 1359)
             testing       cris:  -git:  pass ( 1031),  -tip:  pass ( 1031)
             testing       m32r:  -git:  pass ( 1135),  -tip:  pass ( 1135)
             testing       m68k:  -git:  pass ( 1471),  -tip:  pass ( 1471)
             testing       mips:  -git:  pass ( 1162),  -tip:  pass ( 1162)
             testing    mn10300:  -git:  pass ( 1058),  -tip:  pass ( 1058)
             testing     parisc:  -git:  pass ( 1846),  -tip:  pass ( 1846)
             testing      sparc:  -git:  pass ( 1185),  -tip:  pass ( 1185)
      
           ... so I hope the cross-arch impact 'none', as intended.
      
           (by Dave Hansen)
      
         - Fix various NMI handling related bugs unearthed by the big asm code
           rewrite and generally make the NMI code more robust and more
           maintainable while at it.  These changes are a bit late in the
           cycle, I hope they are still acceptable.
      
           (by Andy Lutomirski)"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/fpu, sched: Introduce CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT and use it on x86
        x86/fpu, sched: Dynamically allocate 'struct fpu'
        x86/entry/64, x86/nmi/64: Add CONFIG_DEBUG_ENTRY NMI testing code
        x86/nmi/64: Make the "NMI executing" variable more consistent
        x86/nmi/64: Minor asm simplification
        x86/nmi/64: Use DF to avoid userspace RSP confusing nested NMI detection
        x86/nmi/64: Reorder nested NMI checks
        x86/nmi/64: Improve nested NMI comments
        x86/nmi/64: Switch stacks on userspace NMI entry
        x86/nmi/64: Remove asm code that saves CR2
        x86/nmi: Enable nested do_nmi() handling for 64-bit kernels
      0e1dbccd
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · dae57fb6
      Linus Torvalds authored
      Pull timer fix from Ingo Molnar:
       "Fix for a misplaced export that can cause build failures in certain
        (rare) Kconfig situations"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tick: Move the export of tick_broadcast_oneshot_control to the proper place
      dae57fb6
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d65b78f5
      Linus Torvalds authored
      Pull scheduler fix from Ingo Molnar:
       "A oneliner rq throttling fix"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/fair: Test list head instead of list entry in throttle_cfs_rq()
      d65b78f5
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f79a17bf
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "Mostly tooling fixes, plus a static key fix fixing /sys/devices/cpu/rdpmc"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf tools: Really allow to specify custom CC, AR or LD
        perf auxtrace: Fix misplaced check for HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT
        perf hists browser: Take the --comm, --dsos, etc filters into account
        perf symbols: Store if there is a filter in place
        x86, perf: Fix static_key bug in load_mm_cr4()
        tools: Copy lib/hweight.c from the kernel sources
        perf tools: Fix the detached tarball wrt rbtree copy
        perf thread_map: Fix the sizeof() calculation for map entries
        tools lib: Improve clean target
        perf stat: Fix shadow declaration of close
        perf tools: Fix lockup using 32-bit compat vdso
      f79a17bf
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 59ee7621
      Linus Torvalds authored
      Pull irq fixes from Ingo Molnar:
       "Misc irq fixes:
      
         - two driver fixes
         - a Xen regression fix
         - a nested irq thread crash fix"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/gicv3-its: Fix mapping of LPIs to collections
        genirq: Prevent resend to interrupts marked IRQ_NESTED_THREAD
        genirq: Revert sparse irq locking around __cpu_up() and move it to x86 for now
        gpio/davinci: Fix race in installing chained irq handler
      59ee7621
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 3a26a5b1
      Linus Torvalds authored
      Merge fixes from Andrew Morton:
       "25 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (25 commits)
        lib/decompress: set the compressor name to NULL on error
        mm/cma_debug: correct size input to bitmap function
        mm/cma_debug: fix debugging alloc/free interface
        mm/page_owner: set correct gfp_mask on page_owner
        mm/page_owner: fix possible access violation
        fsnotify: fix oops in fsnotify_clear_marks_by_group_flags()
        /proc/$PID/cmdline: fixup empty ARGV case
        dma-debug: skip debug_dma_assert_idle() when disabled
        hexdump: fix for non-aligned buffers
        checkpatch: fix long line messages about patch context
        mm: clean up per architecture MM hook header files
        MAINTAINERS: uclinux-h8-devel is moderated for non-subscribers
        mailmap: update Sudeep Holla's email id
        Update Viresh Kumar's email address
        mm, meminit: suppress unused memory variable warning
        configfs: fix kernel infoleak through user-controlled format string
        include, lib: add __printf attributes to several function prototypes
        s390/hugetlb: add hugepages_supported define
        mm: hugetlb: allow hugepages_supported to be architecture specific
        revert "s390/mm: make hugepages_supported a boot time decision"
        ...
      3a26a5b1
  5. Jul 18, 2015