07 Jan, 2011

19 commits

  • Protect d_subdirs and d_child with d_lock, except in filesystems that aren't
    using dcache_lock for these anyway (eg. using i_mutex).

    Note: if we change the locking rule in future so that ->d_child protection is
    provided only with ->d_parent->d_lock, it may allow us to reduce some locking.
    But it would be an exception to an otherwise regular locking scheme, so we'd
    have to see some good results. Probably not worthwhile.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Protect d_unhashed(dentry) condition with d_lock. This means keeping
    DCACHE_UNHASHED bit in synch with hash manipulations.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Make d_count non-atomic and protect it with d_lock. This allows us to ensure a
    0 refcount dentry remains 0 without dcache_lock. It is also fairly natural when
    we start protecting many other dentry members with d_lock.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Add a new lock, dcache_lru_lock, to protect the dcache LRU list from concurrent
    modification. d_lru is also protected by d_lock, which allows LRU lists to be
    accessed without the lru lock, using RCU in future patches.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Add a new lock, dcache_hash_lock, to protect the dcache hash table from
    concurrent modification. d_hash is also protected by d_lock.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Remove dcache_lock locking from hostfs filesystem, and move it into dcache
    helpers. All that is required is a coherent path name. Protection from
    concurrent modification of the namespace after path name generation is not
    provided in current code, because dcache_lock is dropped before the path is
    used.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Change d_hash so it may be called from lock-free RCU lookups. See similar
    patch for d_compare for details.

    For in-tree filesystems, this is just a mechanical change.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Change d_compare so it may be called from lock-free RCU lookups. This
    does put significant restrictions on what may be done from the callback,
    however there don't seem to have been any problems with in-tree fses.
    If some strange use case pops up that _really_ cannot cope with the
    rcu-walk rules, we can just add new rcu-unaware callbacks, which would
    cause name lookup to drop out of rcu-walk mode.

    For in-tree filesystems, this is just a mechanical change.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • smpfs and ncpfs want to update a live dentry name in-place. Rather than
    have them open code the locking, provide a documented dcache API.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Use vfat's method for dealing with negative dentries to preserve case,
    rather than overwrite dentry name in d_revalidate, which is a bit ugly
    and also gets in the way of doing lock-free path walking.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Use vfat's method for dealing with negative dentries to preserve case,
    rather than overwrite dentry name in d_revalidate, which is a bit ugly
    and also gets in the way of doing lock-free path walking.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Change d_delete from a dentry deletion notification to a dentry caching
    advise, more like ->drop_inode. Require it to be constant and idempotent,
    and not take d_lock. This is how all existing filesystems use the callback
    anyway.

    This makes fine grained dentry locking of dput and dentry lru scanning
    much simpler.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Remove redundant (and incorrect, since dcache RCU lookup) dentry locking
    documentation and point to the canonical document.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Switching d_op on a live dentry is racy in general, so avoid it. In this case
    it is a negative dentry, which is safer, but there are still concurrent ops
    which may be called on d_op in that case (eg. d_revalidate). So in general
    a filesystem may not do this. Fix configfs so as not to do this.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Switching d_op on a live dentry is racy in general, so avoid it. In this case
    it is a negative dentry, which is safer, but there are still concurrent ops
    which may be called on d_op in that case (eg. d_revalidate). So in general
    a filesystem may not do this. Fix cgroupfs so as not to do this.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • percpu_counter library generates quite nasty code, so unless you need
    to dynamically allocate counters or take fast approximate value, a
    simple per cpu set of counters is much better.

    The percpu_counter can never be made to work as well, because it has an
    indirection from pointer to percpu memory, and it can't use direct
    this_cpu_inc interfaces because it doesn't use static PER_CPU data, so
    code will always be worse.

    In the fastpath, it is the difference between this:

    incl %gs:nr_dentry # nr_dentry

    and this:

    movl percpu_counter_batch(%rip), %edx # percpu_counter_batch,
    movl $1, %esi #,
    movq $nr_dentry, %rdi #,
    call __percpu_counter_add # (plus I clobber registers)

    __percpu_counter_add:
    pushq %rbp #
    movq %rsp, %rbp #,
    subq $32, %rsp #,
    movq %rbx, -24(%rbp) #,
    movq %r12, -16(%rbp) #,
    movq %r13, -8(%rbp) #,
    movq %rdi, %rbx # fbc, fbc
    #APP
    # 216 "/home/npiggin/usr/src/linux-2.6/arch/x86/include/asm/thread_info.h" 1
    movq %gs:kernel_stack,%rax #, pfo_ret__
    # 0 "" 2
    #NO_APP
    incl -8124(%rax) # .preempt_count
    movq 32(%rdi), %r12 # .counters, tcp_ptr__
    #APP
    # 78 "lib/percpu_counter.c" 1
    add %gs:this_cpu_off, %r12 # this_cpu_off, tcp_ptr__
    # 0 "" 2
    #NO_APP
    movslq (%r12),%r13 #* tcp_ptr__, tmp73
    movslq %edx,%rax # batch, batch
    addq %rsi, %r13 # amount, count
    cmpq %rax, %r13 # batch, count
    jge .L27 #,
    negl %edx # tmp76
    movslq %edx,%rdx # tmp76, tmp77
    cmpq %rdx, %r13 # tmp77, count
    jg .L28 #,
    .L27:
    movq %rbx, %rdi # fbc,
    call _raw_spin_lock #
    addq %r13, 8(%rbx) # count, .count
    movq %rbx, %rdi # fbc,
    movl $0, (%r12) #,* tcp_ptr__
    call _raw_spin_unlock #
    .L29:
    #APP
    # 216 "/home/npiggin/usr/src/linux-2.6/arch/x86/include/asm/thread_info.h" 1
    movq %gs:kernel_stack,%rax #, pfo_ret__
    # 0 "" 2
    #NO_APP
    decl -8124(%rax) # .preempt_count
    movq -8136(%rax), %rax #, D.14625
    testb $8, %al #, D.14625
    jne .L32 #,
    .L31:
    movq -24(%rbp), %rbx #,
    movq -16(%rbp), %r12 #,
    movq -8(%rbp), %r13 #,
    leave
    ret
    .p2align 4,,10
    .p2align 3
    .L28:
    movl %r13d, (%r12) # count,*
    jmp .L29 #
    .L32:
    call preempt_schedule #
    .p2align 4,,6
    jmp .L31 #
    .size __percpu_counter_add, .-__percpu_counter_add
    .p2align 4,,15

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • The nr_unused counters count the number of objects on an LRU, and as such they
    are synchronized with LRU object insertion and removal and scanning, and
    protected under the LRU lock.

    Making it per-cpu does not actually get any concurrency improvements because of
    this lock, and summing the counter is much slower, and
    incrementing/decrementing it costs more code size and is slower too.

    These counters should stay per-LRU, which currently means global.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • This is a nasty and error prone API. It is no longer used, remove it.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • d_validate has been broken for a long time.

    kmem_ptr_validate does not guarantee that a pointer can be dereferenced
    if it can go away at any time. Even rcu_read_lock doesn't help, because
    the pointer might be queued in RCU callbacks but not executed yet.

    So the parent cannot be checked, nor the name hashed. The dentry pointer
    can not be touched until it can be verified under lock. Hashing simply
    cannot be used.

    Instead, verify the parent/child relationship by traversing parent's
    d_child list. It's slow, but only ncpfs and the destaged smbfs care
    about it, at this point.

    Signed-off-by: Nick Piggin

    Nick Piggin
     

