24 Nov, 2008

1 commit


23 Nov, 2008

8 commits


21 Nov, 2008

26 commits

  • Impact: make output of stack_trace complete if buffer overruns

    When read buffer overruns, the output of stack_trace isn't complete.

    When printing records with seq_printf in t_show, if the read buffer
    has overruned by the current record, then this record won't be
    printed to user space through read buffer, it will just be dropped in
    this printing.

    When next printing, t_start should return the "*pos"th record, which
    is the one dropped by previous printing, but it just returns
    (m->private + *pos)th record.

    Here we use a more sane method to implement seq_operations which can
    be found in kernel code. Thus we needn't initialize m->private.

    About testing, it's not easy to overrun read buffer, but we can use
    seq_printf to print more padding bytes in t_show, then it's easy to
    check whether or not records are lost.

    This commit has been tested on both condition of overrun and non
    overrun.

    Signed-off-by: Liming Wang
    Acked-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Liming Wang
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    [ARM] 5330/1: mach-pxa: Fixup reset for systems using reboot=cold or other strings
    [ARM] pxa: fix incorrect PCMCIA PSKTSEL pin configuration for spitz
    [ARM] pxa: fix I2C controller device being registered twice on Akita
    pxafb: only initialize the smart panel thread when dealing with a smartpanel
    pxafb: introduce LCD_TYPE_MASK and use it.

    Linus Torvalds
     
  • Linus Torvalds
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
    [IA64] xen: fix xen_get_eflags.
    [IA64] ia64/pv_ops/pv_cpu_ops: fix _IA64_REG_IP case.
    [IA64] remove duplicate include iommu.h
    [IA64] use mprintk instead of printk, in ia64_mca_modify_original_stack
    [IA64] Rationalize kernel mode alignment checking

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
    USB: ACE1001 patch for cp2101.c
    USB: usbmon: fix read(2)
    USB: gadget rndis: send notifications
    USB: gadget rndis: stop windows self-immolation
    USB: storage: update unusual_devs entries for Nokia 5300 and 5310
    USB: storage: updates unusual_devs entry for the Nokia 6300
    usb: musb: fix bug in musb_schedule
    USB: fix SB700 usb subsystem hang bug

    Linus Torvalds
     
  • fix xen_get_eflags. It doesn't take any argument.

    Signed-off-by: Isaku Yamahata
    Signed-off-by: Tony Luck

    Isaku Yamahata
     
  • pv_cpu_ops.getreg(_IA64_REG_IP) returned constant.
    But the returned ip valued should be the one in the caller, not of the callee.
    This patch fixes that.

    Signed-off-by: Isaku Yamahata
    Signed-off-by: Tony Luck

    Isaku Yamahata
     
  • arch/ia64/kernel/pci-dma.c only needs to include iommu once.

    Signed-off-by: Huang Weiyi
    Signed-off-by: Tony Luck

    Huang Weiyi
     
  • Using printk from MCA/INIT context is unsafe since it can cause deadlock.
    The ia64_mca_modify_original_stack is called from both of mca handler and
    init handler, so it should use mprintk instead of printk.

    Signed-off-by: Hidetoshi Seto
    Signed-off-by: Tony Luck

    Hidetoshi Seto
     
  • Itanium processors can handle some misaligned data accesses. They
    also provide a mode where all such accesses are forced to trap. The
    kernel was schizophrenic about use of this mode:

    * Base kernel code ran in permissive mode where the only traps
    generated were from those cases that the h/w could not handle.
    * Interrupt, syscall and trap code ran in strict mode where all
    unaligned accesses caused traps to the 0x5a00 unaligned reference
    vector.

    Use strict alignment checking throughout the kernel, but make
    sure that we continue to let user mode use more relaxed mode
    as the default.

    Signed-off-by: Tony Luck

    Tony Luck
     
  • When we migrate an interrupt from one CPU to another, we set the
    move_in_progress flag and clean up the vectors later once they're not
    being used. If you're unlucky and call destroy_irq() before the vectors
    become un-used, the move_in_progress flag is never cleared, which causes
    the interrupt to become unusable.

    This was discovered by Jesse Brandeburg for whom it manifested as an
    MSI-X device refusing to use MSI-X mode when the driver was unloaded
    and reloaded repeatedly.

    Signed-off-by: Matthew Wilcox
    Signed-off-by: Linus Torvalds

    Matthew Wilcox
     
  • Fix a regression reported by Max Kellermann whereby kernel profiling
    showed that his clients were spending 45% of their time in
    rpcauth_lookup_credcache.

    It turns out that although his processes had identical uid/gid/groups,
    generic_match() was failing to detect this, because the task->group_info
    pointers were not shared. This again lead to the creation of a huge number
    of identical credentials at the RPC layer.

    The regression is fixed by comparing the contents of task->group_info
    if the actual pointers are not identical.

    Signed-off-by: Trond Myklebust
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
    [CIFS] Do not attempt to close invalidated file handles
    [CIFS] fix check for dead tcon in smb_init

    Linus Torvalds
     
  • * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
    MIPS: csrc-r4k: Fix declaration depending on the wrong CONFIG_ symbol.
    MIPS: csrc-r4k: Fix spelling mistake.
    MIPS: RB532: Provide functions for gpio configuration
    MIPS: IP22: Make indy_sc_ops variable static
    MIPS: RB532: GPIO register offsets are relative to GPIOBASE
    MIPS: Malta: Fix include paths in malta-amon.c

    Linus Torvalds
     
  • …/git/tip/linux-2.6-tip

    * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    intel-iommu: fix compile warnings

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (23 commits)
    net: fix tiny output corruption of /proc/net/snmp6
    atl2: don't request irq on resume if netif running
    ipv6: use seq_release_private for ip6mr.c /proc entries
    pkt_sched: fix missing check for packet overrun in qdisc_dump_stab()
    smc911x: Fix printf format typo in smc911x driver.
    asix: Fix asix-based cards connecting to 10/100Mbs LAN.
    mv643xx_eth: fix recycle check bound
    mv643xx_eth: fix the order of mdiobus_{unregister, free}() calls
    sh: sh_eth: Update to change of mii_bus
    TPROXY: supply a struct flowi->flags argument in inet_sk_rebuild_header()
    TPROXY: fill struct flowi->flags in udp_sendmsg()
    net: ipg.c fix bracing on endian swapping
    phylib: Fix auto-negotiation restart avoidance
    net: jme.c rxdesc.flags is __le16, other missing endian swaps
    phylib: fix phy name example in documentation
    net: Do not fire linkwatch events until the device is registered.
    phonet: fix compilation with gcc-3.4
    ixgbe: fix compilation with gcc-3.4
    pktgen: fix multiple queue warning
    net: fix ip_mr_init() error path
    ...

    Linus Torvalds
     
  • …nel/git/tip/linux-2.6-tip

    * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    ftrace: fix dyn ftrace filter selection
    ftrace: make filtered functions effective on setting
    ftrace: fix set_ftrace_filter
    trace: introduce missing mutex_unlock()
    tracing: kernel/trace/trace.c: introduce missing kfree()

    Linus Torvalds
     
  • …git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: uaccess_64: fix return value in __copy_from_user()
    x86: quirk for reboot stalls on a Dell Optiplex 330

    Linus Torvalds
     
  • Commit 81e192d6ce303b6792aa38ff35f41a1a7357f23a ("parisc: convert to
    generic compat_sys_ptrace") introduced a bug which segfaults the parisc
    64bit kernel when stracing 32bit applications:

    Kernel Fault: Code=15 regs=00000000bafa42b0 (Addr=00000001baf5ab57)
    YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
    PSW: 00001000000001101111111100001011 Tainted: G W
    r00-03 000000ff0806ff0b 000000004068edc0 00000000401203f8 00000000fb3e2508
    r04-07 0000000040686dc0 00000000baf5a800 fffffffffffffffc fffffffffb3e2508
    r08-11 00000000baf5a800 000000000004b068 00000000000402b0 0000000000040d68
    r12-15 0000000000042a9c 0000000000040a9c 0000000000040d60 0000000000042e9c
    r16-19 000000000004b060 000000000004b058 0000000000042d9c ffffffffffffffff
    r20-23 000000000800000b 0000000000000000 000000000800000b fffffffffb3e2508
    r24-27 00000000fffffffc 0000000000000003 00000000fffffffc 0000000040686dc0
    r28-31 00000001baf5a7ff 00000000bafa4280 00000000bafa42b0 00000000000001d7
    sr00-03 0000000000fca000 0000000000000000 0000000000000000 0000000000fca000
    sr04-07 0000000000000000 0000000000000000 0000000000000000 0000000000000000

    IASQ: 0000000000000000 0000000000000000 IAOQ: 0000000040120400 0000000040120404
    IIR: 4b9a06b0 ISR: 0000000000000000 IOR: 00000001baf5ab57
    CPU: 0 CR30: 00000000bafa4000 CR31: 00000000d22344e0
    ORIG_R28: 00000000fb3e2248
    IAOQ[0]: compat_arch_ptrace+0xb8/0x160
    IAOQ[1]: compat_arch_ptrace+0xbc/0x160
    RP(r2): compat_arch_ptrace+0xb0/0x160
    Backtrace:
    [] compat_sys_ptrace+0x15c/0x180
    [] syscall_exit+0x0/0x14

    The problem is that compat_arch_ptrace() enters with an addr value of
    type compat_ulong_t and calls translate_usr_offset() to translate the
    address offset into a struct pt_regs offset like this:

    addr = translate_usr_offset(addr)

    this means that any return value of translate_usr_offset() is stored
    back as compat_ulong_t type into the addr variable.

    But since translate_usr_offset() returns -1 for invalid offsets, addr
    can now get the value 0xffffffff which then fails the next return-value
    sanity check and thus the kernel tries to access invalid memory:

    if (addr < 0)
    break;

    Fix this bug by modifying translate_usr_offset() to take and return
    values of type compat_ulong_t, and by returning the value
    "sizeof(struct pt_regs)" as an error indicator.

    Additionally change the sanity check to check for return values
    for >= sizeof(struct pt_regs).

    This patch survived my compile and run-tests.

    Signed-off-by: Helge Deller
    Signed-off-by: Linus Torvalds

    Helge Deller
     
  • If a connection with open file handles has gone down
    and come back up and reconnected without reopening
    the file handle yet, do not attempt to send an SMB close
    request for this handle in cifs_close. We were
    checking for the connection being invalid in cifs_close
    but since the connection may have been reconnected
    we also need to check whether the file handle
    was marked invalid (otherwise we could close the
    wrong file handle by accident).

    Acked-by: Jeff Layton
    Signed-off-by: Steve French

    Steve French
     
  • Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • As gpiolib doesn't support pin multiplexing, it provides no way to
    access the GPIOFUNC register. Also there is no support for setting
    interrupt status and level. These functions provide access to them and
    are needed by the CompactFlash driver.

    Signed-off-by: Phil Sutter
    Signed-off-by: Ralf Baechle

    Phil Sutter
     
  • The indy_sc_ops variable in arch/mips/mm/sc-ip22.c is needlessly defined
    global, and this patch makes it static.

    Signed-off-by: Dmitri Vorobiev
    Signed-off-by: Ralf Baechle
    ---

    Dmitri Vorobiev
     
  • This patch fixes the wrong use of GPIO register offsets
    in devices.c. To avoid further problems, use gpio_get_value
    to return the NAND status instead of our own expanded code.

    Also define the zero offset of the alternate function register to allow
    consistent access.

    Signed-off-by: Florian Fainelli
    Signed-off-by: Phil Sutter
    Signed-off-by: Ralf Baechle

    Florian Fainelli
     
  • On linux-queue, malta doesn't build after the include file relocation.
    This should fix it.

    There some occurrences of 'asm-mips' in the comments of quite a few
    files, but this is the only place I found it in any code.

    Signed-off-by: David Daney
    Signed-off-by: Ralf Baechle

    David Daney
     

20 Nov, 2008

5 commits

  • Because "name" is static, it can be occasionally be filled with
    somewhat garbage if two processes read /proc/net/snmp6.

    Also, remove useless casts and "-1" -- snprintf() correctly terminates it's
    output.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     
  • If the device is suspended with the cable disconnected, then
    resumed with the cable connected, dev->open is called before
    resume. During resume, we request an IRQ, but the IRQ was
    already assigned during dev->open, resulting in the warning
    shown below.

    Don't request an IRQ if the device is running.

    Call Trace:
    [] warn_on_slowpath+0x40/0x59
    [] raw_pci_read+0x4d/0x55
    [] pci_read+0x1c/0x21
    [] __pci_find_next_cap_ttl+0x44/0x70
    [] __pci_find_next_cap+0x1a/0x1f
    [] pci_find_capability+0x28/0x2c
    [] pci_msi_check_device+0x53/0x62
    [] pci_enable_msi+0x3a/0x1cd
    [] atl2_write_phy_reg+0x40/0x5f [atl2]
    [] dma_generic_alloc_coherent+0x0/0xd7
    [] atl2_request_irq+0x15/0x49 [atl2]
    [] atl2_open+0x20b/0x297 [atl2]
    [] dev_open+0x62/0x91
    [] dev_change_flags+0x93/0x141
    [] do_setlink+0x238/0x2d5
    [] rtnl_setlink+0xa9/0xbf
    [] mutex_lock+0xb/0x19
    [] rtnl_dump_ifinfo+0x0/0x69
    [] rtnl_setlink+0x0/0xbf
    [] rtnetlink_rcv_msg+0x185/0x19f
    [] sock_rmalloc+0x23/0x57
    [] rtnetlink_rcv_msg+0x0/0x19f
    [] netlink_rcv_skb+0x2d/0x71
    [] rtnetlink_rcv+0x14/0x1a
    [] netlink_unicast+0x184/0x1e4
    [] netlink_sendmsg+0x233/0x240
    [] sock_sendmsg+0xb7/0xd0
    [] autoremove_wake_function+0x0/0x2b
    [] autoremove_wake_function+0x0/0x2b
    [] mempool_alloc+0x2d/0x9e
    [] scsi_pool_alloc_command+0x35/0x4f
    [] mutex_lock+0xb/0x19
    [] unix_stream_recvmsg+0x357/0x3e2
    [] copy_from_user+0x23/0x4f
    [] verify_iovec+0x3e/0x6c
    [] sys_sendmsg+0x18d/0x1f0
    [] sys_recvmsg+0x146/0x1c8
    [] sys_recvmsg+0x1b4/0x1c8
    [] __wake_up+0xf/0x15
    [] netlink_table_ungrab+0x17/0x19
    [] copy_to_user+0x25/0x3b
    [] move_addr_to_user+0x50/0x68
    [] sys_getsockname+0x6f/0x9a
    [] sys_getsockname+0x89/0x9a
    [] do_wp_page+0x3ae/0x41a
    [] handle_mm_fault+0x4c5/0x540
    [] sys_socketcall+0x176/0x1b0
    [] sysenter_do_call+0x12/0x21

    Signed-off-by: Alan Jenkins
    Signed-off-by: Jay Cliburn
    Signed-off-by: David S. Miller

    Alan Jenkins
     
  • In ip6mr.c, /proc entries /proc/net/ip6_mr_cache and /proc/net/ip6_mr_vif
    are opened with seq_open_private(), thus seq_release_private() should be
    used to release them.
    Should fix a small memory leak.

    Signed-off-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery
     
  • nla_nest_start() might return NULL, causing a NULL pointer dereference.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • David S. Miller