11 May, 2009

4 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
    Revert driver core: move platform_data into platform_device
    Revert driver core: fix passing platform_data
    Remove old PRINTK_DEBUG config item
    Doc/sysfs-rules: Swap the order of the words so the sentence makes more sense
    Driver core: platform: fix kernel-doc warnings

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (22 commits)
    Fix the race between capifs remount and node creation
    Fix races around the access to ->s_options
    switch ufs directories to ufs_sync_file()
    Switch open_exec() and sys_uselib() to do_open_filp()
    Make open_exec() and sys_uselib() use may_open(), instead of duplicating its parts
    Reduce path_lookup() abuses
    Make checkpatch.pl shut up on fs/inode.c
    NULL noise in fs/super.c:kill_bdev_super()
    romfs: cleanup romfs_fs.h
    ROMFS: romfs_dev_read() error ignored
    fs: dcache fix LRU ordering
    ocfs2: Use nd_set_link().
    Fix deadlock in ipathfs ->get_sb()
    Fix a leak in failure exit in 9p ->get_sb()
    Convert obvious places to deactivate_locked_super()
    New helper: deactivate_locked_super()
    reiserfs: remove privroot hiding in lookup
    reiserfs: dont associate security.* with xattr files
    reiserfs: fixup xattr_root caching
    Always lookup priv_root on reiserfs mount and keep it
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ALSA: hda - Fix line-in on Mac Mini Core2 Duo
    ALSA: Release v1.0.20
    sound: via82xx: fix DXS volume range
    sound: serial-u16550: fix buffer overflow
    ASoC: Fix errors in WM8990

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (26 commits)
    bonding: fix panic if initialization fails
    IXP4xx: complete Ethernet netdev setup before calling register_netdev().
    IXP4xx: use "ENODEV" instead of "ENOSYS" in module initialization.
    ipvs: Fix IPv4 FWMARK virtual services
    ipv4: Make INET_LRO a bool instead of tristate.
    net: remove stale reference to fastroute from Kconfig help text
    net: update skb_recycle_check() for hardware timestamping changes
    bnx2: Fix panic in bnx2_poll_work().
    net-sched: fix bfifo default limit
    igb: resolve panic on shutdown when SR-IOV is enabled
    wimax: oops: wimax_dev_add() is the only one that can initialize the state
    wimax: fix oops if netlink fails to add attribute
    Bluetooth: Move dev_set_name() to a context that can sleep
    netfilter: ctnetlink: fix wrong message type in user updates
    netfilter: xt_cluster: fix use of cluster match with 32 nodes
    netfilter: ip6t_ipv6header: fix match on packets ending with NEXTHDR_NONE
    netfilter: add missing linux/types.h include to xt_LED.h
    mac80211: pid, fix memory corruption
    mac80211: minstrel, fix memory corruption
    cfg80211: fix comment on regulatory hint processing
    ...

    Linus Torvalds
     

10 May, 2009

1 commit


09 May, 2009

8 commits

  • Put generic_show_options read access to s_options under rcu_read_lock,
    split save_mount_options() into "we are setting it the first time"
    (uses in foo_fill_super()) and "we are relacing and freeing the old one",
    synchronize_rcu() before kfree() in the latter.

    Signed-off-by: Al Viro

    Al Viro
     
  • ... and make path_lookup_open() static

    Signed-off-by: Al Viro

    Al Viro
     
  • There's no kernel-only content in it anymore, so move it to header-y
    and remove the superflous #ifdef __KERNEL__.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Does equivalent of up_write(&s->s_umount); deactivate_super(s);
    However, it does not does not unlock it until it's all over.
    As the result, it's safe to use to dispose of new superblock on ->get_sb()
    failure exits - nobody will see the sucker until it's all over.
    Equivalent using up_write/deactivate_super is safe for that purpose
    if superblock is either safe to use or has NULL ->s_root when we unlock.
    Normally filesystems take the required precautions, but
    a) we do have bugs in that area in some of them.
    b) up_write/deactivate_super sequence is extremely common,
    so the helper makes sense anyway.

    Signed-off-by: Al Viro

    Al Viro
     
  • With Al Viro's patch to move privroot lookup to fs mount, there's no need
    to have special code to hide the privroot in reiserfs_lookup.

    I've also cleaned up the privroot hiding in reiserfs_readdir_dentry and
    removed the last user of reiserfs_xattrs().

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Al Viro

    Jeff Mahoney
     
  • The xattr_root caching was broken from my previous patch set. It wouldn't
    cause corruption, but could cause decreased performance due to allocating
    a larger chunk of the journal (~ 27 blocks) than it would actually use.

    This patch loads the xattr root dentry at xattr initialization and creates
    it on-demand. Since we're using the cached dentry, there's no point
    in keeping lookup_or_create_dir around, so that's removed.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Al Viro

    Jeff Mahoney
     
  • ... even if it's a negative dentry. That way we can set ->d_op on
    root before anyone could race with us. Simplify d_compare(), while
    we are at it.

    Signed-off-by: Al Viro

    Al Viro
     
  • This reverts commit 006f4571a15fae3a0575f2a0f9e9b63b3d1012f8:

    This patch moves platform_data from struct device into
    struct platform_device, based on the two ideas:

    1. Now all platform_driver is registered by platform_driver_register,
    which makes probe()/release()/... of platform_driver passed parameter
    of platform_device *, so platform driver can get platform_data from
    platform_device;

    2. Other kind of devices do not need to use platform_data, we can
    decrease size of device if moving it to platform_device.

    Taking into consideration of thousands of files to be fixed and they
    can't be finished in one night(maybe it will take a long time), so we
    keep platform_data in device to allow two kind of cases coexist until
    all platform devices pass its platfrom data from
    platform_device->platform_data.

    All patches to do this kind of conversion are welcome.

    As we don't really want to do it, it was a bad idea.

    Cc: David Brownell
    Cc: Ming Lei
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