05 Jan, 2011

5 commits

  • This reverts commit 3825bdb7ed920845961f32f364454bee5f469abb.

    You cannot dget() a dentry without having a reference, or holding
    a lock that guarantees it remains valid.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    ipv4/route.c: respect prefsrc for local routes
    bridge: stp: ensure mac header is set
    bridge: fix br_multicast_ipv6_rcv for paged skbs
    atl1: fix oops when changing tx/rx ring params
    drivers/atm/atmtcp.c: add missing atm_dev_put
    starfire: Fix dma_addr_t size test for MIPS
    tg3: fix return value check in tg3_read_vpd()
    Broadcom CNIC core network driver: fix mem leak on allocation failures in cnic_alloc_uio_rings()
    ISDN, Gigaset: Fix memory leak in do_disconnect_req()
    CAN: Use inode instead of kernel address for /proc file
    skfp: testing the wrong variable in skfp_driver_init()
    ppp: allow disabling multilink protocol ID compression
    ehea: Avoid changing vlan flags
    ueagle-atm: fix PHY signal initialization race

    Linus Torvalds
     
  • The preferred source address is currently ignored for local routes,
    which results in all local connections having a src address that is the
    same as the local dst address. Fix this by respecting the preferred source
    address when it is provided for local routes.

    This bug can be demonstrated as follows:

    # ifconfig dummy0 192.168.0.1
    # ip route show table local | grep local.*dummy0
    local 192.168.0.1 dev dummy0 proto kernel scope host src 192.168.0.1
    # ip route change table local local 192.168.0.1 dev dummy0 \
    proto kernel scope host src 127.0.0.1
    # ip route show table local | grep local.*dummy0
    local 192.168.0.1 dev dummy0 proto kernel scope host src 127.0.0.1

    We now establish a local connection and verify the source IP
    address selection:

    # nc -l 192.168.0.1 3128 &
    # nc 192.168.0.1 3128 &
    # netstat -ant | grep 192.168.0.1:3128.*EST
    tcp 0 0 192.168.0.1:3128 192.168.0.1:33228 ESTABLISHED
    tcp 0 0 192.168.0.1:33228 192.168.0.1:3128 ESTABLISHED

    Signed-off-by: Joel Sing
    Signed-off-by: David S. Miller

    Joel Sing
     
  • The ->trim_fs has been removed meanwhile, so remove it from the documentation
    as well.

    Signed-off-by: Christoph Hellwig
    Reported-by: Ryusuke Konishi
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

