26 Feb, 2011

1 commit


25 Feb, 2011

1 commit

  • The API for network devices has changed so that setting carrier off at
    probe is no longer required. This should fix the IPv6 addrconf issue.

    Addresses https://bugzilla.kernel.org/show_bug.cgi?id=29612

    Signed-off-by: Stephen Hemminger
    Reported-by: George Billios
    Cc: David Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

24 Feb, 2011

8 commits


23 Feb, 2011

9 commits

  • David S. Miller
     
  • drivers/net/sfc/ethtool.c: In function ‘efx_ethtool_self_test’:
    drivers/net/sfc/ethtool.c:613: warning: the frame size of 1200 bytes
    is larger than 1024 bytes

    Signed-off-by: Eric Dumazet
    Acked-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Currently the bridge multicast snooping feature periodically issues
    IPv6 general multicast listener queries to sense the absence of a
    listener.

    For this, it uses :: as its source address - however RFC 2710 requires:
    "To be valid, the Query message MUST come from a link-local IPv6 Source
    Address". Current Linux kernel versions seem to follow this requirement
    and ignore our bogus MLD queries.

    With this commit a link local address from the bridge interface is being
    used to issue the MLD query, resulting in other Linux devices which are
    multicast listeners in the network to respond with a MLD response (which
    was not the case before).

    Signed-off-by: Linus Lüssing
    Signed-off-by: David S. Miller

    Linus Lüssing
     
  • Map the IPv6 header's destination multicast address to an ethernet
    source address instead of the MLD queries multicast address.

    For instance for a general MLD query (multicast address in the MLD query
    set to ::), this would wrongly be mapped to 33:33:00:00:00:00, although
    an MLD queries destination MAC should always be 33:33:00:00:00:01 which
    matches the IPv6 header's multicast destination ff02::1.

    Signed-off-by: Linus Lüssing
    Signed-off-by: David S. Miller

    Linus Lüssing
     
  • Currently the multicast bridge snooping support is not active for
    link local multicast. I assume this has been done to leave
    important multicast data untouched, like IPv6 Neighborhood Discovery.

    In larger, bridged, local networks it could however be desirable to
    optimize for instance local multicast audio/video streaming too.

    With the transient flag in IPv6 multicast addresses we have an easy
    way to optimize such multimedia traffic without tempering with the
    high priority multicast data from well-known addresses.

    This patch alters the multicast bridge snooping for IPv6, to take
    effect for transient multicast addresses instead of non-link-local
    addresses.

    Signed-off-by: Linus Lüssing
    Signed-off-by: David S. Miller

    Linus Lüssing
     
  • This commit adds the missing IPv6 multicast address flag defines to
    complement the already existing multicast address scope defines and to
    be able to check these flags nicely in the future.

    Signed-off-by: Linus Lüssing
    Signed-off-by: David S. Miller

    Linus Lüssing
     
  • The nsrcs number is 2 Byte wide, therefore we need to call ntohs()
    before using it.

    Signed-off-by: Linus Lüssing
    Signed-off-by: David S. Miller

    Linus Lüssing
     
  • We actually want a pointer to the grec_nsrcr and not the following
    field. Otherwise we can get very high values for *nsrcs as the first two
    bytes of the IPv6 multicast address are being used instead, leading to
    a failing pskb_may_pull() which results in MLDv2 reports not being
    parsed.

    Signed-off-by: Linus Lüssing
    Signed-off-by: David S. Miller

    Linus Lüssing
     
  • The protocol type for IPv6 entries in the hash table for multicast
    bridge snooping is falsely set to ETH_P_IP, marking it as an IPv4
    address, instead of setting it to ETH_P_IPV6, which results in negative
    look-ups in the hash table later.

    Signed-off-by: Linus Lüssing
    Signed-off-by: David S. Miller

    Linus Lüssing
     

22 Feb, 2011