08 May, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (32 commits)
    [CIFS] Fix double list addition in cifs posix open code
    [CIFS] Allow raw ntlmssp code to be enabled with sec=ntlmssp
    [CIFS] Fix SMB uid in NTLMSSP authenticate request
    [CIFS] NTLMSSP reenabled after move from connect.c to sess.c
    [CIFS] Remove sparse warning
    [CIFS] remove checkpatch warning
    [CIFS] Fix final user of old string conversion code
    [CIFS] remove cifs_strfromUCS_le
    [CIFS] NTLMSSP support moving into new file, old dead code removed
    [CIFS] Fix endian conversion of vcnum field
    [CIFS] Remove trailing whitespace
    [CIFS] Remove sparse endian warnings
    [CIFS] Add remaining ntlmssp flags and standardize field names
    [CIFS] Fix build warning
    cifs: fix length handling in cifs_get_name_from_search_buf
    [CIFS] Remove unneeded QuerySymlink call and fix mapping for unmapped status
    [CIFS] rename cifs_strndup to cifs_strndup_from_ucs
    Added loop check when mounting DFS tree.
    Enable dfs submounts to handle remote referrals.
    [CIFS] Remove older session setup implementation
    ...

    Linus Torvalds
     

07 May, 2009

1 commit

  • When building with gcc 3.2 I get thousands of warnings such as

    include/linux/gfp.h: In function `allocflags_to_migratetype':
    include/linux/gfp.h:105: warning: null format string

    due to passing a NULL format string to warn_slowpath() in

    #define __WARN() warn_slowpath(__FILE__, __LINE__, NULL)

    Split this case out into a separate call. This also shrinks the kernel
    slightly:

    text data bss dec hex filename
    4802274 707668 712704 6222646 5ef336 vmlinux
    text data bss dec hex filename
    4799027 703572 712704 6215303 5ed687 vmlinux

    due to removeing one argument from the commonly-called __WARN().

    [akpm@linux-foundation.org: reduce scope of `empty']
    Acked-by: Jesper Nilsson
    Acked-by: Johannes Weiner
    Acked-by: Arjan van de Ven
    Signed-off-by: Andi Kleen
    Cc: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

06 May, 2009

2 commits


05 May, 2009

