12 Dec, 2009

5 commits

  • Conflicts:
    include/net/tcp.h

    David S. Miller
     
  • Fix two problems:

    1. If unregister_netdevice_many() is called with both registered
    and unregistered devices, rollback_registered_many() bails out
    when it reaches the first unregistered device. The processing
    of the prior registered devices is unfinished, and the
    remaining devices are skipped, and possible registered netdev's
    are leaked/unregistered.

    2. System hangs or panics depending on how the devices are passed,
    since when netdev_run_todo() runs, some devices were not fully
    processed.

    Tested by passing intermingled unregistered and registered vlan
    devices to unregister_netdevice_many() as follows:
    1. dev, fake_dev1, fake_dev2: hangs in run_todo
    ("unregister_netdevice: waiting for eth1.100 to become
    free. Usage count = 1")
    2. fake_dev1, dev, fake_dev2: failure during de-registration
    and next registration, followed by a vlan driver Oops
    during subsequent registration.

    Confirmed that the patch fixes both cases.

    Signed-off-by: Krishna Kumar
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Krishna Kumar
     
  • Commit 4447bb33f09444920a8f1d89e1540137429351b6 ("xfrm: Store aalg in
    xfrm_state with a user specified truncation length") breaks
    installation of authentication algorithms via PF_KEY, as the state
    specific truncation length is not installed with the algorithms
    default truncation length. This patch initializes state properly to
    the default if installed via PF_KEY.

    Signed-off-by: Martin Willi
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Martin Willi
     
  • Use (get|put)_compat_timespec helper functions to simplify the code.

    Cc: Arnaldo Carvalho de Melo
    Signed-off-by: Heiko Carstens
    Acked-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Heiko Carstens
     
  • compat_sys_recvmmsg has a compat_timespec parameter and not a
    timespec parameter. This way we also get rid of an odd cast.

    Cc: Arnaldo Carvalho de Melo
    Signed-off-by: Heiko Carstens
    Acked-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Heiko Carstens
     

11 Dec, 2009

4 commits


10 Dec, 2009

3 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits)
    tree-wide: fix misspelling of "definition" in comments
    reiserfs: fix misspelling of "journaled"
    doc: Fix a typo in slub.txt.
    inotify: remove superfluous return code check
    hdlc: spelling fix in find_pvc() comment
    doc: fix regulator docs cut-and-pasteism
    mtd: Fix comment in Kconfig
    doc: Fix IRQ chip docs
    tree-wide: fix assorted typos all over the place
    drivers/ata/libata-sff.c: comment spelling fixes
    fix typos/grammos in Documentation/edac.txt
    sysctl: add missing comments
    fs/debugfs/inode.c: fix comment typos
    sgivwfb: Make use of ARRAY_SIZE.
    sky2: fix sky2_link_down copy/paste comment error
    tree-wide: fix typos "couter" -> "counter"
    tree-wide: fix typos "offest" -> "offset"
    fix kerneldoc for set_irq_msi()
    spidev: fix double "of of" in comment
    comment typo fix: sybsystem -> subsystem
    ...

    Linus Torvalds
     
  • This part was missed in "cfg80211: implement get_wireless_stats",
    probably because sta_set_sinfo already existed and was only handling
    dBm signals.

    Cc: stable@kernel.org
    Signed-off-by: John W. Linville

    John W. Linville
     
  • When the current_bss is not set, 'iwconfig key off' does not
    clear the private flag. Hence after we connect with WEP to an AP and
    then try to connect with another non-WEP AP, it does not work.
    This issue will not be seen if supplicant is used.

    Signed-off-by: Vivek Natarajan
    Signed-off-by: John W. Linville

    Vivek Natarajan
     

09 Dec, 2009

10 commits

  • It can happen, that tcp_retransmit_skb fails due to some error.
    In such cases we might end up into a state where tp->retrans_out
    is zero but that's only because we removed the TCPCB_SACKED_RETRANS
    bit from a segment but couldn't retransmit it because of the error
    that happened. Therefore some assumptions that retrans_out checks
    are based do not necessarily hold, as there still can be an old
    retransmission but that is only visible in TCPCB_EVER_RETRANS bit.
    As retransmission happen in sequential order (except for some very
    rare corner cases), it's enough to check the head skb for that bit.

    Main reason for all this complexity is the fact that connection dying
    time now depends on the validity of the retrans_stamp, in particular,
    that successive retransmissions of a segment must not advance
    retrans_stamp under any conditions. It seems after quick thinking that
    this has relatively low impact as eventually TCP will go into CA_Loss
    and either use the existing check for !retrans_stamp case or send a
    retransmission successfully, setting a new base time for the dying
    timer (can happen only once). At worst, the dying time will be
    approximately the double of the intented time. In addition,
    tcp_packet_delayed() will return wrong result (has some cc aspects
    but due to rarity of these errors, it's hardly an issue).

    One of retrans_stamp clearing happens indirectly through first going
    into CA_Open state and then a later ACK lets the clearing to happen.
    Thus tcp_try_keep_open has to be modified too.

    Thanks to Damian Lukowski for hinting
    that this possibility exists (though the particular case discussed
    didn't after all have it happening but was just a debug patch
    artifact).

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     
  • This patch moves retransmits_timed_out() from include/net/tcp.h
    to tcp_timer.c, where it is used.

    Reported-by: Frederic Leroy
    Signed-off-by: Damian Lukowski
    Acked-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Damian Lukowski
     
  • in routed mode, we don't have a hardware address so netdev_ops doesnt
    need to validate our hardware address via .ndo_validate_addr

    Reported-by: Manuel Fuentes
    Signed-off-by: Chas Williams - CONTRACTOR
    Signed-off-by: David S. Miller

    chas williams - CONTRACTOR
     
  • fix oops when initializing lane interfaces. lec should probably be
    changed to use alloc_netdev() instead.

    Signed-off-by: Chas Williams - CONTRACTOR
    Signed-off-by: David S. Miller

    chas williams - CONTRACTOR
     
  • Adds kerneldoc for inet_twsk_unhash() & inet_twsk_bind_unhash().

    With help from Randy Dunlap.

    Suggested-by: Evgeniy Polyakov
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • When we find a timewait connection in __inet_hash_connect() and reuse
    it for a new connection request, we have a race window, releasing bind
    list lock and reacquiring it in __inet_twsk_kill() to remove timewait
    socket from list.

    Another thread might find the timewait socket we already chose, leading to
    list corruption and crashes.

    Fix is to remove timewait socket from bind list before releasing the bind lock.

    Note: This problem happens if sysctl_tcp_tw_reuse is set.

    Reported-by: kapil dakhane
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • First patch changes __inet_hash_nolisten() and __inet6_hash()
    to get a timewait parameter to be able to unhash it from ehash
    at same time the new socket is inserted in hash.

    This makes sure timewait socket wont be found by a concurrent
    writer in __inet_check_established()

    Reported-by: kapil dakhane
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • GCC even warns about it, as reported by Andrew Morton:

    net/ipv4/tcp.c: In function 'do_tcp_getsockopt':
    net/ipv4/tcp.c:2544: warning: comparison is always false due to limited range of data type

    Signed-off-by: David S. Miller

    David S. Miller
     
  • David S. Miller
     
  • I messed up the merge in d7fc02c7bae7b1cf69269992cf880a43a350cdaa, where
    the conflict in question wasn't just about CTL_UNNUMBERED being removed,
    but the 'strategy' field is too (sysctl handling is now done through the
    /proc interface, with no duplicate protocols for reading the data).

    Reported-by: Larry Finger
    Reported-by: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

08 Dec, 2009

7 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1815 commits)
    mac80211: fix reorder buffer release
    iwmc3200wifi: Enable wimax core through module parameter
    iwmc3200wifi: Add wifi-wimax coexistence mode as a module parameter
    iwmc3200wifi: Coex table command does not expect a response
    iwmc3200wifi: Update wiwi priority table
    iwlwifi: driver version track kernel version
    iwlwifi: indicate uCode type when fail dump error/event log
    iwl3945: remove duplicated event logging code
    b43: fix two warnings
    ipw2100: fix rebooting hang with driver loaded
    cfg80211: indent regulatory messages with spaces
    iwmc3200wifi: fix NULL pointer dereference in pmkid update
    mac80211: Fix TX status reporting for injected data frames
    ath9k: enable 2GHz band only if the device supports it
    airo: Fix integer overflow warning
    rt2x00: Fix padding bug on L2PAD devices.
    WE: Fix set events not propagated
    b43legacy: avoid PPC fault during resume
    b43: avoid PPC fault during resume
    tcp: fix a timewait refcnt race
    ...

    Fix up conflicts due to sysctl cleanups (dead sysctl_check code and
    CTL_UNNUMBERED removed) in
    kernel/sysctl_check.c
    net/ipv4/sysctl_net_ipv4.c
    net/ipv6/addrconf.c
    net/sctp/sysctl.c

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/sysctl-2.6: (43 commits)
    security/tomoyo: Remove now unnecessary handling of security_sysctl.
    security/tomoyo: Add a special case to handle accesses through the internal proc mount.
    sysctl: Drop & in front of every proc_handler.
    sysctl: Remove CTL_NONE and CTL_UNNUMBERED
    sysctl: kill dead ctl_handler definitions.
    sysctl: Remove the last of the generic binary sysctl support
    sysctl net: Remove unused binary sysctl code
    sysctl security/tomoyo: Don't look at ctl_name
    sysctl arm: Remove binary sysctl support
    sysctl x86: Remove dead binary sysctl support
    sysctl sh: Remove dead binary sysctl support
    sysctl powerpc: Remove dead binary sysctl support
    sysctl ia64: Remove dead binary sysctl support
    sysctl s390: Remove dead sysctl binary support
    sysctl frv: Remove dead binary sysctl support
    sysctl mips/lasat: Remove dead binary sysctl support
    sysctl drivers: Remove dead binary sysctl support
    sysctl crypto: Remove dead binary sysctl support
    sysctl security/keys: Remove dead binary sysctl support
    sysctl kernel: Remove binary sysctl logic
    ...

    Linus Torvalds
     
  • On a 32-bit machine, BIT() macro does not give the required
    bit value if the bit is mroe than 31. In ieee802_11_parse_elems_crc(),
    BIT() is suppossed to get the bit value more than 31 (42 (id of ERP_INFO_IE),
    37 (CHANNEL_SWITCH_IE), (42), 32 (POWER_CONSTRAINT_IE), 45 (HT_CAP_IE),
    61 (HT_INFO_IE)). As we do not get the required bit value for the above
    IEs, crc over these IEs are never calculated, so any dynamic change in these
    IEs after the association is not really handled on 32-bit platforms.
    This patch fixes this issue.

    Cc: stable@kernel.org
    Signed-off-by: Vasanthakumar Thiagarajan
    Signed-off-by: John W. Linville

    Vasanthakumar Thiagarajan
     
  • net/rfkill/core.c: In function 'rfkill_type_show':
    net/rfkill/core.c:610: warning: control may reach end of non-void function 'rfkill_get_type_str' being inlined

    A gcc bug, but simple enough to squish.

    Cc: John W. Linville
    Cc: Johannes Berg
    Cc: David S. Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: John W. Linville

    Andrew Morton
     
  • Not only ps_sdata but also IEEE80211_CONF_PS is to be considered
    before restoring PS in scan_ps_disable(). For instance, when ps_sdata
    is set but CONF_PS is not set just because the dynamic timer is still
    running, a sw scan leads to setting of CONF_PS in scan_ps_disable
    instead of restarting the dynamic PS timer.
    Also for the above case, a null data frame is to be sent after
    returning to operating channel which was not happening with the
    current implementation. This patch fixes this too.

    Signed-off-by: Vivek Natarajan
    Reviewed-by: Kalle Valo
    Signed-off-by: John W. Linville

    Vivek Natarajan
     
  • hwsim testing has revealed that when the MLME
    recalculates the idle state of the device, it
    sometimes does so before sending the final
    deauthentication or disassociation frame. This
    patch changes the place where the idle state
    is recalculated, but of course driver transmit
    is typically asynchronous while configuration
    is expected to be synchronous, so it doesn't
    fix all possible cases yet.

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

    Johannes Berg
     
  • Conflicts:

    kernel/irq/chip.c

    Jiri Kosina
     

06 Dec, 2009

2 commits


05 Dec, 2009

5 commits

  • My patch "mac80211: correctly place aMPDU RX reorder code"
    uses an skb queue for MPDUs that were released from the
    buffer. I intentially didn't initialise and use the skb
    queue's spinlock, but in this place forgot that the code
    variant that doesn't touch the spinlock is needed.

    Thanks to Christian Lamparter for quickly spotting the
    bug in the backtrace Reinette reported.

    Reported-by: Reinette Chatre
    Bug-identified-by: Christian Lamparter
    Tested-by: Reinette Chatre
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • David S. Miller
     
  • The regulatory messages in syslog look weird:

    kernel: cfg80211: Regulatory domain: US
    kernel: ^I(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    kernel: ^I(2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
    kernel: ^I(5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
    kernel: ^I(5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
    kernel: ^I(5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
    kernel: ^I(5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
    kernel: ^I(5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)

    Indent them with four spaces instead of the tab character to get prettier
    output.

    Signed-off-by: Kalle Valo
    Acked: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Kalle Valo
     
  • An earlier optimization on removing unnecessary traffic on cooked
    monitor interfaces ("mac80211: reduce the amount of unnecessary traffic
    on cooked monitor interfaces ") ended up removing quite a bit more
    than just unnecessary traffic. It was not supposed to remove TX status
    reporting for injected frames, but ended up doing it by checking the
    injected flag in skb->cb only after that field had been cleared with
    memset.. Fix this by taking a local copy of the injected flag before
    skb->cb is cleared.

    This broke user space applications that depend on getting TX status
    notifications for injected data frames. For example, STA inactivity
    poll from hostapd did not work and ended up kicking out stations even
    if they were still present.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • I've just noticed that some events are no longer propagated
    for some wireless drivers. Basically, SET request with a extra payload
    for driver without commit handler. The fix is pretty simple, see
    attached.
    Actually, a few lines below this line, you will see that the
    event generation for simple SET (iwpoint-less ?) is done properly,
    and this other event generation does not need fixing.

    Signed-off-by: Jean Tourrilhes
    Signed-off-by: John W. Linville

    Jean Tourrilhes
     

04 Dec, 2009

4 commits

  • That is "success", "unknown", "through", "performance", "[re|un]mapping"
    , "access", "default", "reasonable", "[con]currently", "temperature"
    , "channel", "[un]used", "application", "example","hierarchy", "therefore"
    , "[over|under]flow", "contiguous", "threshold", "enough" and others.

    Signed-off-by: André Goddard Rosa
    Signed-off-by: Jiri Kosina

    André Goddard Rosa
     
  • fix some typos and punctuation in comments

    Signed-off-by: Thadeu Lima de Souza Cascardo
    Signed-off-by: Jiri Kosina

    Thadeu Lima de Souza Cascardo
     
  • After TCP RCU conversion, tw->tw_refcnt should not be set to 1 in
    inet_twsk_alloc(). It allows a RCU reader to get this timewait socket,
    while we not yet stabilized it.

    Only choice we have is to set tw_refcnt to 0 in inet_twsk_alloc(),
    then atomic_add() it later, once everything is done.

    Location of this atomic_add() is tricky, because we dont want another
    writer to find this timewait in ehash, while tw_refcnt is still zero !

    Thanks to Kapil Dakhane tests and reports.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Its currently possible that several threads issuing a connect() find
    the same timewait socket and try to reuse it, leading to list
    corruptions.

    Condition for bug is that these threads bound their socket on same
    address/port of to-be-find timewait socket, and connected to same
    target. (SO_REUSEADDR needed)

    To fix this problem, we could unhash timewait socket while holding
    ehash lock, to make sure lookups/changes will be serialized. Only
    first thread finds the timewait socket, other ones find the
    established socket and return an EADDRNOTAVAIL error.

    This second version takes into account Evgeniy's review and makes sure
    inet_twsk_put() is called outside of locked sections.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet