1. 29 7月, 2015 12 次提交
  2. 23 7月, 2015 13 次提交
  3. 22 7月, 2015 15 次提交
    • L
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 5a5ca73a
      Linus Torvalds 提交于
      Pull ARM64 fixes from Catalin Marinas:
      
       - arm64 build fix following the move of the thread_struct to the end of
         task_struct and the asm offsets becoming too large for the AArch64
         ISA
      
       - preparatory patch for moving irq_data struct members (applied now to
         reduce dependency for the next merging window)
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        ARM64/irq: Use access helper irq_data_get_affinity_mask()
        arm64: switch_to: calculate cpu context pointer using separate register
      5a5ca73a
    • J
      ARM64/irq: Use access helper irq_data_get_affinity_mask() · 3bc38fc1
      Jiang Liu 提交于
      This is a preparatory patch for moving irq_data struct members.
      Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
      Reviewed-by: NHanjun Guo <hanjun.guo@linaro.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      3bc38fc1
    • W
      arm64: switch_to: calculate cpu context pointer using separate register · c0d3fce5
      Will Deacon 提交于
      Commit 0c8c0f03 ("x86/fpu, sched: Dynamically allocate 'struct fpu'")
      moved the thread_struct to the bottom of task_struct. As a result, the
      offset is now too large to be used in an immediate add on arm64 with
      some kernel configs:
      
      arch/arm64/kernel/entry.S: Assembler messages:
      arch/arm64/kernel/entry.S:588: Error: immediate out of range
      arch/arm64/kernel/entry.S:597: Error: immediate out of range
      
      This patch calculates the offset using an additional register instead of
      an immediate offset.
      
      Fixes: 0c8c0f03 ("x86/fpu, sched: Dynamically allocate 'struct fpu'")
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Ingo Molnar <mingo@kernel.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      c0d3fce5
    • S
      ravb: fix ring memory allocation · d8b48911
      Sergei Shtylyov 提交于
      The driver is written as if it can adapt to a low memory situation  allocating
      less RX  skbs and TX aligned buffers than the respective RX/TX ring sizes.  In
      reality  though  the driver  would malfunction in this case. Stop being overly
      smart and just fail in such situation -- this is achieved by moving the memory
      allocation from ravb_ring_format() to ravb_ring_init().
      
      We leave dma_map_single() calls in place but make their failure non-fatal
      by marking the corresponding RX descriptors  with zero data size which should
      prevent DMA to an invalid addresses.
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d8b48911
    • D
      net: phy: dp83867: Fix warning check for setting the internal delay · a46fa260
      Dan Murphy 提交于
      Fix warning: logical ‘or’ of collectively exhaustive tests is always true
      
      Change the internal delay check from an 'or' condition to an 'and'
      condition.
      Reported-by: NDavid Binderman <dcb314@hotmail.com>
      Signed-off-by: NDan Murphy <dmurphy@ti.com>
      Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a46fa260
    • C
      openvswitch: allocate nr_node_ids flow_stats instead of num_possible_nodes · bac541e4
      Chris J Arges 提交于
      Some architectures like POWER can have a NUMA node_possible_map that
      contains sparse entries. This causes memory corruption with openvswitch
      since it allocates flow_cache with a multiple of num_possible_nodes() and
      assumes the node variable returned by for_each_node will index into
      flow->stats[node].
      
      Use nr_node_ids to allocate a maximal sparse array instead of
      num_possible_nodes().
      
      The crash was noticed after 3af229f2 was applied as it changed the
      node_possible_map to match node_online_map on boot.
      Fixes: 3af229f2Signed-off-by: NChris J Arges <chris.j.arges@canonical.com>
      Acked-by: NPravin B Shelar <pshelar@nicira.com>
      Acked-by: NNishanth Aravamudan <nacc@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bac541e4
    • F
      netlink: don't hold mutex in rcu callback when releasing mmapd ring · 0470eb99
      Florian Westphal 提交于
      Kirill A. Shutemov says:
      
      This simple test-case trigers few locking asserts in kernel:
      
      int main(int argc, char **argv)
      {
              unsigned int block_size = 16 * 4096;
              struct nl_mmap_req req = {
                      .nm_block_size          = block_size,
                      .nm_block_nr            = 64,
                      .nm_frame_size          = 16384,
                      .nm_frame_nr            = 64 * block_size / 16384,
              };
              unsigned int ring_size;
      	int fd;
      
      	fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC);
              if (setsockopt(fd, SOL_NETLINK, NETLINK_RX_RING, &req, sizeof(req)) < 0)
                      exit(1);
              if (setsockopt(fd, SOL_NETLINK, NETLINK_TX_RING, &req, sizeof(req)) < 0)
                      exit(1);
      
      	ring_size = req.nm_block_nr * req.nm_block_size;
      	mmap(NULL, 2 * ring_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
      	return 0;
      }
      
      +++ exited with 0 +++
      BUG: sleeping function called from invalid context at /home/kas/git/public/linux-mm/kernel/locking/mutex.c:616
      in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: init
      3 locks held by init/1:
       #0:  (reboot_mutex){+.+...}, at: [<ffffffff81080959>] SyS_reboot+0xa9/0x220
       #1:  ((reboot_notifier_list).rwsem){.+.+..}, at: [<ffffffff8107f379>] __blocking_notifier_call_chain+0x39/0x70
       #2:  (rcu_callback){......}, at: [<ffffffff810d32e0>] rcu_do_batch.isra.49+0x160/0x10c0
      Preemption disabled at:[<ffffffff8145365f>] __delay+0xf/0x20
      
      CPU: 1 PID: 1 Comm: init Not tainted 4.1.0-00009-gbddf4c4818e0 #253
      Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS Debian-1.8.2-1 04/01/2014
       ffff88017b3d8000 ffff88027bc03c38 ffffffff81929ceb 0000000000000102
       0000000000000000 ffff88027bc03c68 ffffffff81085a9d 0000000000000002
       ffffffff81ca2a20 0000000000000268 0000000000000000 ffff88027bc03c98
      Call Trace:
       <IRQ>  [<ffffffff81929ceb>] dump_stack+0x4f/0x7b
       [<ffffffff81085a9d>] ___might_sleep+0x16d/0x270
       [<ffffffff81085bed>] __might_sleep+0x4d/0x90
       [<ffffffff8192e96f>] mutex_lock_nested+0x2f/0x430
       [<ffffffff81932fed>] ? _raw_spin_unlock_irqrestore+0x5d/0x80
       [<ffffffff81464143>] ? __this_cpu_preempt_check+0x13/0x20
       [<ffffffff8182fc3d>] netlink_set_ring+0x1ed/0x350
       [<ffffffff8182e000>] ? netlink_undo_bind+0x70/0x70
       [<ffffffff8182fe20>] netlink_sock_destruct+0x80/0x150
       [<ffffffff817e484d>] __sk_free+0x1d/0x160
       [<ffffffff817e49a9>] sk_free+0x19/0x20
      [..]
      
      Cong Wang says:
      
      We can't hold mutex lock in a rcu callback, [..]
      
      Thomas Graf says:
      
      The socket should be dead at this point. It might be simpler to
      add a netlink_release_ring() function which doesn't require
      locking at all.
      Reported-by: N"Kirill A. Shutemov" <kirill@shutemov.name>
      Diagnosed-by: NCong Wang <cwang@twopensource.com>
      Suggested-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0470eb99
    • D
      Merge branch 'arm-bpf-fixes' · 7c8cbaca
      David S. Miller 提交于
      Nicolas Schichan says:
      
      ====================
      BPF JIT fixes for ARM
      
      These patches are fixing bugs in the ARM JIT and should probably find
      their way to a stable kernel. All 60 test_bpf tests in Linux 4.1 release
      are now passing OK (was 54 out of 60 before).
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c8cbaca
    • N
      ARM: net: fix vlan access instructions in ARM JIT. · c18fe54b
      Nicolas Schichan 提交于
      This makes BPF_ANC | SKF_AD_VLAN_TAG and BPF_ANC | SKF_AD_VLAN_TAG_PRESENT
      have the same behaviour as the in kernel VM and makes the test_bpf LD_VLAN_TAG
      and LD_VLAN_TAG_PRESENT tests pass.
      Signed-off-by: NNicolas Schichan <nschichan@freebox.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c18fe54b
    • N
      ARM: net: handle negative offsets in BPF JIT. · 6d715e30
      Nicolas Schichan 提交于
      Previously, the JIT would reject negative offsets known during code
      generation and mishandle negative offsets provided at runtime.
      
      Fix that by calling bpf_internal_load_pointer_neg_helper()
      appropriately in the jit_get_skb_{b,h,w} slow path helpers and by forcing
      the execution flow to the slow path helpers when the offset is
      negative.
      Signed-off-by: NNicolas Schichan <nschichan@freebox.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6d715e30
    • N
      ARM: net: fix condition for load_order > 0 when translating load instructions. · 7aed35cb
      Nicolas Schichan 提交于
      To check whether the load should take the fast path or not, the code
      would check that (r_skb_hlen - load_order) is greater than the offset
      of the access using an "Unsigned higher or same" condition. For
      halfword accesses and an skb length of 1 at offset 0, that test is
      valid, as we end up comparing 0xffffffff(-1) and 0, so the fast path
      is taken and the filter allows the load to wrongly succeed. A similar
      issue exists for word loads at offset 0 and an skb length of less than
      4.
      
      Fix that by using the condition "Signed greater than or equal"
      condition for the fast path code for load orders greater than 0.
      Signed-off-by: NNicolas Schichan <nschichan@freebox.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7aed35cb
    • E
      tcp: suppress a division by zero warning · 89e478a2
      Eric Dumazet 提交于
      Andrew Morton reported following warning on one ARM build
      with gcc-4.4 :
      
      net/ipv4/inet_hashtables.c: In function 'inet_ehash_locks_alloc':
      net/ipv4/inet_hashtables.c:617: warning: division by zero
      
      Even guarded with a test on sizeof(spinlock_t), compiler does not
      like current construct on a !CONFIG_SMP build.
      
      Remove the warning by using a temporary variable.
      
      Fixes: 095dc8e0 ("tcp: fix/cleanup inet_ehash_locks_alloc()")
      Reported-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      89e478a2
    • L
      Revert "fsnotify: fix oops in fsnotify_clear_marks_by_group_flags()" · d725e66c
      Linus Torvalds 提交于
      This reverts commit a2673b6e.
      
      Kinglong Mee reports a memory leak with that patch, and Jan Kara confirms:
      
       "Thanks for report! You are right that my patch introduces a race
        between fsnotify kthread and fsnotify_destroy_group() which can result
        in leaking inotify event on group destruction.
      
        I haven't yet decided whether the right fix is not to queue events for
        dying notification group (as that is pointless anyway) or whether we
        should just fix the original problem differently...  Whenever I look
        at fsnotify code mark handling I get lost in the maze of locks, lists,
        and subtle differences between how different notification systems
        handle notification marks :( I'll think about it over night"
      
      and after thinking about it, Jan says:
      
       "OK, I have looked into the code some more and I found another
        relatively simple way of fixing the original oops.  It will be IMHO
        better than trying to fixup this issue which has more potential for
        breakage.  I'll ask Linus to revert the fsnotify fix he already merged
        and send a new fix"
      Reported-by: NKinglong Mee <kinglongmee@gmail.com>
      Requested-by: NJan Kara <jack@suse.cz>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d725e66c
    • D
      Merge tag 'wireless-drivers-for-davem-2015-07-20' of... · 0bccece5
      David S. Miller 提交于
      Merge tag 'wireless-drivers-for-davem-2015-07-20' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
      
      Kalle Valo says:
      
      ====================
      ath9k:
      
      * fix device ID check for AR956x
      
      iwlwifi:
      
      * bug fixes specific for 8000 series
      * fix a crash in time events
      * fix a crash in PCIe transport
      * fix BT Coex code that prevented association on certain
        devices (3160).
      * revert the new RBD allocation model because it introduced
        a bug when running on weak VM setups.
      * new device IDs
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0bccece5
    • L
      Merge tag 'pinctrl-v4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 71ebd1af
      Linus Torvalds 提交于
      Pull pin control fixes from Linus Walleij:
       "Here are some overly ripe pin control fixes for the v4.2 series.
      
        They got delayed because of various crap commits and having to clean
        and rinse the patch stack a few times.  Now they are however looking
        good.
      
         - some dead defines dropped from the Samsung driver, was targeted for
           -rc2 but got delayed
         - drop the strict mode from abx500, this was too strict
         - fix the R-Car sparse IRQs code to work as intended
         - fix the IRQ code for the pinctrl-single GPIO backend to not enforce
           threaded IRQs
         - clear the latched events/IRQs for the Broadcom BCM2835 driver
         - fix up debugfs for the Freescale imx1 driver
         - fix a typo bug in the Schmitt Trigger setup in the LPC18xx driver"
      
      * tag 'pinctrl-v4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: lpc18xx: fix schmitt trigger setup
        Subject: pinctrl: imx1-core: Fix debug output in .pin_config_set callback
        pinctrl: bcm2835: Clear the event latch register when disabling interrupts
        pinctrl: single: ensure pcs irq will not be forced threaded
        sh-pfc: fix sparse GPIOs for R-Car SoCs
        pinctrl: abx500: remove strict mode
        pinctrl: samsung: Remove old unused defines
      71ebd1af