04 Jan, 2011

12 commits

  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    ARM: pxa: fix page table corruption on resume
    ARM: it8152: add IT8152_LAST_IRQ definition to fix build error
    ARM: pxa: PXA_ESERIES depends on FB_W100.
    ARM: 6605/1: Add missing include "asm/memory.h"
    ARM: 6540/1: Stop irqsoff trace on return to user
    ARM: 6537/1: update Nomadik, U300 and Ux500 maintainers
    ARM: 6536/1: Add missing SZ_{32,64,128}
    ARM: fix cache-feroceon-l2 after stack based kmap_atomic()
    ARM: fix cache-xsc3l2 after stack based kmap_atomic()
    ARM: get rid of kmap_high_l1_vipt()
    ARM: smp: avoid incrementing mm_users on CPU startup
    ARM: pxa: PXA_ESERIES depends on FB_W100.

    Linus Torvalds
     
  • Addresses https://bugzilla.kernel.org/show_bug.cgi?id=25702

    Reported-by: Martin Ettl
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • If security_filter_rule_init() doesn't return a rule, then not everything
    is as fine as the return code implies.

    This bug only occurs when the LSM (eg. SELinux) is disabled at runtime.

    Adding an empty LSM rule causes ima_match_rules() to always succeed,
    ignoring any remaining rules.

    default IMA TCB policy:
    # PROC_SUPER_MAGIC
    dont_measure fsmagic=0x9fa0
    # SYSFS_MAGIC
    dont_measure fsmagic=0x62656572
    # DEBUGFS_MAGIC
    dont_measure fsmagic=0x64626720
    # TMPFS_MAGIC
    dont_measure fsmagic=0x01021994
    # SECURITYFS_MAGIC
    dont_measure fsmagic=0x73636673

    < LSM specific rule >
    dont_measure obj_type=var_log_t

    measure func=BPRM_CHECK
    measure func=FILE_MMAP mask=MAY_EXEC
    measure func=FILE_CHECK mask=MAY_READ uid=0

    Thus without the patch, with the boot parameters 'tcb selinux=0', adding
    the above 'dont_measure obj_type=var_log_t' rule to the default IMA TCB
    measurement policy, would result in nothing being measured. The patch
    prevents the default TCB policy from being replaced.

    Signed-off-by: Mimi Zohar
    Cc: James Morris
    Acked-by: Serge Hallyn
    Cc: David Safford
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mimi Zohar
     
  • Russell King
     
  • commit bf9ae5386bca8836c16e69ab8fdbe46767d7452a
    (llc: use dev_hard_header) removed the
    skb_reset_mac_header call from llc_mac_hdr_init.

    This seems fine itself, but br_send_bpdu() invokes ebtables LOCAL_OUT.

    We oops in ebt_basic_match() because it assumes eth_hdr(skb) returns
    a meaningful result.

    Cc: acme@ghostprotocols.net
    References: https://bugzilla.kernel.org/show_bug.cgi?id=24532
    Signed-off-by: Florian Westphal
    Signed-off-by: David S. Miller

    Florian Westphal
     
  • …/git/tip/linux-2.6-tip

    * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    perf: Fix callchain hit bad cast on ascii display
    arch/x86/oprofile/op_model_amd.c: Perform initialisation on a single CPU
    watchdog: Improve initialisation error message and documentation

    Linus Torvalds
     
  • * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
    [media] em28xx: radio_fops should also use unlocked_ioctl
    [media] wm8775: Revert changeset fcb9757333 to avoid a regression
    [media] cx25840: Prevent device probe failure due to volume control ERANGE error

    Linus Torvalds
     
  • * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
    dmaengine: provide dummy functions for DMA_ENGINE=n
    mv_xor: fix race in tasklet function

    Linus Torvalds
     
  • The function can't be __init itself (being called from some sysfs
    handler), and hence none of the functions it calls can be either.

    Signed-off-by: Jan Beulich
    Acked-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • use pskb_may_pull to access ipv6 header correctly for paged skbs
    It was omitted in the bridge code leading to crash in blind
    __skb_pull

    since the skb is cloned undonditionally we also simplify the
    the exit path

    this fixes bug https://bugzilla.kernel.org/show_bug.cgi?id=25202

    Dec 15 14:36:40 User-PC hostapd: wlan0: STA 00:15:00:60:5d:34 IEEE 802.11: authenticated
    Dec 15 14:36:40 User-PC hostapd: wlan0: STA 00:15:00:60:5d:34 IEEE 802.11: associated (aid 2)
    Dec 15 14:36:40 User-PC hostapd: wlan0: STA 00:15:00:60:5d:34 RADIUS: starting accounting session 4D0608A3-00000005
    Dec 15 14:36:41 User-PC kernel: [175576.120287] ------------[ cut here ]------------
    Dec 15 14:36:41 User-PC kernel: [175576.120452] kernel BUG at include/linux/skbuff.h:1178!
    Dec 15 14:36:41 User-PC kernel: [175576.120609] invalid opcode: 0000 [#1] SMP
    Dec 15 14:36:41 User-PC kernel: [175576.120749] last sysfs file: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/uevent
    Dec 15 14:36:41 User-PC kernel: [175576.121035] Modules linked in: approvals binfmt_misc bridge stp llc parport_pc ppdev arc4 iwlagn snd_hda_codec_realtek iwlcore i915 snd_hda_intel mac80211 joydev snd_hda_codec snd_hwdep snd_pcm snd_seq_midi drm_kms_helper snd_rawmidi drm snd_seq_midi_event snd_seq snd_timer snd_seq_device cfg80211 eeepc_wmi usbhid psmouse intel_agp i2c_algo_bit intel_gtt uvcvideo agpgart videodev sparse_keymap snd shpchp v4l1_compat lp hid video serio_raw soundcore output snd_page_alloc ahci libahci atl1c
    Dec 15 14:36:41 User-PC kernel: [175576.122712]
    Dec 15 14:36:41 User-PC kernel: [175576.122769] Pid: 0, comm: kworker/0:0 Tainted: G W 2.6.37-rc5-wl+ #3 1015PE/1016P
    Dec 15 14:36:41 User-PC kernel: [175576.123012] EIP: 0060:[] EFLAGS: 00010283 CPU: 1
    Dec 15 14:36:41 User-PC kernel: [175576.123193] EIP is at br_multicast_rcv+0xc95/0xe1c [bridge]
    Dec 15 14:36:41 User-PC kernel: [175576.123362] EAX: 0000001c EBX: f5626318 ECX: 00000000 EDX: 00000000
    Dec 15 14:36:41 User-PC kernel: [175576.123550] ESI: ec512262 EDI: f5626180 EBP: f60b5ca0 ESP: f60b5bd8
    Dec 15 14:36:41 User-PC kernel: [175576.123737] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
    Dec 15 14:36:41 User-PC kernel: [175576.123902] Process kworker/0:0 (pid: 0, ti=f60b4000 task=f60a8000 task.ti=f60b0000)
    Dec 15 14:36:41 User-PC kernel: [175576.124137] Stack:
    Dec 15 14:36:41 User-PC kernel: [175576.124181] ec556500 f6d06800 f60b5be8 c01087d8 ec512262 00000030 00000024 f5626180
    Dec 15 14:36:41 User-PC kernel: [175576.124181] f572c200 ef463440 f5626300 3affffff f6d06dd0 e60766a4 000000c4 f6d06860
    Dec 15 14:36:41 User-PC kernel: [175576.124181] ffffffff ec55652c 00000001 f6d06844 f60b5c64 c0138264 c016e451 c013e47d
    Dec 15 14:36:41 User-PC kernel: [175576.124181] Call Trace:
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? sched_clock+0x8/0x10
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? enqueue_entity+0x174/0x440
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? sched_clock_cpu+0x131/0x190
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? select_task_rq_fair+0x2ad/0x730
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? nf_iterate+0x71/0x90
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? br_handle_frame_finish+0x184/0x220 [bridge]
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? br_handle_frame_finish+0x0/0x220 [bridge]
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? br_handle_frame+0x189/0x230 [bridge]
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? br_handle_frame_finish+0x0/0x220 [bridge]
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? br_handle_frame+0x0/0x230 [bridge]
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? __netif_receive_skb+0x1b6/0x5b0
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? skb_copy_bits+0x110/0x210
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? netif_receive_skb+0x6f/0x80
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? ieee80211_deliver_skb+0x8c/0x1a0 [mac80211]
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? ieee80211_rx_handlers+0xeb6/0x1aa0 [mac80211]
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? __netif_receive_skb+0x380/0x5b0
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? sched_clock_local+0xb2/0x190
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? default_spin_lock_flags+0x8/0x10
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? _raw_spin_lock_irqsave+0x2f/0x50
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? ieee80211_prepare_and_rx_handle+0x201/0xa90 [mac80211]
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? ieee80211_rx+0x2a4/0x830 [mac80211]
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? iwl_update_stats+0xa6/0x2a0 [iwlcore]
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? iwlagn_rx_reply_rx+0x292/0x3b0 [iwlagn]
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? _raw_spin_lock_irqsave+0x2f/0x50
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? iwl_rx_handle+0xe7/0x350 [iwlagn]
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? iwl_irq_tasklet+0xf7/0x5c0 [iwlagn]
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? __rcu_process_callbacks+0x201/0x2d0
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? tasklet_action+0xc5/0x100
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? __do_softirq+0x97/0x1d0
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? nmi_stack_correct+0x2f/0x34
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? __do_softirq+0x0/0x1d0
    Dec 15 14:36:41 User-PC kernel: [175576.124181]
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? irq_exit+0x65/0x70
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? do_IRQ+0x52/0xc0
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? common_interrupt+0x30/0x38
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? intel_idle+0xc2/0x160
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? cpuidle_idle_call+0x6b/0x100
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? cpu_idle+0x8a/0xf0
    Dec 15 14:36:41 User-PC kernel: [175576.124181] [] ? start_secondary+0x1e8/0x1ee

    Cc: David Miller
    Cc: Johannes Berg
    Cc: Stephen Hemminger
    Signed-off-by: Tomas Winkler
    Signed-off-by: David S. Miller

    Tomas Winkler
     
  • Commit 3f5a2a713aad28480d86b0add00c68484b54febc zeroes out the statistics
    message block (SMB) and coalescing message block (CMB) when adapter ring
    resources are freed. This is desirable behavior, but, as a side effect,
    the commit leads to an oops when atl1_set_ringparam() attempts to alter
    the number of rx or tx elements in the ring buffer (by using ethtool
    -G, for example). We don't want SMB or CMB to change during this
    operation.

    Modify atl1_set_ringparam() to preserve SMB and CMB when changing ring
    parameters.

    Cc: stable@kernel.org
    Signed-off-by: Jay Cliburn
    Reported-by: Tõnu Raitviir
    Signed-off-by: David S. Miller

    J. K. Cliburn
     
  • …eric/random-tracing into perf/urgent

    Ingo Molnar
     

03 Jan, 2011

4 commits

  • Before this patch, the following error would sometimes occur after a
    resume on pxa3xx:

    /path/to/mm/memory.c:144: bad pmd 8040542e.

    The problem was that a temporary page table mapping was being improperly
    restored.

    The PXA3xx resume code creates a temporary mapping of resume_turn_on_mmu
    to avoid a prefetch abort. The pxa3xx_resume_after_mmu code requires
    that the r1 register holding the address of this mapping not be
    modified, however, resume_turn_on_mmu does modify it. It is mostly
    correct in that r1 receives the base table address, but it may also
    get other bits in 13:0. This results in pxa3xx_resume_after_mmu
    restoring the original mapping to the wrong place, corrupting memory
    and leaving the temporary mapping in place.

    Signed-off-by: Matt Reimer
    Signed-off-by: Eric Miao

    Aric D. Blumer
     
  • The commit 6ac6b817f3f4c23c5febd960d8deb343e13af5f3 (ARM: pxa: encode
    IRQ number into .nr_irqs) removed definition of ITE_LAST_IRQ which
    caused the following build error:

    CC arch/arm/common/it8152.o
    arch/arm/common/it8152.c: In function 'it8152_init_irq':
    arch/arm/common/it8152.c:86: error: 'IT8152_LAST_IRQ' undeclared (first use in this function)
    arch/arm/common/it8152.c:86: error: (Each undeclared identifier is reported only once
    arch/arm/common/it8152.c:86: error: for each function it appears in.)
    make[2]: *** [arch/arm/common/it8152.o] Error 1

    Defining the IT8152_LAST_IRQ in the arch/arm/include/hardware/it8152.c
    fixes the build.

    Signed-off-by: Mike Rapoport
    Signed-off-by: Eric Miao

    Mike Rapoport
     
  • As arch/arm/mach-pxa/eseries.c references w100fb_gpio_{read,write}()
    directly.

    Signed-off-by: Lennert Buytenhek
    Signed-off-by: Eric Miao

    Lennert Buytenhek
     
  • ipchain__fprintf_graph() casts the number of hits in a branch as an
    int, which means we lose its highests bits.

    This results in meaningless number of callchain hits in perf.data
    that have a high number of hits recorded, typically those that have
    callchain branches hits appearing more than INT_MAX. This happens
    easily as those are pondered by the event period.

    Reported-by: Nick Piggin
    Signed-off-by: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Paul Mackerras

    Frederic Weisbecker