04 Feb, 2010

6 commits

  • For NX2031, first try to scrub interrupt before requesting firmware
    reset. Return statement was missing after scrubbbing interrupt.

    Signed-off-by: Vernon Mauery
    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • This fixes commit (38ff3e6bb987ec583268da8eb22628293095d43b) ("dccp_probe:
    Fix module load dependencies between dccp and dccp_probe", from 15 Jan).

    It fixes the construction of the first argument of try_then_request_module(),
    where only valid return codes from the first argument should be returned.

    What we do now is assign the result of register_jprobe() to ret, without
    the side effect of the comparison.

    Acked-by: Gerrit Renker
    Signed-off-by: Neil Horman
    Signed-off-by: David S. Miller

    Gerrit Renker
     
  • This fixes a bug introduced in commit de4ef86cfce60d2250111f34f8a084e769f23b16
    ("dccp: fix dccp rmmod when kernel configured to use slub", 17 Jan): the
    vsnprintf used sizeof(slab_name_fmt), which became truncated to 4 bytes, since
    slab_name_fmt is now a 4-byte pointer and no longer a 32-character array.

    This lead to error messages such as
    FATAL: Error inserting dccp: No buffer space available

    >> kernel: [ 1456.341501] kmem_cache_create: duplicate cache cci
    generated due to the truncation after the 3rd character.

    Fixed for the moment by introducing a symbolic constant. Tested to fix the bug.

    Signed-off-by: Gerrit Renker
    Acked-by: Neil Horman
    Signed-off-by: David S. Miller

    Gerrit Renker
     
  • The book keeping structure for transmit always had the flags value
    cleared so transmit DMA maps were never released correctly.
    Based on patch by Jarek Poplawski, problem observed by Michael Breuer.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     
  • Netlink code does module autoload if protocol userspace is asking for is
    not ready. However, module can dissapear right after it was autoloaded.
    Example: modprobe/rmmod stress-testing and xfrm_user.ko providing NETLINK_XFRM.

    netlink_create() in such situation _will_ create userspace socket and
    _will_not_ pin module. Now if module was removed and we're going to call
    ->netlink_rcv into nothing:

    BUG: unable to handle kernel paging request at ffffffffa02f842a
    ^^^^^^^^^^^^^^^^
    modules are loaded near these addresses here

    IP: [] 0xffffffffa02f842a
    PGD 161f067 PUD 1623063 PMD baa12067 PTE 0
    Oops: 0010 [#1] PREEMPT SMP DEBUG_PAGEALLOC
    last sysfs file: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/uevent
    CPU 1
    Pid: 11515, comm: ip Not tainted 2.6.33-rc5-netns-00594-gaaa5728-dirty #6 P5E/P5E
    RIP: 0010:[] [] 0xffffffffa02f842a
    RSP: 0018:ffff8800baa3db48 EFLAGS: 00010292
    RAX: ffff8800baa3dfd8 RBX: ffff8800be353640 RCX: 0000000000000000
    RDX: ffffffff81959380 RSI: ffff8800bab7f130 RDI: 0000000000000001
    RBP: ffff8800baa3db58 R08: 0000000000000001 R09: 0000000000000000
    R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000011
    R13: ffff8800be353640 R14: ffff8800bcdec240 R15: ffff8800bd488010
    FS: 00007f93749656f0(0000) GS:ffff880002300000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: ffffffffa02f842a CR3: 00000000ba82b000 CR4: 00000000000006e0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process ip (pid: 11515, threadinfo ffff8800baa3c000, task ffff8800bab7eb30)
    Stack:
    ffffffff813637c0 ffff8800bd488000 ffff8800baa3dba8 ffffffff8136397d
    0000000000000000 ffffffff81344adc 7fffffffffffffff 0000000000000000
    ffff8800baa3ded8 ffff8800be353640 ffff8800bcdec240 0000000000000000
    Call Trace:
    [] ? netlink_unicast+0x100/0x2d0
    [] netlink_unicast+0x2bd/0x2d0

    netlink_unicast_kernel:
    nlk->netlink_rcv(skb);

    [] ? memcpy_fromiovec+0x6c/0x90
    [] netlink_sendmsg+0x1d3/0x2d0
    [] sock_sendmsg+0xbb/0xf0
    [] ? __lock_acquire+0x27b/0xa60
    [] ? might_fault+0x73/0xd0
    [] ? might_fault+0x73/0xd0
    [] ? __lock_release+0x82/0x170
    [] ? might_fault+0xbe/0xd0
    [] ? might_fault+0x73/0xd0
    [] ? verify_iovec+0x47/0xd0
    [] sys_sendmsg+0x1a9/0x360
    [] ? _raw_spin_unlock_irqrestore+0x65/0x70
    [] ? trace_hardirqs_on+0xd/0x10
    [] ? _raw_spin_unlock_irqrestore+0x42/0x70
    [] ? __up_read+0x84/0xb0
    [] ? trace_hardirqs_on_caller+0x145/0x190
    [] ? trace_hardirqs_on_thunk+0x3a/0x3f
    [] system_call_fastpath+0x16/0x1b
    Code: Bad RIP value.
    RIP [] 0xffffffffa02f842a
    RSP
    CR2: ffffffffa02f842a

    If module was quickly removed after autoloading, return -E.

    Return -EPROTONOSUPPORT if module was quickly removed after autoloading.

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

    Alexey Dobriyan
     
  • 1. After sock_register() returns, it's possible to create sockets,
    even if module still not initialized fully (blame generic module code
    for that!)
    2. Consequently, pfkey_create() can be called with pfkey_net_id still not
    initialized which will BUG_ON in net_generic():
    kernel BUG at include/net/netns/generic.h:43!
    3. During netns shutdown, netns ops should be unregistered after
    key manager unregistered because key manager calls can be triggered
    from xfrm_user module:

    general protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
    pfkey_broadcast+0x111/0x210 [af_key]
    pfkey_send_notify+0x16a/0x300 [af_key]
    km_state_notify+0x41/0x70
    xfrm_flush_sa+0x75/0x90 [xfrm_user]
    4. Unregister netns ops after socket ops just in case and for symmetry.

    Reported by Luca Tettamanti.

    Signed-off-by: Alexey Dobriyan
    Tested-by: Luca Tettamanti
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     

03 Feb, 2010

2 commits

  • On Tue, Feb 02, 2010 at 02:57:14PM -0800, Greg KH (gregkh@suse.de) wrote:
    > > There are at least two ways to fix it: using a big cannon and a small
    > > one. The former way is to disable notification registration, since it is
    > > not used by anyone at all. Second way is to check whether calling
    > > process is root and its destination group is -1 (kind of priveledged
    > > one) before command is dispatched to workqueue.
    >
    > Well if no one is using it, removing it makes the most sense, right?
    >
    > No objection from me, care to make up a patch either way for this?

    Getting it is not used, let's drop support for notifications about
    (un)registered events from connector.
    Another option was to check credentials on receiving, but we can always
    restore it without bugs if needed, but genetlink has a wider code base
    and none complained, that userspace can not get notification when some
    other clients were (un)registered.

    Kudos for Sebastian Krahmer , who found a bug in the
    code.

    Signed-off-by: Evgeniy Polyakov
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: David S. Miller

    Evgeniy Polyakov
     
  • David S. Miller
     

02 Feb, 2010

1 commit


01 Feb, 2010

1 commit


30 Jan, 2010

5 commits


29 Jan, 2010

2 commits

  • Commit 37e8273cd30592d3a82bcb70cbb1bdc4eaeb6b71 ("usbnet: Set link down
    initially for drivers that update link state") changed the initial link
    state in cdc_ether and other drivers based on the understanding that the
    devices they support generate link change interrupts. However, this is
    optional in the CDC Ethernet protocol, and two users have reported in
    that the link state
    for their devices remains down. Therefore, revert the change in
    cdc_ether.

    Signed-off-by: Ben Hutchings
    Tested-by: Avi Rozen
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • Noticed by Ben Hutchings.

    Signed-off-by: David S. Miller

    David S. Miller
     

28 Jan, 2010

7 commits


27 Jan, 2010

3 commits

  • netdev_open() will return without cleaning up net device or hardware state
    if firmware loading fails. This results in a BUG() on a second attempt to
    bring the interface up, reported in
    , and probably has even
    worse effects if the driver is removed afterwards.

    Call netdev_close() to clean up on failure.

    Addresses http://bugzilla.kernel.org/show_bug.cgi?id=15091

    Signed-off-by: Ben Hutchings
    Reported-by: Michael Moffatt
    Tested-by: Michael Moffatt
    Cc: "David S. Miller"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • I got below kernel oops when I try to bring down the network interface if
    ftrace is enabled. The root cause is drv_ampdu_action() is passed with a
    NULL ssn pointer in the BA session tear down case. We need to check and
    avoid dereferencing it in trace entry assignment.

    BUG: unable to handle kernel NULL pointer dereference
    Modules linked in: at (null)
    IP: [] ftrace_raw_event_drv_ampdu_action+0x10a/0x160 [mac80211]
    *pde = 00000000
    Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
    [...]
    Call Trace:
    [] ? ftrace_raw_event_drv_ampdu_action+0x0/0x160 [mac80211]
    [] ? __ieee80211_stop_rx_ba_session+0xfc/0x220 [mac80211]
    [] ? ieee80211_sta_tear_down_BA_sessions+0x3b/0x50 [mac80211]
    [] ? ieee80211_set_disassoc+0xe6/0x230 [mac80211]
    [] ? ieee80211_set_disassoc+0x9c/0x230 [mac80211]
    [] ? ieee80211_mgd_deauth+0x158/0x170 [mac80211]
    [] ? ieee80211_deauth+0x1b/0x20 [mac80211]
    [] ? __cfg80211_mlme_deauth+0xe9/0x120 [cfg80211]
    [] ? __cfg80211_disconnect+0x170/0x1d0 [cfg80211]

    Cc: Johannes Berg
    Cc: stable@kernel.org
    Signed-off-by: Zhu Yi
    Signed-off-by: John W. Linville

    Zhu Yi
     
  • The protocol number is not initialized, so userspace can't interpret
    the layer 4 data properly.

    Signed-off-by: Patrick McHardy

    Patrick McHardy
     

26 Jan, 2010

8 commits

  • The commit 0b5ccb2(title:ipv6: reassembly: use seperate reassembly queues for
    conntrack and local delivery) has broken the saddr&&daddr member of
    nf_ct_frag6_queue when creating new queue. And then hash value
    generated by nf_hashfn() was not equal with that generated by fq_find().
    So, a new received fragment can't be inserted to right queue.

    The patch fixes the bug with adding member of user to nf_ct_frag6_queue structure.

    Signed-off-by: Shan Wei
    Acked-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Shan Wei
     
  • I have seen RX stalls on a machine that experienced a suspected
    OOM. After the stall, the RX buffer is empty on the guest side
    and there are exactly 16 entries available on the host side. As
    the number of entries is less than that required by a maximal
    skb, the host cannot proceed.

    The guest did not have a refill job scheduled.

    My diagnosis is that an OOM had occured, with the delayed refill
    job scheduled. The job was able to allocate at least one skb, but
    not enough to overcome the minimum required by the host to proceed.

    As the refill job would only reschedule itself if it failed completely
    to allocate any skbs, this would lead to an RX stall.

    The following patch removes this stall possibility by always
    rescheduling the refill job until the ring is totally refilled.

    Testing has shown that the RX stall no longer occurs whereas
    previously it would occur within a day.

    Signed-off-by: Herbert Xu
    Acked-by: Rusty Russell
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • The low-level MCDI code always uses 32-bit MMIO operations, and
    callers must pad input and output buffers to multiples of 4 bytes.
    The MCDI NVRAM functions are not doing this. Also, their buffers are
    declared as variable-length arrays with no explicit maximum length.

    Switch to a fixed buffer size based on the chunk size used by the
    MTD driver (which is a multiple of 4).

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • Due to a hardware bug in the SFC9000 family, the firmware must
    transfer raw GMAC statistics to host memory before aggregating them
    into the cooked (speed-independent) MAC statistics. Extend the stats
    buffer to support this.

    The length of the buffer is explicit in the MAC_STATS command, so this
    change is backward-compatible on both sides.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Guido Barzini
     
  • By rounding up the buffer size to power of 2, several expensive
    modulus operations can be avoided. This patch also solves a bug where
    the gap need when ring gets full was not being accounted for.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • Currently qlge tries to release regions even if they were not allocated.
    This causes messages like the following in the kernel log

    Trying to free nonexistent resource
    Trying to free nonexistent resource
    Trying to free nonexistent resource

    This patch fixes the goto logic in order to not release the resources
    if they were not allocated.

    Signed-off-by: Breno Leitao
    Signed-off-by: David S. Miller

    Breno Leitao
     
  • Among other changes, this commit:

    commit 06d0f0663e11cab4ec5f2c143a118d71a12fbbe9
    Author: Sujith
    Date: Thu Feb 12 10:06:45 2009 +0530

    ath9k: Enable Fractional N mode

    changed the hw attach code to fix up initialization values only for
    dual band devices, however the commit message did not give a reason as
    to why this would be useful or necessary.

    According to tests by Jorge Boncompte, this breaks at least some
    2GHz-only cards, so the code should be changed back to the
    unconditional INI fixup.

    Signed-off-by: Felix Fietkau
    Reported-by: Jorge Boncompte
    Cc: stable@kernel.org
    Tested-by: Pavel Roskin
    Signed-off-by: John W. Linville

    Felix Fietkau
     
  • There are a few station addresses that are
    char *, instead of the normal u8 *; gcc
    gives pointer signedness warnings for some
    of those, so use u8 * consistently.

    Signed-off-by: Johannes Berg
    Signed-off-by: Reinette Chatre
    Signed-off-by: John W. Linville

    Johannes Berg
     

25 Jan, 2010

3 commits

  • GC is non-existent in netns, so after you hit GC threshold, no new
    dst entries will be created until someone triggers cleanup in init_net.

    Make xfrm4_dst_ops and xfrm6_dst_ops per-netns.
    This is not done in a generic way, because it woule waste
    (AF_MAX - 2) * sizeof(struct dst_ops) bytes per-netns.

    Reorder GC threshold initialization so it'd be done before registering
    XFRM policies.

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

    Alexey Dobriyan
     
  • Obviously, this register had some other impact that is causing
    the regression. Either it is masking some other access or needs
    to be reset in some path.

    Either, way it is best to just revert the change for 2.6.33

    This reverts commit 166a0fd4c788ec7f10ca8194ec6d526afa12db75.

    Signed-off-by: David S. Miller

    stephen hemminger
     
  • Bruno Prémont found commit 9793241fe92f7d930
    (vlan: Precise RX stats accounting) added a regression for non
    hw accelerated vlans.

    [ 26.390576] BUG: unable to handle kernel NULL pointer dereference at (null)
    [ 26.396369] IP: [] vlan_skb_recv+0x89/0x280 [8021q]

    vlan_dev_info() was used with original device, instead of
    skb->dev. Also spotted by Américo Wang.

    Reported-By: Bruno Prémont
    Tested-By: Bruno Prémont
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

24 Jan, 2010

1 commit


23 Jan, 2010

1 commit

  • Y2_HW_WOL_ON/Y2_HW_WOL_OFF should be set and cleared per chip,
    not per port. On dual port cards, Y2_HW_WOL_ON should be
    enabled if either sky2 port has WOL enabled.

    Found while reviewing code for a WOL regression, though this is
    probably not the cause of the regression.

    Signed-off-by: Mike McCormack
    Signed-off-by: David S. Miller

    Mike McCormack