5 commits

  • Documentation/DMA-API-HOWTO.txt states:

    "DMA transfers need to be synced properly in order for
    the cpu and device to see the most uptodate and correct
    copy of the DMA buffer."

    Cc:
    Signed-off-by: Christian Lamparter
    Signed-off-by: John W. Linville

    Christian Lamparter
     
  • I previously managed to reproduce a hang while scanning wireless
    channels (reproducible with airodump-ng hopping channels); subsequent
    lockdep instrumentation revealed a lock ordering issue.

    Without knowing the design intent, it looks like the locks should be
    taken in reverse order; please comment.

    =======================================================
    [ INFO: possible circular locking dependency detected ]
    2.6.38-rc5-341cd #4
    -------------------------------------------------------
    airodump-ng/15445 is trying to acquire lock:
    (&rdev->devlist_mtx){+.+.+.}, at: []
    cfg80211_wext_siwfreq+0xc6/0x100

    but task is already holding lock:
    (&wdev->mtx){+.+.+.}, at: [] cfg80211_wext_siwfreq+0xbc/0x100

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -> #1 (&wdev->mtx){+.+.+.}:
    [] lock_acquire+0xc6/0x280
    [] mutex_lock_nested+0x6e/0x4b0
    [] cfg80211_netdev_notifier_call+0x430/0x5f0
    [] notifier_call_chain+0x8b/0x100
    [] raw_notifier_call_chain+0x11/0x20
    [] call_netdevice_notifiers+0x32/0x60
    [] __dev_notify_flags+0x34/0x80
    [] dev_change_flags+0x40/0x70
    [] do_setlink+0x1fc/0x8d0
    [] rtnl_setlink+0xf2/0x140
    [] rtnetlink_rcv_msg+0x163/0x270
    [] netlink_rcv_skb+0xa1/0xd0
    [] rtnetlink_rcv+0x20/0x30
    [] netlink_unicast+0x2ba/0x300
    [] netlink_sendmsg+0x267/0x3e0
    [] sock_sendmsg+0xe4/0x110
    [] sys_sendmsg+0x253/0x3b0
    [] system_call_fastpath+0x16/0x1b

    -> #0 (&rdev->devlist_mtx){+.+.+.}:
    [] __lock_acquire+0x1622/0x1d10
    [] lock_acquire+0xc6/0x280
    [] mutex_lock_nested+0x6e/0x4b0
    [] cfg80211_wext_siwfreq+0xc6/0x100
    [] ioctl_standard_call+0x5d/0xd0
    [] T.808+0x163/0x170
    [] wext_handle_ioctl+0x3a/0x90
    [] dev_ioctl+0x6f2/0x830
    [] sock_ioctl+0xfd/0x290
    [] do_vfs_ioctl+0x9d/0x590
    [] sys_ioctl+0x4a/0x80
    [] system_call_fastpath+0x16/0x1b

    other info that might help us debug this:

    2 locks held by airodump-ng/15445:
    #0: (rtnl_mutex){+.+.+.}, at: [] rtnl_lock+0x12/0x20
    #1: (&wdev->mtx){+.+.+.}, at: []
    cfg80211_wext_siwfreq+0xbc/0x100

    stack backtrace:
    Pid: 15445, comm: airodump-ng Not tainted 2.6.38-rc5-341cd #4
    Call Trace:
    [] ? print_circular_bug+0xfa/0x100
    [] ? __lock_acquire+0x1622/0x1d10
    [] ? trace_hardirqs_off_caller+0x29/0xc0
    [] ? lock_acquire+0xc6/0x280
    [] ? cfg80211_wext_siwfreq+0xc6/0x100
    [] ? mark_held_locks+0x67/0x90
    [] ? mutex_lock_nested+0x6e/0x4b0
    [] ? cfg80211_wext_siwfreq+0xc6/0x100
    [] ? mark_held_locks+0x67/0x90
    [] ? cfg80211_wext_siwfreq+0xc6/0x100
    [] ? cfg80211_wext_siwfreq+0xc6/0x100
    [] ? ioctl_standard_call+0x5d/0xd0
    [] ? __dev_get_by_name+0x9b/0xc0
    [] ? ioctl_standard_call+0x0/0xd0
    [] ? T.808+0x163/0x170
    [] ? might_fault+0x72/0xd0
    [] ? wext_handle_ioctl+0x3a/0x90
    [] ? might_fault+0xbb/0xd0
    [] ? dev_ioctl+0x6f2/0x830
    [] ? put_lock_stats+0xe/0x40
    [] ? lock_release_holdtime+0xac/0x150
    [] ? sock_ioctl+0xfd/0x290
    [] ? do_vfs_ioctl+0x9d/0x590
    [] ? fget_light+0x1df/0x3c0
    [] ? sys_ioctl+0x4a/0x80
    [] ? system_call_fastpath+0x16/0x1b

    Signed-off-by: Daniel J Blueman
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Daniel J Blueman
     
  • As reported and found by Johannes Stezenbach:
    rt2800{pci,usb} do not report the Michael MIC in RXed frames, but do check
    the Michael MIC in hardware. Therefore we have to report to mac80211 that the
    received frame does not include the Michael MIC.

    https://bugzilla.kernel.org/show_bug.cgi?id=16608

    Signed-off-by: Gertjan van Wingerde
    Signed-off-by: Ivo van Doorn
    Signed-off-by: John W. Linville

    Gertjan van Wingerde
     
  • Fast channel change fixes:

    a) Always set OFDM timings
    b) Don't re-activate PHY
    c) Enable only NF calibration, not AGC

    https://bugzilla.kernel.org/show_bug.cgi?id=27382

    Signed-off-by: Nick Kossifidis
    Signed-off-by: John W. Linville

    Nick Kossifidis
     
  • Fix a bug that undo_retrans is incorrectly decremented when undo_marker is
    not set or undo_retrans is already 0. This happens when sender receives
    more DSACK ACKs than packets retransmitted during the current
    undo phase. This may also happen when sender receives DSACK after
    the undo operation is completed or cancelled.

    Fix another bug that undo_retrans is incorrectly incremented when
    sender retransmits an skb and tcp_skb_pcount(skb) > 1 (TSO). This case
    is rare but not impossible.

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

    Yuchung Cheng
     

21 Feb, 2011

1 commit

  • From: Eric W. Biederman

    In the beginning with batching unreg_list was a list that was used only
    once in the lifetime of a network device (I think). Now we have calls
    using the unreg_list that can happen multiple times in the life of a
    network device like dev_deactivate and dev_close that are also using the
    unreg_list. In addition in unregister_netdevice_queue we also do a
    list_move because for devices like veth pairs it is possible that
    unregister_netdevice_queue will be called multiple times.

    So I think the change below to fix dev_deactivate which Eric D. missed
    will fix this problem. Now to go test that.

    Signed-off-by: David S. Miller

    Eric W. Biederman
     

20 Feb, 2011

4 commits

  • commit 5fa782c2f5ef6c2e4f04d3e228412c9b4a4c8809 re-worked the
    handling of unknown parameters. sctp_init_cause_fixed() can now
    return -ENOSPC if there is not enough tailroom in the error
    chunk skb. When this happens, the error header is not appended to
    the error chunk. In that case, the payload of the unknown parameter
    should not be appended either.

    Signed-off-by: Jiri Bohac
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Jiri Bohac
     
  • The dcb_app protocol field is a __u32 however the 802.1Qaz
    specification defines it as a 16 bit field. This patch brings
    the structure inline with the spec making it a __u16.

    CC: Shmulik Ravid
    Signed-off-by: John Fastabend
    Signed-off-by: David S. Miller

    John Fastabend
     
  • Eric W. Biederman reported a lockdep splat in inet_twsk_deschedule()

    This is caused by inet_twsk_purge(), run from process context,
    and commit 575f4cd5a5b6394577 (net: Use rcu lookups in inet_twsk_purge.)
    removed the BH disabling that was necessary.

    Add the BH disabling but fine grained, right before calling
    inet_twsk_deschedule(), instead of whole function.

    With help from Linus Torvalds and Eric W. Biederman

    Reported-by: Eric W. Biederman
    Signed-off-by: Eric Dumazet
    CC: Daniel Lezcano
    CC: Pavel Emelyanov
    CC: Arnaldo Carvalho de Melo
    CC: stable (# 2.6.33+)
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • David S. Miller
     

19 Feb, 2011

11 commits

  • * 'rtc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    RTC: Re-enable UIE timer/polling emulation
    RTC: Revert UIE emulation removal
    RTC: Release mutex in error path of rtc_alarm_irq_enable

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (37 commits)
    net: deinit automatic LIST_HEAD
    net: dont leave active on stack LIST_HEAD
    net: provide default_advmss() methods to blackhole dst_ops
    tg3: Restrict phy ioctl access
    drivers/net: Call netif_carrier_off at the end of the probe
    ixgbe: work around for DDP last buffer size
    ixgbe: fix panic due to uninitialised pointer
    e1000e: flush all writebacks before unload
    e1000e: check down flag in tasks
    isdn: hisax: Use l2headersize() instead of dup (and buggy) func.
    arp_notify: unconditionally send gratuitous ARP for NETDEV_NOTIFY_PEERS.
    cxgb4vf: Use defined Mailbox Timeout
    cxgb4vf: Quiesce Virtual Interfaces on shutdown ...
    cxgb4vf: Behave properly when CONFIG_DEBUG_FS isn't defined ...
    cxgb4vf: Check driver parameters in the right place ...
    pch_gbe: Fix the MAC Address load issue.
    iwlwifi: Delete iwl3945_good_plcp_health.
    net/can/softing: make CAN_SOFTING_CS depend on CAN_SOFTING
    netfilter: nf_iterate: fix incorrect RCU usage
    pch_gbe: Fix the issue that the receiving data is not normal.
    ...

    Linus Torvalds
     
  • Correct channel setting function must be used for AR2317.
    When I tested ahb patch on bullet2 all seemed to work fine,
    but it couldn't connect another host (using ibss for example).
    During an analysis I observed that it's transmitting on another
    channel. I looked into madwifi code and understood that
    the problem is in channel setting function. So atheros RF2317 not
    fully handled in the current ath5k version and must be patched.

    Signed-off-by: Nikolay Ledovskikh
    Acked-by: Bob Copeland
    Signed-off-by: John W. Linville

    Nikolay Ledovskikh
     
  • taken two RT35XX EDIMAX from DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217

    Signed-off-by: Xose Vazquez Perez
    Acked-by: Ivo van Doorn
    Signed-off-by: John W. Linville

    Xose Vazquez Perez
     
  • Low level driver could pass rx frames to us after disassociate, what
    can lead to run conn_mon_timer by ieee80211_sta_rx_notify(). That
    is obviously wrong, but nothing happens until we unload modules and
    resources are used after free. If kernel debugging is enabled following
    warning could be observed:

    WARNING: at lib/debugobjects.c:259 debug_print_object+0x65/0x70()
    Hardware name: HP xw8600 Workstation
    ODEBUG: free active (active state 0) object type: timer_list
    Modules linked in: iwlagn(-) iwlcore mac80211 cfg80211 aes_x86_64 aes_generic fuse cpufreq_ondemand acpi_cpufreq freq_table mperf xt_physdev ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 ext3 jbd dm_mirror dm_region_hash dm_log dm_mod uinput hp_wmi sparse_keymap sg wmi arc4 microcode serio_raw ecb tg3 shpchp rfkill ext4 mbcache jbd2 sr_mod cdrom sd_mod crc_t10dif firewire_ohci firewire_core crc_itu_t mptsas mptscsih mptbase scsi_transport_sas ahci libahci pata_acpi ata_generic ata_piix floppy nouveau ttm drm_kms_helper drm i2c_algo_bit i2c_core video [last unloaded: cfg80211]
    Pid: 13827, comm: rmmod Tainted: G W 2.6.38-rc4-wl+ #22
    Call Trace:
    [] ? warn_slowpath_common+0x7f/0xc0
    [] ? warn_slowpath_fmt+0x46/0x50
    [] ? debug_print_object+0x65/0x70
    [] ? debug_check_no_obj_freed+0x125/0x210
    [] ? debug_check_no_locks_freed+0xf7/0x170
    [] ? kfree+0xc2/0x2f0
    [] ? netdev_release+0x45/0x60
    [] ? device_release+0x27/0xa0
    [] ? kobject_release+0x8d/0x1a0
    [] ? kobject_release+0x0/0x1a0
    [] ? kref_put+0x37/0x70
    [] ? kobject_put+0x27/0x60
    [] ? netdev_run_todo+0x1ab/0x270
    [] ? rtnl_unlock+0xe/0x10
    [] ? ieee80211_unregister_hw+0x58/0x120 [mac80211]
    [] ? iwl_pci_remove+0xdb/0x22a [iwlagn]
    [] ? pci_device_remove+0x52/0x120
    [] ? __device_release_driver+0x75/0xe0
    [] ? driver_detach+0xd8/0xe0
    [] ? bus_remove_driver+0x91/0x100
    [] ? driver_unregister+0x62/0xa0
    [] ? pci_unregister_driver+0x44/0xa0
    [] ? iwl_exit+0x15/0x1c [iwlagn]
    [] ? sys_delete_module+0x1a2/0x270
    [] ? trace_hardirqs_on_thunk+0x3a/0x3f
    [] ? system_call_fastpath+0x16/0x1b

    Acked-by: Johannes Berg
    Signed-off-by: Stanislaw Gruszka
    Signed-off-by: John W. Linville

    Stanislaw Gruszka
     
  • John W. Linville
     
  • * 'for-linus/bugfixes' of git://xenbits.xen.org/people/ianc/linux-2.6:
    xen: suspend and resume system devices when running PVHVM

    Linus Torvalds
     
  • * 'fixes-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
    workqueue: make sure MAYDAY_INITIAL_TIMEOUT is at least 2 jiffies long
    workqueue, freezer: unify spelling of 'freeze' + 'able' to 'freezable'
    workqueue: wake up a worker when a rescuer is leaving a gcwq

    Linus Torvalds
     
  • commit 9b5e383c11b08784 (net: Introduce
    unregister_netdevice_many()) left an active LIST_HEAD() in
    rollback_registered(), with possible memory corruption.

    Even if device is freed without touching its unreg_list (and therefore
    touching the previous memory location holding LISTE_HEAD(single), better
    close the bug for good, since its really subtle.

    (Same fix for default_device_exit_batch() for completeness)

    Reported-by: Michal Hocko
    Tested-by: Michal Hocko
    Reported-by: Eric W. Biderman
    Tested-by: Eric W. Biderman
    Signed-off-by: Linus Torvalds
    Signed-off-by: Eric Dumazet
    CC: Ingo Molnar
    CC: Octavian Purdila
    CC: stable [.33+]
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Eric W. Biderman and Michal Hocko reported various memory corruptions
    that we suspected to be related to a LIST head located on stack, that
    was manipulated after thread left function frame (and eventually exited,
    so its stack was freed and reused).

    Eric Dumazet suggested the problem was probably coming from commit
    443457242beb (net: factorize
    sync-rcu call in unregister_netdevice_many)

    This patch fixes __dev_close() and dev_close() to properly deinit their
    respective LIST_HEAD(single) before exiting.

    References: https://lkml.org/lkml/2011/2/16/304
    References: https://lkml.org/lkml/2011/2/14/223

    Reported-by: Michal Hocko
    Tested-by: Michal Hocko
    Reported-by: Eric W. Biderman
    Tested-by: Eric W. Biderman
    Signed-off-by: Linus Torvalds
    Signed-off-by: Eric Dumazet
    CC: Ingo Molnar
    CC: Octavian Purdila
    Signed-off-by: David S. Miller

    Linus Torvalds
     
  • Commit 0dbaee3b37e118a (net: Abstract default ADVMSS behind an
    accessor.) introduced a possible crash in tcp_connect_init(), when
    dst->default_advmss() is called from dst_metric_advmss()

    Reported-by: George Spelvin
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet