1. 06 4月, 2013 19 次提交
  2. 05 4月, 2013 21 次提交
    • M
      dm cache: reduce bio front_pad size in writeback mode · 19b0092e
      Mike Snitzer 提交于
      A recent patch to fix the dm cache target's writethrough mode extended
      the bio's front_pad to include a 1056-byte struct dm_bio_details.
      Writeback mode doesn't need this, so this patch reduces the
      per_bio_data_size to 16 bytes in this case instead of 1096.
      
      The dm_bio_details structure was added in "dm cache: fix writes to
      cache device in writethrough mode" which fixed commit e2e74d61 ("dm
      cache: fix race in writethrough implementation").  In writeback mode
      we avoid allocating the writethrough-specific members of the
      per_bio_data structure (the dm_bio_details structure included).
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      19b0092e
    • D
      dm cache: fix writes to cache device in writethrough mode · b844fe69
      Darrick J. Wong 提交于
      The dm-cache writethrough strategy introduced by commit e2e74d61
      ("dm cache: fix race in writethrough implementation") issues a bio to
      the origin device, remaps and then issues the bio to the cache device.
      This more conservative in-series approach was selected to favor
      correctness over performance (of the previous parallel writethrough).
      However, this in-series implementation that reuses the same bio to write
      both the origin and cache device didn't take into account that the block
      layer's req_bio_endio() modifies a completing bio's bi_sector and
      bi_size.  So the new writethrough strategy needs to preserve these bio
      fields, and restore them before submission to the cache device,
      otherwise nothing gets written to the cache (because bi_size is 0).
      
      This patch adds a struct dm_bio_details field to struct per_bio_data,
      and uses dm_bio_record() and dm_bio_restore() to ensure the bio is
      restored before reissuing to the cache device.  Adding such a large
      structure to the per_bio_data is not ideal but we can improve this
      later, for now correctness is the important thing.
      
      This problem initially went unnoticed because the dm-cache test-suite
      uses a linear DM device for the dm-cache device's origin device.
      Writethrough worked as expected because DM submits a *clone* of the
      original bio, so the original bio which was reused for the cache was
      never touched.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: NJoe Thornber <ejt@redhat.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      b844fe69
    • R
      MIPS: Delete definition of SA_RESTORER. · 80fa8181
      Ralf Baechle 提交于
      SA_RESTORER used to be defined as 0x04000000 but only the O32 ABI ever
      supported its use and no libc was using it, so the entire sa-restorer
      functionality was removed with lmo commit 39bffc12c3580ab [Zap sa_restorer.]
      for 2.5.48 retaining only the SA_RESTORER definition as a reminder to avoid
      accidental reuse of the mask bit.
      
      Upstream cdef9602fbf1871a43f0f1b5cea10dd0f275167d [signal: always clear
      sa_restorer on execve] adds code that assumes sa_sigaction has an
      sa_restorer field, if SA_RESTORER is defined which would break MIPS.
      So remove the SA_RESTORER definition before the v3.8.4 merge.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      (cherry picked from commit 17da8d63add23830892ac4dc2cbb3b5d4ffb79a8)
      80fa8181
    • D
      MIPS: Fix ISA level which causes secondary cache init bypassing and more · adb37892
      Deng-Cheng Zhu 提交于
      The commit a96102be introduced set_isa() where compatible ISA info is
      also set aside from the one gets passed in. It means, for example, 1004K
      will have MIPS_CPU_ISA_M32R2/M32R1/II/I flags. This leads to things like
      the following inappropriate:
      
      if (c->isa_level == MIPS_CPU_ISA_M32R1 ||
          c->isa_level == MIPS_CPU_ISA_M32R2 ||
          c->isa_level == MIPS_CPU_ISA_M64R1 ||
          c->isa_level == MIPS_CPU_ISA_M64R2)
      
      This patch fixes it.
      Signed-off-by: NDeng-Cheng Zhu <dengcheng.zhu@imgtec.com>
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      adb37892
    • E
      MIPS: Fix build error cavium-octeon without CONFIG_SMP · ed1197f9
      EunBong Song 提交于
      Singed-off-by: NEunBong Song <eunb.song@samsung.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ed1197f9
    • P
      MIPS: Kconfig: Rename SNIPROM too · aaa9fad3
      Paul Bolle 提交于
      CONFIG_SNIPROM was renamed to CONFIG_FW_SNIPROM in v3.8. Let's rename
      SNIPROM itself too.
      Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
      Cc: linux-mips@linux-mips.org;
      Cc: linux-kernel@vger.kernel.org
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      aaa9fad3
    • P
      MIPS: Alchemy: Fix typo "CONFIG_DEBUG_PCI" · 143f0f65
      Paul Bolle 提交于
      Commit 7517de34 ("MIPS: Alchemy: Redo
      PCI as platform driver") added a reference to CONFIG_DEBUG_PCI. Change
      it to CONFIG_PCI_DEBUG, as that is a valid Kconfig macro.
      
      Also add a newline to a debugging printk that this fix enables.
      Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
      Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      143f0f65
    • D
      MIPS: Unbreak function tracer for 64-bit kernel. · ad8c3969
      David Daney 提交于
      Commit 58b69401 [MIPS: Function tracer: Fix broken function tracing]
      completely broke the function tracer for 64-bit kernels.  The symptom is
      a system hang very early in the boot process.
      
      The fix: Remove/fix $sp adjustments for 64-bit case.
      Signed-off-by: NDavid Daney <david.daney@cavium.com>
      Cc: linux-mips@linux-mips.org
      Cc: Al Cooper <alcooperx@gmail.com>
      Cc: viric@viric.name
      Cc: stable@vger.kernel.org # 3.8.x
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ad8c3969
    • J
      ALSA: hda/generic - fix uninitialized variable · 868211db
      Jiri Slaby 提交于
      changed is not initialized in path_power_down_sync, but it is expected
      to be false in case no change happened in the loop. So set it to
      false.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      868211db
    • J
      net: ipv4: notify when address lifetime changes · 34e2ed34
      Jiri Pirko 提交于
      if userspace changes lifetime of address, send netlink notification and
      call notifier.
      Signed-off-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      34e2ed34
    • J
      ixgbe: fix registration order of driver and DCA nofitication · f01fc1a8
      Jakub Kicinski 提交于
      ixgbe_notify_dca cannot be called before driver registration
      because it expects driver's klist_devices to be allocated and
      initialized. While on it make sure debugfs files are removed
      when registration fails.
      
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NJakub Kicinski <jakub.kicinski@intel.com>
      Tested-by: NPhil Schmitt <phillip.j.schmitt@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f01fc1a8
    • E
      af_unix: If we don't care about credentials coallesce all messages · 0e82e7f6
      Eric W. Biederman 提交于
      It was reported that the following LSB test case failed
      https://lsbbugs.linuxfoundation.org/attachment.cgi?id=2144 because we
      were not coallescing unix stream messages when the application was
      expecting us to.
      
      The problem was that the first send was before the socket was accepted
      and thus sock->sk_socket was NULL in maybe_add_creds, and the second
      send after the socket was accepted had a non-NULL value for sk->socket
      and thus we could tell the credentials were not needed so we did not
      bother.
      
      The unnecessary credentials on the first message cause
      unix_stream_recvmsg to start verifying that all messages had the same
      credentials before coallescing and then the coallescing failed because
      the second message had no credentials.
      
      Ignoring credentials when we don't care in unix_stream_recvmsg fixes a
      long standing pessimization which would fail to coallesce messages when
      reading from a unix stream socket if the senders were different even if
      we did not care about their credentials.
      
      I have tested this and verified that the in the LSB test case mentioned
      above that the messages do coallesce now, while the were failing to
      coallesce without this change.
      Reported-by: NKarel Srot <ksrot@redhat.com>
      Reported-by: NDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0e82e7f6
    • E
      Revert "af_unix: dont send SCM_CREDENTIAL when dest socket is NULL" · 25da0e3e
      Eric W. Biederman 提交于
      This reverts commit 14134f65.
      
      The problem that the above patch was meant to address is that af_unix
      messages are not being coallesced because we are sending unnecesarry
      credentials.  Not sending credentials in maybe_add_creds totally
      breaks unconnected unix domain sockets that wish to send credentails
      to other sockets.
      
      In practice this break some versions of udev because they receive a
      message and the sending uid is bogus so they drop the message.
      Reported-by: NSven Joachim <svenjoac@gmx.de>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25da0e3e
    • V
      bonding: remove sysfs before removing devices · 4de79c73
      Veaceslav Falico 提交于
      We have a race condition if we try to rmmod bonding and simultaneously add
      a bond master through sysfs. In bonding_exit() we first remove the devices
      (through rtnl_link_unregister() ) and only after that we remove the sysfs.
      If we manage to add a device through sysfs after that the devices were
      removed - we'll end up with that device/sysfs structure and with the module
      unloaded.
      
      Fix this by first removing the sysfs and only after that calling
      rtnl_link_unregister().
      Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4de79c73
    • H
      atl1e: limit gso segment size to prevent generation of wrong ip length fields · 31d1670e
      Hannes Frederic Sowa 提交于
      The limit of 0x3c00 is taken from the windows driver.
      Suggested-by: NHuang, Xiong <xiong@qca.qualcomm.com>
      Cc: Huang, Xiong <xiong@qca.qualcomm.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      31d1670e
    • V
      net: count hw_addr syncs so that unsync works properly. · 4543fbef
      Vlad Yasevich 提交于
      A few drivers use dev_uc_sync/unsync to synchronize the
      address lists from master down to slave/lower devices.  In
      some cases (bond/team) a single address list is synched down
      to multiple devices.  At the time of unsync, we have a leak
      in these lower devices, because "synced" is treated as a
      boolean and the address will not be unsynced for anything after
      the first device/call.
      
      Treat "synced" as a count (same as refcount) and allow all
      unsync calls to work.
      Signed-off-by: NVlad Yasevich <vyasevic@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4543fbef
    • L
      Merge tag 'pm+acpi-3.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · d08d528d
      Linus Torvalds 提交于
      Pull ACPI and power management fixes from Rafael Wysocki:
      
       - Revert of a recent cpuidle change that caused Nehalem machines to
         hang on boot from Alex Shi.
      
       - USB power management fix addressing a crash in the port device
         object's release routine from Rafael J Wysocki.
      
       - Device PM QoS fix for a potential deadlock related to sysfs interface
         from Rafael J Wysocki.
      
       - Fix for a cpufreq crash when the /cpus Device Tree node is missing
         from Paolo Pisati.
      
       - Fix for a build issue on ia64 related to the Boot Graphics Resource
         Table (BGRT) from Tony Luck.
      
       - Two fixes for ACPI handles being set incorrectly for device objects
         that don't correspond to any ACPI namespace nodes in the I2C and SPI
         subsystems from Rafael J Wysocki.
      
       - Fix for compiler warnings related to CONFIG_PM_DEVFREQ being unset
         from Rajagopal Venkat.
      
       - Fix for a symbol definition typo in cpufreq_governor.h from Borislav
         Petkov.
      
      * tag 'pm+acpi-3.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / BGRT: Don't let users configure BGRT on non X86 systems
        cpuidle / ACPI: recover percpu ACPI processor cstate
        ACPI / I2C: Use parent's ACPI_HANDLE() in acpi_i2c_register_devices()
        cpufreq: Correct header guards typo
        ACPI / SPI: Use parent's ACPI_HANDLE() in acpi_register_spi_devices()
        cpufreq: check OF node /cpus presence before dereferencing it
        PM / devfreq: Fix compiler warnings for CONFIG_PM_DEVFREQ unset
        PM / QoS: Avoid possible deadlock related to sysfs access
        USB / PM: Don't try to hide PM QoS flags from usb_port_device_release()
      d08d528d
    • H
      r8169: fix auto speed down issue · e2409d83
      hayeswang 提交于
      It would cause no link after suspending or shutdowning when the
      nic changes the speed to 10M and connects to a link partner which
      forces the speed to 100M.
      
      Check the link partner ability to determine which speed to set.
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Acked-by: NFrancois Romieu <romieu@fr.zoreil.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e2409d83
    • D
      Merge branch 'master' of git://1984.lsi.us.es/nf · 4f4ecd5f
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      The following patchset contains netfilter updates for your net tree,
      they are:
      
      * Fix missing the skb->trace reset in nf_reset, noticed by Gao Feng
        while using the TRACE target with several net namespaces.
      
      * Fix prefix translation in IPv6 NPT if non-multiple of 32 prefixes
        are used, from Matthias Schiffer.
      
      * Fix invalid nfacct objects with empty name, they are now rejected
        with -EINVAL, spotted by Michael Zintakis, patch from myself.
      
      * A couple of fixes for wrong return values in the error path of
        nfnetlink_queue and nf_conntrack, from Wei Yongjun.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4f4ecd5f
    • D
      Merge branch 'for-davem' of... · 518314ff
      David S. Miller 提交于
      Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into wireless
      
      John W. Linville says:
      
      ====================
      Here are some more fixes intended for the 3.9 stream...
      
      Regarding the mac80211 bits, Johannes says:
      
      "I had changed the idle handling to simplify it, but broken the
      sequencing of commands, at least for ath9k-htc, one patch restores the
      sequence. The other patch fixes a crash Jouni found while stress-testing
      the remain-on-channel code, when an item is deleted the work struct can
      run twice and crash the second time."
      
      As for the iwlwifi bits, Johannes says:
      
      "The only fix here is to the passive-no-RX firmware regulatory
      enforcement driver support code to not drop auth frames in quick
      succession, leading to not being able to connect to APs on passive
      channels in certain circumstances."
      
      Don't forget the NFC bits, about which Samuel says:
      
      "This time we have:
      
      - A crash fix for when a DGRAM LLCP socket is listening while the NFC adapter
        is physically removed.
      - A potential double skb free when the LLCP socket receive queue is full.
      - A fix for properly handling multiple and consecutive LLCP connections, and
        not trash the socket ack log.
      - A build failure for the MEI microread physical layer, now that the MEI bus
        APIs have been merged into char-misc-next."
      
      On top of that, Stone Piao provides an mwifiex fix to avoid accessing
      beyond the end of a buffer.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      518314ff
    • J
      mm: prevent mmap_cache race in find_vma() · b6a9b7f6
      Jan Stancek 提交于
      find_vma() can be called by multiple threads with read lock
      held on mm->mmap_sem and any of them can update mm->mmap_cache.
      Prevent compiler from re-fetching mm->mmap_cache, because other
      readers could update it in the meantime:
      
                     thread 1                             thread 2
                                              |
        find_vma()                            |  find_vma()
          struct vm_area_struct *vma = NULL;  |
          vma = mm->mmap_cache;               |
          if (!(vma && vma->vm_end > addr     |
              && vma->vm_start <= addr)) {    |
                                              |    mm->mmap_cache = vma;
          return vma;                         |
           ^^ compiler may optimize this      |
              local variable out and re-read  |
              mm->mmap_cache                  |
      
      This issue can be reproduced with gcc-4.8.0-1 on s390x by running
      mallocstress testcase from LTP, which triggers:
      
        kernel BUG at mm/rmap.c:1088!
          Call Trace:
           ([<000003d100c57000>] 0x3d100c57000)
            [<000000000023a1c0>] do_wp_page+0x2fc/0xa88
            [<000000000023baae>] handle_pte_fault+0x41a/0xac8
            [<000000000023d832>] handle_mm_fault+0x17a/0x268
            [<000000000060507a>] do_protection_exception+0x1e2/0x394
            [<0000000000603a04>] pgm_check_handler+0x138/0x13c
            [<000003fffcf1f07a>] 0x3fffcf1f07a
          Last Breaking-Event-Address:
            [<000000000024755e>] page_add_new_anon_rmap+0xc2/0x168
      
      Thanks to Jakub Jelinek for his insight on gcc and helping to
      track this down.
      Signed-off-by: NJan Stancek <jstancek@redhat.com>
      Acked-by: NDavid Rientjes <rientjes@google.com>
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b6a9b7f6