29 Apr, 2009

26 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (24 commits)
    e100: do not go D3 in shutdown unless system is powering off
    netfilter: revised locking for x_tables
    Bluetooth: Fix connection establishment with low security requirement
    Bluetooth: Add different pairing timeout for Legacy Pairing
    Bluetooth: Ensure that HCI sysfs add/del is preempt safe
    net: Avoid extra wakeups of threads blocked in wait_for_packet()
    net: Fix typo in net_device_ops description.
    ipv4: Limit size of route cache hash table
    Add reference to CAPI 2.0 standard
    Documentation/isdn/INTERFACE.CAPI
    update Documentation/isdn/00-INDEX
    ixgbe: Fix WoL functionality for 82599 KX4 devices
    veth: prevent oops caused by netdev destructor
    xfrm: wrong hash value for temporary SA
    forcedeth: tx timeout fix
    net: Fix LL_MAX_HEADER for CONFIG_TR_MODULE
    mlx4_en: Handle page allocation failure during receive
    mlx4_en: Fix cleanup flow on cq activation
    vlan: update vlan carrier state for admin up/down
    netfilter: xt_recent: fix stack overread in compat code
    ...

    Linus Torvalds
     
  • After experimenting with kexec with the last merges after 2.6.29, I've
    had some problems when probing e100. It would not read the eeprom. After
    some bisects, I realized this has been like that since forever (at least
    2.6.18). The problem is that shutdown is doing the same thing that
    suspend does and puts the device in D3 state. I couldn't find a way to
    get the device back to a sane state in the probe function. So, based on
    some similar patches from Rafael J. Wysocki for e1000, e1000e, and ixgbe,
    I wrote this one for e100.

    Signed-off-by: Thadeu Lima de Souza Cascardo
    Acked-by: "Rafael J. Wysocki"
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Thadeu Lima de Souza Cascardo
     
  • David S. Miller
     
  • The x_tables are organized with a table structure and a per-cpu copies
    of the counters and rules. On older kernels there was a reader/writer
    lock per table which was a performance bottleneck. In 2.6.30-rc, this
    was converted to use RCU and the counters/rules which solved the performance
    problems for do_table but made replacing rules much slower because of
    the necessary RCU grace period.

    This version uses a per-cpu set of spinlocks and counters to allow to
    table processing to proceed without the cache thrashing of a global
    reader lock and keeps the same performance for table updates.

    Signed-off-by: Stephen Hemminger
    Acked-by: Linus Torvalds
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • * 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel:
    drm/i915: fix up error path leak in i915_cmdbuffer
    drm/i915: fix unpaired i915 device mutex on entervt failure.
    drm/i915: add support for G41 chipset
    drm/i915: Enable ASLE if present
    drm/i915: Unregister ACPI video driver when exiting
    drm/i915: Register ACPI video even when not modesetting
    drm/i915: fix transition to I915_TILING_NONE
    drm/i915: Don't let an oops get triggered from irq_emit without dma init.
    drm/i915: allow tiled front buffers on 965+

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (21 commits)
    RDMA/nes: Update iw_nes version
    RDMA/nes: Fix error path in nes_accept()
    RDMA/nes: Fix hang issues for large cluster dynamic connections
    RDMA/nes: Increase rexmit timeout interval
    RDMA/nes: Check for sequence number wrap-around
    RDMA/nes: Do not set apbvt entry for loopback
    RDMA/nes: Fix unused variable compile warning when INFINIBAND_NES_DEBUG=n
    RDMA/nes: Fix fw_ver in /sys
    RDMA/nes: Set trace length to 1 inch for SFP_D
    RDMA/nes: Enable repause timer for port 1
    RDMA/nes: Correct CDR loop filter setting for port 1
    RDMA/nes: Modify thermo mitigation to flip SerDes1 ref clk to internal
    RDMA/nes: Fix resource issues in nes_create_cq() and nes_destroy_cq()
    RDMA/nes: Remove root_256()'s unused pbl_count_256 parameter
    mlx4_core: Fix memory leak in mlx4_enable_msi_x()
    IB/mthca: Fix timeout for INIT_HCA and a few other commands
    RDMA/cxgb3: Don't zero QP attrs when moving to IDLE
    RDMA/nes: Fix bugs in nes_reg_phys_mr()
    RDMA/nes: Fix compiler warning at nes_verbs.c:1955
    IPoIB: Disable NAPI while CQ is being drained
    ...

    Linus Torvalds
     
  • Fix this:

    arch/m68k/kernel/sun3-head.S: Assembler messages:
    arch/m68k/kernel/sun3-head.S:32: Error: Unknown operator -- statement `__head' ignored

    Introduced by commit 6f335cab0431d5df4995bcd4fd952d4c746d5a86 ("m68k:
    convert to use __HEAD and HEAD_TEXT macros."), which started using
    __HEAD without adding the appropriate include.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     
  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    bio: fix memcpy corruption in bio_copy_user_iov()
    hd: fix locking
    mg_disk: fix CONFIG_LBD=y warning
    mg_disk: fix locking

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
    regulator: Fix default constraints for fixed voltage regulators
    regulator/bq24022: fix bug in is_enabled function
    regulator/virtual: fix strings compare predicates
    regulator core: fix double-free in regulator_register() error path
    drivers/regulator: fix when type is different from REGULATOR_VOLTAGE or REGULATOR_CURRENT
    unreachable code in drms_uA_update()
    regulator: fix header file missing kernel-doc

    Linus Torvalds
     
  • Roland Dreier
     
  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
    powerpc/ps3: Fix build error on UP
    powerpc/cell: Select PCI for IBM_CELL_BLADE AND CELLEB
    powerpc: ppc32 needs elf_read_implies_exec()
    powerpc/86xx: Add device_type entry to soc for ppc9a
    powerpc/44x: Correct memory size calculation for denali-based boards
    maintainers: Fix PowerPC 4xx git tree
    powerpc: fix for long standing bug noticed by gcc 4.4.0
    Revert "powerpc: Add support for early tlbilx opcode"

    Linus Torvalds
     
  • Commit edada399 broke the build on 64-bit powerpc because it moved the
    __ftr_alt_* sections of a file away from the .text section, causing
    link failures due to relative conditional branch targets being too far
    away from the branch instructions. This happens on pretty much all
    64-bit powerpc configs.

    This change reverts commit edada399 while preserving the update from
    the *.refok sections to .ref.text that has happened since.

    Signed-off-by: Tim Abbott
    Requested-by: Paul Mackerras
    Signed-off-by: Linus Torvalds

    Tim Abbott
     
  • st driver uses blk_rq_map_user() in order to just build a request out
    of page frames. In this case, map_data->offset is a non zero value and
    iov[0].iov_base is NULL. We need to increase nr_pages for that.

    Cc: stable@kernel.org
    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     
  • hd dance around local irq and HD_IRQ enable without achieving much.
    It ends up transferring data from irq handler with both local irq and
    HD_IRQ disabled. The only place it actually does something is while
    transferring the first block of a request which it does with HD_IRQ
    disabled but local irq enabled.

    Unfortunately, the dancing is horribly broken from locking POV. IRQ
    and timeout handlers access block queue without grabbing the queue
    lock and running the driver in SMP configuration crashes the whole
    machine pretty quickly.

    Remove meaningless irq enable/disable dancing and add proper locking
    in issue, irq and timeout paths.

    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • drivers/block/mg_disk.c: In function ‘mg_dump_status’:
    drivers/block/mg_disk.c:265: warning: format ‘%ld’ expects type ‘long int’, but
    argument 2 has type ‘sector_t’

    [ Impact: kill build warning ]

    Cc: unsik Kim
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Tejun Heo

    Bartlomiej Zolnierkiewicz
     
  • IRQ and timeout handlers call functions which expect locked queue lock
    without locking it. Fix it.

    While at it, convert 0s used as null pointer constant to NULLs.

    [ Impact: fix locking, cleanup ]

    Signed-off-by: Tejun Heo
    Cc: unsik Kim

    Tejun Heo
     
  • Default voltage constraints were being provided for fixed voltage
    regulator where board constraints were not provided but these constraints
    used INT_MIN as the default minimum voltage which is not a valid value
    since it is less than zero. Use 1uV instead.

    Also set the default values we set in the constraints themselves since
    otherwise the max_uV constraint we determine will not be stored in the
    actual constraint strucutre and will therefore not be used.

    Signed-off-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Mark Brown
     
  • This seems to be fallout from last October's regulator core rework.
    It got noticed only because of recent regulator framework changes.

    Signed-off-by: Philipp Zabel
    Signed-off-by: Liam Girdwood

    Philipp Zabel
     
  • Signed-off-by: Mike Rapoport
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Mike Rapoport
     
  • During regulator registration, any error after device_register() will
    cause a double-free on the struct regulator_dev 'rdev'. The bug is in
    drivers/regulator/core.c:regulator_register():

    ...
    scrub:
    device_unregister(&rdev->dev);
    clean:
    kfree(rdev);
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Paul Walmsley
     
  • When regulator_desc->type is something different from REGULATOR_VOLTAGE or REGULATOR_CURRENT
    the if should probably return ERR_PTR(-EINVAL)

    The semantic patch that makes this change is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    @@ expression E; constant C; @@
    (
    - !E == C
    + E != C
    )

    Signed-off-by: Diego Liziero
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Diego Liziero
     
  • I removed the extra semi-colon and indented the return statement.

    The unreachable code was found by smatch (http://repo.or.cz/w/smatch.git).
    The patch was compile tested.

    regards,
    dan carpenter

    Signed-off-by: Dan Carpenter
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Dan Carpenter
     
  • Add regulator header file missing kernel-doc:

    Warning(include/linux/regulator/driver.h:117): No description found for parameter 'set_mode'

    Signed-off-by: Randy Dunlap
    cc: Liam Girdwood
    cc: Mark Brown
    Signed-off-by: Liam Girdwood

    Randy Dunlap
     
  • The Bluetooth 2.1 specification introduced four different security modes
    that can be mapped using Legacy Pairing and Simple Pairing. With the
    usage of Simple Pairing it is required that all connections (except
    the ones for SDP) are encrypted. So even the low security requirement
    mandates an encrypted connection when using Simple Pairing. When using
    Legacy Pairing (for Bluetooth 2.0 devices and older) this is not required
    since it causes interoperability issues.

    To support this properly the low security requirement translates into
    different host controller transactions depending if Simple Pairing is
    supported or not. However in case of Simple Pairing the command to
    switch on encryption after a successful authentication is not triggered
    for the low security mode. This patch fixes this and actually makes
    the logic to differentiate between Simple Pairing and Legacy Pairing
    a lot simpler.

    Based on a report by Ville Tervo

    Signed-off-by: Marcel Holtmann

    Marcel Holtmann
     
  • The Bluetooth stack uses a reference counting for all established ACL
    links and if no user (L2CAP connection) is present, the link will be
    terminated to save power. The problem part is the dedicated pairing
    when using Legacy Pairing (Bluetooth 2.0 and before). At that point
    no user is present and pairing attempts will be disconnected within
    10 seconds or less. In previous kernel version this was not a problem
    since the disconnect timeout wasn't triggered on incoming connections
    for the first time. However this caused issues with broken host stacks
    that kept the connections around after dedicated pairing. When the
    support for Simple Pairing got added, the link establishment procedure
    needed to be changed and now causes issues when using Legacy Pairing

    When using Simple Pairing it is possible to do a proper reference
    counting of ACL link users. With Legacy Pairing this is not possible
    since the specification is unclear in some areas and too many broken
    Bluetooth devices have already been deployed. So instead of trying to
    deal with all the broken devices, a special pairing timeout will be
    introduced that increases the timeout to 60 seconds when pairing is
    triggered.

    If a broken devices now puts the stack into an unforeseen state, the
    worst that happens is the disconnect timeout triggers after 120 seconds
    instead of 4 seconds. This allows successful pairings with legacy and
    broken devices now.

    Based on a report by Johan Hedberg

    Signed-off-by: Marcel Holtmann

    Marcel Holtmann
     
  • Use a different work_struct variables for add_conn() and del_conn() and
    use single work queue instead of two for adding and deleting connections.

    It eliminates the following error on a preemptible kernel:

    [ 204.358032] Unable to handle kernel NULL pointer dereference at virtual address 0000000c
    [ 204.370697] pgd = c0004000
    [ 204.373443] [0000000c] *pgd=00000000
    [ 204.378601] Internal error: Oops: 17 [#1] PREEMPT
    [ 204.383361] Modules linked in: vfat fat rfcomm sco l2cap sd_mod scsi_mod iphb pvr2d drm omaplfb ps
    [ 204.438537] CPU: 0 Not tainted (2.6.28-maemo2 #1)
    [ 204.443664] PC is at klist_put+0x2c/0xb4
    [ 204.447601] LR is at klist_put+0x18/0xb4
    [ 204.451568] pc : [] lr : [] psr: a0000113
    [ 204.451568] sp : cf1b3f10 ip : cf1b3f10 fp : cf1b3f2c
    [ 204.463104] r10: 00000000 r9 : 00000000 r8 : bf08029c
    [ 204.468353] r7 : c7869200 r6 : cfbe2690 r5 : c78692c8 r4 : 00000001
    [ 204.474945] r3 : 00000001 r2 : cf1b2000 r1 : 00000001 r0 : 00000000
    [ 204.481506] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
    [ 204.488861] Control: 10c5387d Table: 887fc018 DAC: 00000017
    [ 204.494628] Process btdelconn (pid: 515, stack limit = 0xcf1b22e0)

    Signed-off-by: Roger Quadros
    Signed-off-by: Marcel Holtmann

    Roger Quadros
     

28 Apr, 2009

14 commits

  • This warning shows up on 64 bit builds:

    fs/ecryptfs/inode.c:693: warning: comparison of distinct pointer types
    lacks a cast

    Signed-off-by: Tyler Hicks

    Tyler Hicks
     
  • fs/ecryptfs/inode.c:670: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Tyler Hicks
    Cc: Dustin Kirkland
    Signed-off-by: Andrew Morton

    Randy Dunlap
     
  • In 2.6.25 we added UDP mem accounting.

    This unfortunatly added a penalty when a frame is transmitted, since
    we have at TX completion time to call sock_wfree() to perform necessary
    memory accounting. This calls sock_def_write_space() and utimately
    scheduler if any thread is waiting on the socket.
    Thread(s) waiting for an incoming frame was scheduled, then had to sleep
    again as event was meaningless.

    (All threads waiting on a socket are using same sk_sleep anchor)

    This adds lot of extra wakeups and increases latencies, as noted
    by Christoph Lameter, and slows down softirq handler.

    Reference : http://marc.info/?l=linux-netdev&m=124060437012283&w=2

    Fortunatly, Davide Libenzi recently added concept of keyed wakeups
    into kernel, and particularly for sockets (see commit
    37e5540b3c9d838eb20f2ca8ea2eb8072271e403
    epoll keyed wakeups: make sockets use keyed wakeups)

    Davide goal was to optimize epoll, but this new wakeup infrastructure
    can help non epoll users as well, if they care to setup an appropriate
    handler.

    This patch introduces new DEFINE_WAIT_FUNC() helper and uses it
    in wait_for_packet(), so that only relevant event can wakeup a thread
    blocked in this function.

    Trace of function calls from bnx2 TX completion bnx2_poll_work() is :
    __kfree_skb()
    skb_release_head_state()
    sock_wfree()
    sock_def_write_space()
    __wake_up_sync_key()
    __wake_up_common()
    receiver_wake_function() : Stops here since thread is waiting for an INPUT

    Reported-by: Christoph Lameter
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • A non-SMP version of smp_send_stop() is now included in smp.h.
    Remove the unneeded definition in the PS3 smp.c.

    Fixes build errors like these when CONFIG_SMP=n:

    arch/powerpc/platforms/ps3/setup.c:49: error: redefinition of 'smp_send_stop'
    include/linux/smp.h:125: error: previous definition of 'smp_send_stop' was here

    Reported-by: Subrata Modak
    Signed-off-by: Geoff Levand
    Signed-off-by: Paul Mackerras

    Geoff Levand
     
  • Currently PPC_CELL_NATIVE selects PPC_OF_PLATFORM_PCI, but does not
    select PCI. This can lead to a config with the former and the latter
    disabled, which does not build.

    To fix this PPC_CELL_NATIVE should select PCI. However, that would
    force PCI on for QPACE, which also selects PPC_CELL_NATIVE. So
    instead move the select of PPC_OF_PLATFORM_PCI and PCI under both
    IBM_CELL_BLADE and CELLEB.

    Signed-off-by: Michael Ellerman
    Acked-by: Arnd Bergmann
    Signed-off-by: Paul Mackerras

    Michael Ellerman
     
  • On ppc64 we implemented elf_read_implies_exec() for 32-bit binaries
    because old toolchains had bugs where they didn't mark program
    segments executable that needed to be. For some reason we didn't do
    this on ppc32 builds. This hadn't been an issue until commit 8d30c14c
    ("powerpc/mm: Rework I$/D$ coherency (v3)"), which had as a side
    effect that we are now enforcing execute permissions to some extent on
    32-bit 4xx and Book E processors.

    This fixes it by defining elf_read_implies_exec on 32-bit to turn on
    the read-implies-exec behaviour on programs that are sufficiently old
    that they don't have a PT_GNU_STACK program header.

    Signed-off-by: Kumar Gala
    Signed-off-by: Paul Mackerras

    Kumar Gala
     
  • The old refok sections

    .text.init.refok
    .data.init.refok
    .exit.text.refok

    have been deprecated since commit
    312b1485fb509c9bc32eda28ad29537896658cb8. After the other patches in
    this patch series nothing is put in these sections, so clean things up
    by eliminating all the remaining references to them.

    Signed-off-by: Tim Abbott
    Acked-by: Sam Ravnborg
    Signed-off-by: Linus Torvalds

    Tim Abbott
     
  • The section .text.init.refok is deprecated and __REF (.ref.text)
    should be used in assembly files instead. This patch cleans up a few
    uses of .text.init.refok in the sparc architecture.

    Also fix a reference to .text.init in a comment that wasn't updated to
    .init.text.

    Signed-off-by: Tim Abbott
    Cc: David S. Miller
    Acked-by: Sam Ravnborg
    Signed-off-by: Linus Torvalds

    Tim Abbott
     
  • The sh architecture has some code in the .text.init section, but it
    does not reference that section in its linker scripts.

    This change moves this code from the .text.init section to the
    .init.text section, which is presumably where it belongs.

    Signed-off-by: Tim Abbott
    Acked-by: Sam Ravnborg
    Acked-by: Paul Mundt
    Signed-off-by: Linus Torvalds

    Tim Abbott
     
  • The section .text.init.refok is deprecated and __REF (.ref.text)
    should be used in assembly files instead. This patch cleans up a few
    uses of .text.init.refok in the powerpc architecture.

    Signed-off-by: Tim Abbott
    Cc: Benjamin Herrenschmidt
    Acked-by: Sam Ravnborg
    Signed-off-by: Linus Torvalds

    Tim Abbott
     
  • Rather than adding .ref.text to the powerpc linker script so that we
    can use __REF on the powerpc architecture, it seems simpler to switch
    to using the generic TEXT_TEXT macro.

    Signed-off-by: Tim Abbott
    Cc: Benjamin Herrenschmidt
    Acked-by: Sam Ravnborg
    Signed-off-by: Linus Torvalds

    Tim Abbott
     
  • arm is placing some code in the .text.init section, but it does not
    reference that section in its linker scripts.

    This change moves this code from the .text.init section to the
    .init.text section, which is presumably where it belongs.

    Signed-off-by: Tim Abbott
    Acked-by: Russell King
    Acked-by: Sam Ravnborg
    Signed-off-by: Linus Torvalds

    Tim Abbott
     
  • FRV is placing some code in the .text.init section but does not reference that
    section in its linker scripts.

    This change moves this code from the .text.init section to the .init.text
    section, which is presumably where it belongs.

    Signed-off-by: Tim Abbott
    Signed-off-by: David Howells
    Acked-by: Sam Ravnborg
    Signed-off-by: Linus Torvalds

    Tim Abbott
     
  • It seems nothing has included the frv asm/init.h header for some time, and its
    actual contents are out of date with include/linux/init.h. So just delete it.

    Signed-off-by: Tim Abbott
    Signed-off-by: David Howells
    Acked-by: Sam Ravnborg
    Signed-off-by: Linus Torvalds

    Tim Abbott