6 commits

  • This patch fixes a problem when you use 32 nodes in the cluster
    match:

    % iptables -I PREROUTING -t mangle -i eth0 -m cluster \
    --cluster-total-nodes 32 --cluster-local-node 32 \
    --cluster-hash-seed 0xdeadbeef -j MARK --set-mark 0xffff
    iptables: Invalid argument. Run `dmesg' for more information.
    % dmesg | tail -1
    xt_cluster: this node mask cannot be higher than the total number of nodes

    The problem is related to this checking:

    if (info->node_mask >= (1 << info->total_nodes)) {
    printk(KERN_ERR "xt_cluster: this node mask cannot be "
    "higher than the total number of nodes\n");
    return false;
    }

    (1 << 32) is 1. Thus, the checking fails.

    BTW, I said this before but I insist: I have only tested the cluster
    match with 2 nodes getting ~45% extra performance in an active-active setup.
    The maximum limit of 32 nodes is still completely arbitrary. I'd really
    appreciate if people that have more nodes in their setups let me know.

    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: Patrick McHardy

    Pablo Neira Ayuso
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (30 commits)
    e1000: fix virtualization bug
    bonding: fix alb mode locking regression
    Bluetooth: Fix issue with sysfs handling for connections
    usbnet: CDC EEM support (v5)
    tcp: Fix tcp_prequeue() to get correct rto_min value
    ehea: fix invalid pointer access
    ne2k-pci: Do not register device until initialized.
    Subject: [PATCH] br2684: restore net_dev initialization
    net: Only store high 16 bits of kernel generated filter priorities
    virtio_net: Fix function name typo
    virtio_net: Cleanup command queue scatterlist usage
    bonding: correct the cleanup in bond_create()
    virtio: add missing include to virtio_net.h
    smsc95xx: add support for LAN9512 and LAN9514
    smsc95xx: configure LED outputs
    netconsole: take care of NETDEV_UNREGISTER event
    xt_socket: checks for the state of nf_conntrack
    bonding: bond_slave_info_query() fix
    cxgb3: fixing gcc 4.4 compiler warning: suggest parentheses around operand of ‘!’
    netfilter: use likely() in xt_info_rdlock_bh()
    ...

    Linus Torvalds
     
  • Pointed out by Dave Miller:

    CHECK include/linux/netfilter (57 files)
    /home/davem/src/GIT/net-2.6/usr/include/linux/netfilter/xt_LED.h:6: found __[us]{8,16,32,64} type without #include

    Signed-off-by: Patrick McHardy

    Patrick McHardy
     
  • Due to a semantic changes in flush_workqueue() the current approach of
    synchronizing the sysfs handling for connections doesn't work anymore. The
    whole approach is actually fully broken and based on assumptions that are
    no longer valid.

    With the introduction of Simple Pairing support, the creation of low-level
    ACL links got changed. This change invalidates the reason why in the past
    two independent work queues have been used for adding/removing sysfs
    devices. The adding of the actual sysfs device is now postponed until the
    host controller successfully assigns an unique handle to that link. So
    the real synchronization happens inside the controller and not the host.

    The only left-over problem is that some internals of the sysfs device
    handling are not initialized ahead of time. This leaves potential access
    to invalid data and can cause various NULL pointer dereferences. To fix
    this a new function makes sure that all sysfs details are initialized
    when an connection attempt is made. The actual sysfs device is only
    registered when the connection has been successfully established. To
    avoid a race condition with the registration, the check if a device is
    registered has been moved into the removal work.

    As an extra protection two flush_work() calls are left in place to
    make sure a previous add/del work has been completed first.

    Based on a report by Marc Pignat

    Signed-off-by: Marcel Holtmann
    Tested-by: Justin P. Mattock
    Tested-by: Roger Quadros
    Tested-by: Marc Pignat

    Marcel Holtmann
     
  • This introduces a CDC Ethernet Emulation Model (EEM) host side
    driver to support USB EEM devices.

    EEM is different from the Ethernet Control Model (ECM) currently
    supported by the "CDC Ethernet" driver. One key difference is
    that it doesn't require of USB interface alternate settings to
    manage interface state; some maldesigned hardware can't handle
    that part of USB. It also avoids a separate USB interface for
    control and status updates.

    [ dbrownell@users.sourceforge.net: fix skb leaks, add rx packet
    checks, improve fault handling, EEM conformance updates, cleanup ]

    Signed-off-by: Omar Laazimani
    Signed-off-by: David Brownell
    Signed-off-by: David S. Miller

    Omar Laazimani
     
  • tcp_prequeue() refers to the constant value (TCP_RTO_MIN) regardless of
    the actual value might be tuned. The following patches fix this and make
    tcp_prequeue get the actual value returns from tcp_rto_min().

    Signed-off-by: Satoru SATOH
    Signed-off-by: David S. Miller

    Satoru SATOH
     

02 May, 2009

2 commits


30 Apr, 2009

2 commits


29 Apr, 2009

7 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
     
  • 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
     
  • 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 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

3 commits

  • 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
     
  • 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
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
    PCI: only save/restore existent registers in the PCIe capability
    x86/PCI: don't bother with root quirks if _CRS is used
    docbooks: add/fix PCI kernel-doc
    PCI: cleanup debug output resources
    x86/PCI: set_pci_bus_resources_arch_default cleanups
    x86/PCI: Move set_pci_bus_resources_arch_default into arch/x86
    x86/PCI: don't call e820_all_mapped with -1 in the mmconfig case
    PCI quirk: disable MSI on VIA VT3364 chipsets

    Linus Torvalds
     

27 Apr, 2009

3 commits

  • Signed-off-by: Mike Rapoport
    Signed-off-by: David S. Miller

    Mike Rapoport
     
  • Unless I miss anything this should fix a bug.

    Signed-off-by: Adrian Bunk
    Signed-off-by: David S. Miller

    Adrian Bunk
     
  • This patch is preparation for replacing all uses of ".head.text" or
    ".text.head" in the kernel with macros, so that the section name can
    later be changed without having to touch a lot of the kernel.

    Since some linker scripts do more complex things than referencing
    HEAD_TEXT, we add a HEAD_TEXT_SECTION macro that just contains the
    actual name.

    I've defined HEAD_TEXT_SECTION in a new header,
    include/linux/section-names.h, so that this section name only needs to
    appear in one place. I anticipate creating similar macro structures
    for a number of other section names.

    The long-term goal here is to be able to change the kernel's magic
    section names to those that are compatible with -ffunction-sections
    -fdata-sections. This requires renaming all magic sections with names
    of the form ".text.foo".

    Signed-off-by: Tim Abbott
    Signed-off-by: Linus Torvalds

    Tim Abbott