1. 10 4月, 2013 10 次提交
    • M
      powerpc: fix compiling CONFIG_PPC_TRANSACTIONAL_MEM when CONFIG_ALTIVEC=n · f110c0c1
      Michael Neuling 提交于
      We can't compile a kernel with CONFIG_ALTIVEC=n when
      CONFIG_PPC_TRANSACTIONAL_MEM=y.  We currently get:
      
      arch/powerpc/kernel/tm.S:320: Error: unsupported relocation against THREAD_VSCR
      arch/powerpc/kernel/tm.S:323: Error: unsupported relocation against THREAD_VR0
      arch/powerpc/kernel/tm.S:323: Error: unsupported relocation against THREAD_VR0
      etc.
      
      The below fixes this with a sprinkling of #ifdefs.
      
      This was found by mpe with kisskb:
        http://kisskb.ellerman.id.au/kisskb/buildresult/8539442/Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      f110c0c1
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · e8f2b548
      Linus Torvalds 提交于
      Pull vfs fixes from Al Viro:
       "A nasty bug in fs/namespace.c caught by Andrey + a couple of less
        serious unpleasantness - ecryptfs misc device playing hopeless games
        with try_module_get() and palinfo procfs support being...  not quite
        correctly done, to be polite."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        mnt: release locks on error path in do_loopback
        palinfo fixes
        procfs: add proc_remove_subtree()
        ecryptfs: close rmmod race
      e8f2b548
    • L
      Merge tag 'vfio-v3.9-rc7' of git://github.com/awilliam/linux-vfio · 43ecdb0d
      Linus Torvalds 提交于
      Pull vfio overflow fix from Alex Williamson.
      
      * tag 'vfio-v3.9-rc7' of git://github.com/awilliam/linux-vfio:
        vfio-pci: Fix possible integer overflow
      43ecdb0d
    • L
      Merge tag 'for-linus-20130409' of git://git.kernel.dk/linux-block · 27387dd8
      Linus Torvalds 提交于
      Pull block fixes from Jens Axboe:
       "I've got a few smaller fixes queued up for 3.9 that should go in.  The
        major one is the loop regression, the others are nice fixes on their
        own though.  It contains:
      
         - Fix for unitialized var in the block sysfs code, courtesy of Arnd
           and gcc-4.8.
      
         - Two fixes for mtip32xx, fixing probe and command timeout.  Also a
           debug measure that could have waited for 3.10, but it's driver
           only, so I let it slip in.
      
         - Revert the loop partition cleanup fix, it could cause a deadlock on
           auto-teardown as part of umount.  The fix is clear, but at this
           point we just want to revert it and get a real fix in for 3.10."
      
      * tag 'for-linus-20130409' of git://git.kernel.dk/linux-block:
        Revert "loop: cleanup partitions when detaching loop device"
        mtip32xx: fix two smatch warnings
        mtip32xx: Add debugfs entry device_status
        mtip32xx: return 0 from pci probe in case of rebuild
        mtip32xx: recovery from command timeout
        block: avoid using uninitialized value in from queue_var_store
      27387dd8
    • A
      mnt: release locks on error path in do_loopback · e9c5d8a5
      Andrey Vagin 提交于
      do_loopback calls lock_mount(path) and forget to unlock_mount
      if clone_mnt or copy_mnt fails.
      
      [   77.661566] ================================================
      [   77.662939] [ BUG: lock held when returning to user space! ]
      [   77.664104] 3.9.0-rc5+ #17 Not tainted
      [   77.664982] ------------------------------------------------
      [   77.666488] mount/514 is leaving the kernel with locks still held!
      [   77.668027] 2 locks held by mount/514:
      [   77.668817]  #0:  (&sb->s_type->i_mutex_key#7){+.+.+.}, at: [<ffffffff811cca22>] lock_mount+0x32/0xe0
      [   77.671755]  #1:  (&namespace_sem){+++++.}, at: [<ffffffff811cca3a>] lock_mount+0x4a/0xe0
      Signed-off-by: NAndrey Vagin <avagin@openvz.org>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      e9c5d8a5
    • A
      palinfo fixes · ccf93204
      Al Viro 提交于
      	* check for proc_mkdir() failures
      	* fix buffer overrun - sizeof(format string) is *not* enough to
      hold sprintf() result.
      	* use proc_remove_subtree(); life's much easier with it
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ccf93204
    • A
      procfs: add proc_remove_subtree() · 8ce584c7
      Al Viro 提交于
      just what it sounds like; do that only to procfs subtrees you've
      created - doing that to something shared with another driver is
      not only antisocial, but might cause interesting races with
      proc_create() and its ilk.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      8ce584c7
    • A
      ecryptfs: close rmmod race · 52f21999
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      52f21999
    • L
      spinlocks and preemption points need to be at least compiler barriers · 386afc91
      Linus Torvalds 提交于
      In UP and non-preempt respectively, the spinlocks and preemption
      disable/enable points are stubbed out entirely, because there is no
      regular code that can ever hit the kind of concurrency they are meant to
      protect against.
      
      However, while there is no regular code that can cause scheduling, we
      _do_ end up having some exceptional (literally!) code that can do so,
      and that we need to make sure does not ever get moved into the critical
      region by the compiler.
      
      In particular, get_user() and put_user() is generally implemented as
      inline asm statements (even if the inline asm may then make a call
      instruction to call out-of-line), and can obviously cause a page fault
      and IO as a result.  If that inline asm has been scheduled into the
      middle of a preemption-safe (or spinlock-protected) code region, we
      obviously lose.
      
      Now, admittedly this is *very* unlikely to actually ever happen, and
      we've not seen examples of actual bugs related to this.  But partly
      exactly because it's so hard to trigger and the resulting bug is so
      subtle, we should be extra careful to get this right.
      
      So make sure that even when preemption is disabled, and we don't have to
      generate any actual *code* to explicitly tell the system that we are in
      a preemption-disabled region, we need to at least tell the compiler not
      to move things around the critical region.
      
      This patch grew out of the same discussion that caused commits
      79e5f05e ("ARC: Add implicit compiler barrier to raw_local_irq*
      functions") and 3e2e0d2c ("tile: comment assumption about
      __insn_mtspr for <asm/irqflags.h>") to come about.
      
      Note for stable: use discretion when/if applying this.  As mentioned,
      this bug may never have actually bitten anybody, and gcc may never have
      done the required code motion for it to possibly ever trigger in
      practice.
      
      Cc: stable@vger.kernel.org
      Cc: Steven Rostedt <srostedt@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      386afc91
    • C
      tile: comment assumption about __insn_mtspr for <asm/irqflags.h> · 3e2e0d2c
      Chris Metcalf 提交于
      The arch_local_irq_save(), etc., routines are required to function
      as compiler barriers.  They do, but it's subtle and requires knowing
      that the gcc builtin __insn_mtspr() is marked as a memory clobber.
      Provide a comment explaining the assumption.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      [ This came about from me wondering about the synchronization rules of
        __insn_mtspr()   - Linus ]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3e2e0d2c
  2. 09 4月, 2013 9 次提交
    • L
      Merge tag 'hwspinlock-3.9-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock · 84ee9805
      Linus Torvalds 提交于
      Pull a hwspinlock fix from Ohad Ben-Cohen:
       "An hwspinlock fix from Li Fei, taking care of a faulty error path."
      
      * tag 'hwspinlock-3.9-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock:
        hwspinlock: fix __hwspin_lock_request error path
      84ee9805
    • L
      Merge tag 'remoteproc-3.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc · 76dfee40
      Linus Torvalds 提交于
      Pull remoteproc fixes from Ohad Ben-Cohen:
       "Four small remoteproc fixes:
         - Suman fixed an issue that crawled in with the move to the new
           idr_alloc interface in 3.9
         - Dmitry fixed an STE specific memory leak
         - Sjur fixed an error path in the core
         - Rob fixed a Kconfig typo"
      
      * tag 'remoteproc-3.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc:
        remoteproc: fix FW_CONFIG typo
        remoteproc: fix error path of handle_vdev
        remoteproc/ste: fix memory leak on shutdown
        remoteproc: fix the error check for idr_alloc
      76dfee40
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sfr/next-fixes · f011a08c
      Linus Torvalds 提交于
      Pull powerpc bugfix from Stephen Rothwell:
       "A single BUG_ON fix for a condition that could happen for machines
        with certain hardware installed."
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sfr/next-fixes:
        powerpc: pSeries_lpar_hpte_remove fails from Adjunct partition being performed before the ANDCOND test
      f011a08c
    • C
      ARC: Add implicit compiler barrier to raw_local_irq* functions · 79e5f05e
      Christian Ruppert 提交于
      ARC irqsave/restore macros were missing the compiler barrier, causing a
      stale load in irq-enabled region be used in irq-safe region, despite
      being changed, because the register holding the value was still live.
      
      The problem manifested as random crashes in timer code when stress
      testing ARCLinux (3.9-rc3) on a !SMP && !PREEMPT_COUNT
      
      Here's the exact sequence which caused this:
       (0). tv1[x] <----> t1 <---> t2
       (1). mod_timer(t1) interrupted after it calls timer_pending()
       (2). mod_timer(t2) completes
       (3). mod_timer(t1) resumes but messes up the list
       (4). __runt_timers( ) uses bogus timer_list entry / crashes in
            timer->function
      
      Essentially mod_timer() was racing against itself and while the spinlock
      serialized the tv1[] timer link list, timer_pending() called outside the
      spinlock, cached timer link list element in a register.
      With low register pressure (and a deep register file), lack of barrier
      in raw_local_irqsave() as well as preempt_disable (!PREEMPT_COUNT
      version), there was nothing to force gcc to reload across the spinlock,
      causing a stale value in reg be used for link list manipulation - ensuing
      a corruption.
      
      ARcompact disassembly which shows the culprit generated code:
      
      mod_timer:
          push_s blink
          mov_s r13,r0	# timer, timer
      ..
          ###### timer_pending( )
          ld_s r3,[r13]       # <------ <variable>.entry.next LOADED
          brne r3, 0, @.L163
      
      .L163:
      ..
          ###### spin_lock_irq( )
          lr  r5, [status32]  # flags
          bic r4, r5, 6       # temp, flags,
          and.f 0, r5, 6      # flags,
          flag.nz r4
      
          ###### detach_if_pending( ) begins
      
          tst_s r3,r3  <--------------
      			# timer_pending( ) checks timer->entry.next
                              # r3 is NOT reloaded by gcc, using stale value
          beq.d @.L169
          mov.eq r0,0
      
          #####  detach_timer( ): __list_del( )
      
          ld r4,[r13,4]    	# <variable>.entry.prev, D.31439
          st r4,[r3,4]     	# <variable>.prev, D.31439
          st r3,[r4]       	# <variable>.next, D.30246
      
      We initially tried to fix this by adding barrier() to preempt_* macros
      for !PREEMPT_COUNT but Linus clarified that it was anything but wrong.
      http://www.spinics.net/lists/kernel/msg1512709.html
      
      [vgupta: updated commitlog]
      
      Reported-by/Signed-off-by: Christian Ruppert <christian.ruppert@abilis.com>
      Cc: Christian Ruppert <christian.ruppert@abilis.com>
      Cc: Pierrick Hascoet <pierrick.hascoet@abilis.com>
      Debugged-by/Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      79e5f05e
    • L
      Merge tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev · f465d40d
      Linus Torvalds 提交于
      Pull libata fixes from Jeff Garzik:
       "The HDIO_DRIVE_* fix is really the biggie.
      
        1) Fix ATAPI regression, noticed mainly on tape drives, due to a
           commit which mistakenly changed an 'int' return type to a 'bool'.
           Broken by commit 4dce8ba9 ("libata: Use 'bool' return value for
           ata_id_XXX")
      
        2) Add Slimtype DVD A DS8A8SH ATAPI quirk
      
        3) ata_piix: Intel Haswell platform quirk
      
        4) Avoid DMA'ing to stack buffer, when obtaining DEVSLP timings.  IMO
           a mild regression, given that libata previously did not DMA to a
           stack buffer.  Broken by commit commit 803739d2 ("[libata]
           replace sata_settings with devslp_timing")
      
        5) Fix regression impacting SMART and smartd, broken by commit
           84a9a8cd ("[libata] Set proper SK when CK_COND is set")"
      
      * tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
        [libata] Fix HDIO_DRIVE_* ioctl() Linux 3.9 regression
        libata: fix DMA to stack in reading devslp_timing parameters
        ata_piix: Fix DVD not dectected at some Haswell platforms
        libata: Set max sector to 65535 for Slimtype DVD A DS8A8SH drive
        libata: Use integer return value for atapi_command_packet_set
      f465d40d
    • L
      Merge tag 'trace-fixes-3.9-rc6' of... · 5f2f280f
      Linus Torvalds 提交于
      Merge tag 'trace-fixes-3.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
      
      Pull tracing fixes from Steven Rostedt:
       "This includes three fixes.  Two fix features added in 3.9 and one
        fixes a long time minor bug.
      
        The first patch fixes a race that can happen if the user switches from
        the irqsoff tracer to another tracer.  If a irqs off latency is
        detected, it will try to use the snapshot buffer, but the new tracer
        wont have it allocated.  There's a nasty warning that gets printed and
        the trace is ignored.  Nothing crashes, just a nasty WARN_ON is shown.
      
        The second patch fixes an issue where if the sysctl is used to disable
        and enable function tracing, it can put the function tracing into an
        unstable state.
      
        The third patch fixes an issue with perf using the function tracer.
        An update was done, where the stub function could be called during the
        perf function tracing, and that stub function wont have the "control"
        flag set and cause a nasty warning when running perf."
      
      * tag 'trace-fixes-3.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ftrace: Do not call stub functions in control loop
        ftrace: Consistently restore trace function on sysctl enabling
        tracing: Fix race with update_max_tr_single and changing tracers
      5f2f280f
    • S
      ftrace: Do not call stub functions in control loop · 395b97a3
      Steven Rostedt (Red Hat) 提交于
      The function tracing control loop used by perf spits out a warning
      if the called function is not a control function. This is because
      the control function references a per cpu allocated data structure
      on struct ftrace_ops that is not allocated for other types of
      functions.
      
      commit 0a016409 "ftrace: Optimize the function tracer list loop"
      
      Had an optimization done to all function tracing loops to optimize
      for a single registered ops. Unfortunately, this allows for a slight
      race when tracing starts or ends, where the stub function might be
      called after the current registered ops is removed. In this case we
      get the following dump:
      
      root# perf stat -e ftrace:function sleep 1
      [   74.339105] WARNING: at include/linux/ftrace.h:209 ftrace_ops_control_func+0xde/0xf0()
      [   74.349522] Hardware name: PRIMERGY RX200 S6
      [   74.357149] Modules linked in: sg igb iTCO_wdt ptp pps_core iTCO_vendor_support i7core_edac dca lpc_ich i2c_i801 coretemp edac_core crc32c_intel mfd_core ghash_clmulni_intel dm_multipath acpi_power_meter pcspk
      r microcode vhost_net tun macvtap macvlan nfsd kvm_intel kvm auth_rpcgss nfs_acl lockd sunrpc uinput xfs libcrc32c sd_mod crc_t10dif sr_mod cdrom mgag200 i2c_algo_bit drm_kms_helper ttm qla2xxx mptsas ahci drm li
      bahci scsi_transport_sas mptscsih libata scsi_transport_fc i2c_core mptbase scsi_tgt dm_mirror dm_region_hash dm_log dm_mod
      [   74.446233] Pid: 1377, comm: perf Tainted: G        W    3.9.0-rc1 #1
      [   74.453458] Call Trace:
      [   74.456233]  [<ffffffff81062e3f>] warn_slowpath_common+0x7f/0xc0
      [   74.462997]  [<ffffffff810fbc60>] ? rcu_note_context_switch+0xa0/0xa0
      [   74.470272]  [<ffffffff811041a2>] ? __unregister_ftrace_function+0xa2/0x1a0
      [   74.478117]  [<ffffffff81062e9a>] warn_slowpath_null+0x1a/0x20
      [   74.484681]  [<ffffffff81102ede>] ftrace_ops_control_func+0xde/0xf0
      [   74.491760]  [<ffffffff8162f400>] ftrace_call+0x5/0x2f
      [   74.497511]  [<ffffffff8162f400>] ? ftrace_call+0x5/0x2f
      [   74.503486]  [<ffffffff8162f400>] ? ftrace_call+0x5/0x2f
      [   74.509500]  [<ffffffff810fbc65>] ? synchronize_sched+0x5/0x50
      [   74.516088]  [<ffffffff816254d5>] ? _cond_resched+0x5/0x40
      [   74.522268]  [<ffffffff810fbc65>] ? synchronize_sched+0x5/0x50
      [   74.528837]  [<ffffffff811041a2>] ? __unregister_ftrace_function+0xa2/0x1a0
      [   74.536696]  [<ffffffff816254d5>] ? _cond_resched+0x5/0x40
      [   74.542878]  [<ffffffff8162402d>] ? mutex_lock+0x1d/0x50
      [   74.548869]  [<ffffffff81105c67>] unregister_ftrace_function+0x27/0x50
      [   74.556243]  [<ffffffff8111eadf>] perf_ftrace_event_register+0x9f/0x140
      [   74.563709]  [<ffffffff816254d5>] ? _cond_resched+0x5/0x40
      [   74.569887]  [<ffffffff8162402d>] ? mutex_lock+0x1d/0x50
      [   74.575898]  [<ffffffff8111e94e>] perf_trace_destroy+0x2e/0x50
      [   74.582505]  [<ffffffff81127ba9>] tp_perf_event_destroy+0x9/0x10
      [   74.589298]  [<ffffffff811295d0>] free_event+0x70/0x1a0
      [   74.595208]  [<ffffffff8112a579>] perf_event_release_kernel+0x69/0xa0
      [   74.602460]  [<ffffffff816254d5>] ? _cond_resched+0x5/0x40
      [   74.608667]  [<ffffffff8112a640>] put_event+0x90/0xc0
      [   74.614373]  [<ffffffff8112a740>] perf_release+0x10/0x20
      [   74.620367]  [<ffffffff811a3044>] __fput+0xf4/0x280
      [   74.625894]  [<ffffffff811a31de>] ____fput+0xe/0x10
      [   74.631387]  [<ffffffff81083697>] task_work_run+0xa7/0xe0
      [   74.637452]  [<ffffffff81014981>] do_notify_resume+0x71/0xb0
      [   74.643843]  [<ffffffff8162fa92>] int_signal+0x12/0x17
      
      To fix this a new ftrace_ops flag is added that denotes the ftrace_list_end
      ftrace_ops stub as just that, a stub. This flag is now checked in the
      control loop and the function is not called if the flag is set.
      
      Thanks to Jovi for not just reporting the bug, but also pointing out
      where the bug was in the code.
      
      Link: http://lkml.kernel.org/r/514A8855.7090402@redhat.com
      Link: http://lkml.kernel.org/r/1364377499-1900-15-git-send-email-jovi.zhangwei@huawei.comTested-by: NWANG Chao <chaowang@redhat.com>
      Reported-by: NWANG Chao <chaowang@redhat.com>
      Reported-by: Nzhangwei(Jovi) <jovi.zhangwei@huawei.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      395b97a3
    • J
      ftrace: Consistently restore trace function on sysctl enabling · 5000c418
      Jan Kiszka 提交于
      If we reenable ftrace via syctl, we currently set ftrace_trace_function
      based on the previous simplistic algorithm. This is inconsistent with
      what update_ftrace_function does. So better call that helper instead.
      
      Link: http://lkml.kernel.org/r/5151D26F.1070702@siemens.com
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      5000c418
    • S
      tracing: Fix race with update_max_tr_single and changing tracers · 2930e04d
      Steven Rostedt (Red Hat) 提交于
      The commit 34600f0e "tracing: Fix race with max_tr and changing tracers"
      fixed the updating of the main buffers with the race of changing
      tracers, but left out the fix to the updating of just a per cpu buffer.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      2930e04d
  3. 08 4月, 2013 9 次提交
  4. 07 4月, 2013 2 次提交
  5. 06 4月, 2013 10 次提交
    • L
      Merge tag 'dm-3.9-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm · fe696909
      Linus Torvalds 提交于
      Pull device-mapper fixes from Alasdair Kergon:
       "A pair of patches to fix the writethrough mode of the device-mapper
        cache target when the device being cached is not itself wrapped with
        device-mapper."
      
      * tag 'dm-3.9-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm:
        dm cache: reduce bio front_pad size in writeback mode
        dm cache: fix writes to cache device in writethrough mode
      fe696909
    • L
      Merge tag 'pci-v3.9-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · b196553a
      Linus Torvalds 提交于
      Pull PCI fixes from Bjorn Helgaas:
       "PCI updates for v3.9:
      
        ASPM
            Revert "PCI/ACPI: Request _OSC control before scanning PCI root bus"
        kexec
            PCI: Don't try to disable Bus Master on disconnected PCI devices
        Platform ROM images
            PCI: Add PCI ROM helper for platform-provided ROM images
            nouveau: Attempt to use platform-provided ROM image
            radeon: Attempt to use platform-provided ROM image
        Hotplug
            PCI/ACPI: Always resume devices on ACPI wakeup notifications
            PCI/PM: Disable runtime PM of PCIe ports
        EISA
            EISA/PCI: Fix bus res reference
            EISA/PCI: Init EISA early, before PNP"
      
      * tag 'pci-v3.9-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI/PM: Disable runtime PM of PCIe ports
        PCI/ACPI: Always resume devices on ACPI wakeup notifications
        PCI: Don't try to disable Bus Master on disconnected PCI devices
        Revert "PCI/ACPI: Request _OSC control before scanning PCI root bus"
        radeon: Attempt to use platform-provided ROM image
        nouveau: Attempt to use platform-provided ROM image
        EISA/PCI: Init EISA early, before PNP
        EISA/PCI: Fix bus res reference
        PCI: Add PCI ROM helper for platform-provided ROM images
      b196553a
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 53f63189
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Fix erroneous sock_orphan() leading to crashes and double
          kfree_skb() in NFC protocol.  From Thierry Escande and Samuel Ortiz.
      
       2) Fix use after free in remain-on-channel mac80211 code, from Johannes
          Berg.
      
       3) nf_reset() needs to reset the NF tracing cookie, otherwise we can
          leak it from one namespace into another.  Fix from Gao Feng and
          Patrick McHardy.
      
       4) Fix overflow in channel scanning array of mwifiex driver, from Stone
          Piao.
      
       5) Fix loss of link after suspend/shutdown in r8169, from Hayes Wang.
      
       6) Synchronization of unicast address lists to the undelying device
          doesn't work because whether to sync is maintained as a boolean
          rather than a true count.  Fix from Vlad Yasevich.
      
       7) Fix corruption of TSO packets in atl1e by limiting the segmented
          packet length.  From Hannes Frederic Sowa.
      
       8) Revert bogus AF_UNIX credential passing change and fix the
          coalescing issue properly, from Eric W Biederman.
      
       9) Changes of ipv4 address lifetime settings needs to generate a
          notification, from Jiri Pirko.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (22 commits)
        netfilter: don't reset nf_trace in nf_reset()
        net: ipv4: notify when address lifetime changes
        ixgbe: fix registration order of driver and DCA nofitication
        af_unix: If we don't care about credentials coallesce all messages
        Revert "af_unix: dont send SCM_CREDENTIAL when dest socket is NULL"
        bonding: remove sysfs before removing devices
        atl1e: limit gso segment size to prevent generation of wrong ip length fields
        net: count hw_addr syncs so that unsync works properly.
        r8169: fix auto speed down issue
        netfilter: ip6t_NPT: Fix translation for non-multiple of 32 prefix lengths
        mwifiex: limit channel number not to overflow memory
        NFC: microread: Fix build failure due to a new MEI bus API
        iwlwifi: dvm: fix the passive-no-RX workaround
        netfilter: nf_conntrack: fix error return code
        NFC: llcp: Keep the connected socket parent pointer alive
        mac80211: fix idle handling sequence
        netfilter: nfnetlink_acct: return -EINVAL if object name is empty
        netfilter: nfnetlink_queue: fix error return code in nfnetlink_queue_init()
        netfilter: reset nf_trace in nf_reset
        mac80211: fix remain-on-channel cancel crash
        ...
      53f63189
    • J
      x86: Fix rebuild with EFI_STUB enabled · 91870824
      Jan Beulich 提交于
      eboot.o and efi_stub_$(BITS).o didn't get added to "targets", and hence
      their .cmd files don't get included by the build machinery, leading to
      the files always getting rebuilt.
      
      Rather than adding the two files individually, take the opportunity and
      add $(VMLINUX_OBJS) to "targets" instead, thus allowing the assignment
      at the top of the file to be shrunk quite a bit.
      
      At the same time, remove a pointless flags override line - the variable
      assigned to was misspelled anyway, and the options added are
      meaningless for assembly sources.
      
      [ hpa: the patch is not minimal, but I am taking it for -urgent anyway
        since the excess impact of the patch seems to be small enough. ]
      Signed-off-by: NJan Beulich <jbeulich@suse.com>
      Link: http://lkml.kernel.org/r/515C5D2502000078000CA6AD@nat28.tlf.novell.com
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Matt Fleming <matt.fleming@intel.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      91870824
    • P
      netfilter: don't reset nf_trace in nf_reset() · 124dff01
      Patrick McHardy 提交于
      Commit 130549fe ("netfilter: reset nf_trace in nf_reset") added code
      to reset nf_trace in nf_reset(). This is wrong and unnecessary.
      
      nf_reset() is used in the following cases:
      
      - when passing packets up the the socket layer, at which point we want to
        release all netfilter references that might keep modules pinned while
        the packet is queued. nf_trace doesn't matter anymore at this point.
      
      - when encapsulating or decapsulating IPsec packets. We want to continue
        tracing these packets after IPsec processing.
      
      - when passing packets through virtual network devices. Only devices on
        that encapsulate in IPv4/v6 matter since otherwise nf_trace is not
        used anymore. Its not entirely clear whether those packets should
        be traced after that, however we've always done that.
      
      - when passing packets through virtual network devices that make the
        packet cross network namespace boundaries. This is the only cases
        where we clearly want to reset nf_trace and is also what the
        original patch intended to fix.
      
      Add a new function nf_reset_trace() and use it in dev_forward_skb() to
      fix this properly.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      124dff01
    • L
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 6cfa9238
      Linus Torvalds 提交于
      Pull MIPS fixes from Ralf Baechle:
       "Fixes for a number of small glitches in various corners of the MIPS
        tree.  No particular areas is standing out.
      
        With this applied all MIPS defconfigs are building fine.  No merge
        conflicts are expected."
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: Delete definition of SA_RESTORER.
        MIPS: Fix ISA level which causes secondary cache init bypassing and more
        MIPS: Fix build error cavium-octeon without CONFIG_SMP
        MIPS: Kconfig: Rename SNIPROM too
        MIPS: Alchemy: Fix typo "CONFIG_DEBUG_PCI"
        MIPS: Unbreak function tracer for 64-bit kernel.
      6cfa9238
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes · 00fa6fe9
      Linus Torvalds 提交于
      Pull GFS2 fixes from Steven Whitehouse:
       "There are two patches which fix up a couple of minor issues in the DLM
        interface code, a missing error path in gfs2_rs_alloc(), one patch
        which fixes a problem during "withdraw" and a fix for discards/FITRIM
        when using 4k sector sized devices."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes:
        GFS2: Issue discards in 512b sectors
        GFS2: Fix unlock of fcntl locks during withdrawn state
        GFS2: return error if malloc failed in gfs2_rs_alloc()
        GFS2: use memchr_inv
        GFS2: use kmalloc for lvb bitmap
      00fa6fe9
    • M
      firmware,IB/qib: revert firmware file move · ff802e31
      Mike Marciniszyn 提交于
      Commit e2eed58b ("IB/qib: change QLogic to Intel") moved a firmware
      file potentially breaking the ABI.
      
      This patch reverts that aspect of the fix as well as reverting the
      firmware name as used in qib.
      Reported-by: NDavid Woodhouse <dwmw2@infradead.org>
      Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ff802e31
    • L
      Merge tag 'spi-fix-v3.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc · e0a77f26
      Linus Torvalds 提交于
      Pull spi fixes from Mark Brown:
       "A bunch of small driver fixes plus a fix for error handling in the
        core - nothing too exciting overall."
      
      * tag 'spi-fix-v3.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc:
        spi/mpc512x-psc: optionally keep PSC SS asserted across xfer segmensts
        spi: Unlock a spinlock before calling into the controller driver.
        spi/s3c64xx: modified error interrupt handling and init
        spi/bcm63xx: don't disable non enabled clocks in probe error path
        spi/bcm63xx: Remove unused variable
        spi: slink-tegra20: move runtime pm calls to transfer_one_message
      e0a77f26
    • B
      GFS2: Issue discards in 512b sectors · b2c87cae
      Bob Peterson 提交于
      This patch changes GFS2's discard issuing code so that it calls
      function sb_issue_discard rather than blkdev_issue_discard. The
      code was calling blkdev_issue_discard and specifying the correct
      sector offset and sector size, but blkdev_issue_discard expects
      these values to be in terms of 512 byte sectors, even if the native
      sector size for the device is different. Calling sb_issue_discard
      with the BLOCK size instead ensures the correct block-to-512b-sector
      translation. I verified that "minlen" is specified in blocks, so
      comparing it to a number of blocks is correct.
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      b2c87cae