19 Aug, 2010

3 commits

  • Since
    commit 1dacc76d0014a034b8aca14237c127d7c19d7726
    Author: Johannes Berg
    Date: Wed Jul 1 11:26:02 2009 +0000

    net/compat/wext: send different messages to compat tasks

    we had a race condition when setting and then
    restoring frag_list. Eric attempted to fix it,
    but the fix created even worse problems.

    However, the original motivation I had when I
    added the code that turned out to be racy is
    no longer clear to me, since we only copy up
    to skb->len to userspace, which doesn't include
    the frag_list length. As a result, not doing
    any frag_list clearing and restoring avoids
    the race condition, while not introducing any
    other problems.

    Additionally, while preparing this patch I found
    that since none of the remaining netlink code is
    really aware of the frag_list, we need to use the
    original skb's information for packet information
    and credentials. This fixes, for example, the
    group information received by compat tasks.

    Cc: Eric Dumazet
    Cc: stable@kernel.org [2.6.31+, for 2.6.35 revert 1235f504aa]
    Signed-off-by: Johannes Berg
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • "make headers_check" issued the following warning:

    CHECK include/linux/netfilter (64 files)
    usr/include/linux/netfilter/xt_ipvs.h:19: found __[us]{8,16,32,64} type without #include

    Fix this by as suggested including linux/types.h.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: David S. Miller

    Sam Ravnborg
     
  • Signed-off-by: Sachin Sanap
    Signed-off-by: David S. Miller

    Sachin Sanap
     

18 Aug, 2010

3 commits

  • >Xin Xiaohui wrote:
    > I looked into the code dev_gro_receive(), found the code here:
    > if the frags[0] is pulled to 0, then the page will be released,
    > and memmove() frags left.
    > Is that right? I'm not sure if memmove do right or not, but
    > frags[0].size is never set after memove at least. what I think
    > a simple way is not to do anything if we found frags[0].size == 0.
    > The patch is as followed.
    ...

    This version of the patch fixes the bug directly in memmove.

    Reported-by: "Xin, Xiaohui"
    Signed-off-by: Jarek Poplawski
    Signed-off-by: David S. Miller

    Jarek Poplawski
     
  • We leak at least 32bits of kernel memory to user land in tc dump,
    because we dont init all fields (capab ?) of the dumped structure.

    Use C99 initializers so that holes and non explicit fields are zeroed.

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

    Eric Dumazet
     
  • After commit 24b36f019 (netfilter: {ip,ip6,arp}_tables: dont block
    bottom half more than necessary), lockdep can raise a warning
    because we attempt to lock a spinlock with BH enabled, while
    the same lock is usually locked by another cpu in a softirq context.

    Disable again BH to avoid these lockdep warnings.

    Reported-by: Linus Torvalds
    Diagnosed-by: David S. Miller
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

17 Aug, 2010

1 commit


16 Aug, 2010

1 commit


15 Aug, 2010

2 commits

  • sysctl output ipv6 gc_elasticity and min_adv_mss as values divided by
    HZ. However, they are not in unit of jiffies, since ip6_rt_min_advmss
    refers to packet size and ip6_rt_fc_elasticity is used as scaler as in
    expire>>ip6_rt_gc_elasticity, so replace the jiffies conversion
    handler will regular handler for them.

    This has impact on scripts that are currently working assuming the
    divide by HZ, will yield different results with this patch in place.

    Signed-off-by: Min Zhang
    Signed-off-by: David S. Miller

    Min Zhang
     
  • As xfrm_compile_policy runs within a read_lock, we cannot use
    GFP_KERNEL for memory allocations.

    Reported-by: Luca Tettamanti
    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

14 Aug, 2010

4 commits

  • Atheros PCIe wireless cards handled by ath5k do require L0s disabled.
    For distributions shipping with CONFIG_PCIEASPM (this will be enabled
    by default in the future in 2.6.36) this will also mean both L1 and L0s
    will be disabled when a pre 1.1 PCIe device is detected. We do know L1
    works correctly even for all ath5k pre 1.1 PCIe devices though but cannot
    currently undue the effect of a blacklist, for details you can read
    pcie_aspm_sanity_check() and see how it adjusts the device link
    capability.

    It may be possible in the future to implement some PCI API to allow
    drivers to override blacklists for pre 1.1 PCIe but for now it is
    best to accept that both L0s and L1 will be disabled completely for
    distributions shipping with CONFIG_PCIEASPM rather than having this
    issue present. Motivation for adding this new API will be to help
    with power consumption for some of these devices.

    Example of issues you'd see:

    - On the Acer Aspire One (AOA150, Atheros Communications Inc. AR5001
    Wireless Network Adapter [168c:001c] (rev 01)) doesn't work well
    with ASPM enabled, the card will eventually stall on heavy traffic
    with often 'unsupported jumbo' warnings appearing. Disabling
    ASPM L0s in ath5k fixes these problems.

    - On the same card you would see a storm of RXORN interrupts
    even though medium is idle.

    Credit for root causing and fixing the bug goes to Jussi Kivilinna.

    Cc: David Quan
    Cc: Matthew Garrett
    Cc: Tim Gardner
    Cc: Jussi Kivilinna
    Cc: stable@kernel.org
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Maxim Levitsky
    Signed-off-by: John W. Linville

    Maxim Levitsky
     
  • This patch handles the firmware loading properly
    for device ID 7015.

    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: John W. Linville

    Rajkumar Manoharan
     
  • Use appropriate command (CMD_TRIGGER_SCAN_TO) instead of scan command
    (CMD_SCAN) to configure trigger scan timeout.

    This was broken in commit 3a98c30f3e8bb1f32b5bcb74a39647b3670de275.

    This fix address the bug reported here:

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

    Cc: stable@kernel.org
    Signed-off-by: Yuri Ershov
    Signed-off-by: Yuri Kululin
    Acked-by: Kalle Valo
    Signed-off-by: John W. Linville

    Yuri Kululin
     
  • Some APs advertise that they may be HT40 capable in the capabilites
    but the current operating channel configuration may be only HT20.
    This causes disconnection as ath9k_htc sets WLAN_RC_40_FLAG despite
    the AP operating in HT20 mode.
    Hence set this flag only if the current channel configuration
    is HT40 enabled.

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

    Vivek Natarajan
     

13 Aug, 2010

2 commits

  • READ/WRITE seems to be a bit too generic for defines in a device
    driver. Just rename them to CTCM_READ/CTCM_WRITE to avoid warnings.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • READ/WRITE seems to be a bit too generic for defines in a device driver.
    Just rename them to READ_CHANNEL/WRITE_CHANNEL which should suffice.

    Fixes this:

    In file included from drivers/s390/net/claw.c:93:
    drivers/s390/net/claw.h:78:1: warning: "WRITE" redefined
    In file included from /home2/heicarst/linux-2.6/arch/s390/include/asm/debug.h:12,
    from drivers/s390/net/claw.c:68:
    include/linux/fs.h:156:1: warning: this is the location of the previous definition

    Signed-off-by: Heiko Carstens
    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Heiko Carstens
     

12 Aug, 2010

4 commits

  • Several gigabit network drivers (SB1250_MAC, TIGON3, FSL, GIANFAR,
    UCC_GETH, MV643XX_ETH, XILINX_LL_TEMAC, S6GMAC, STMMAC_ETH, PASEMI_MAC,
    and OCTEON_ETHERNET) select PHYLIB. These drivers are not under
    NET_ETHERNET (10/100 mbit), so this warning is generated (long, irrelevant
    parts are omitted):

    warning: (NET_DSA && NET && EXPERIMENTAL && NET_ETHERNET && !S390 || ... || SB1250_MAC && NETDEVICES && NETDEV_1000 && SIBYTE_SB1xxx_SOC || TIGON3 && NETDEVICES && NETDEV_1000 && PCI || FSL_PQ_MDIO && NETDEVICES && NETDEV_1000 && FSL_SOC || GIANFAR && NETDEVICES && NETDEV_1000 && FSL_SOC || UCC_GETH && NETDEVICES && NETDEV_1000 && QUICC_ENGINE || MV643XX_ETH && NETDEVICES && NETDEV_1000 && (MV64X60 || PPC32 || PLAT_ORION) || XILINX_LL_TEMAC && NETDEVICES && NETDEV_1000 && (PPC || MICROBLAZE) || S6GMAC && NETDEVICES && NETDEV_1000 && XTENSA_VARIANT_S6000 || STMMAC_ETH && NETDEV_1000 && NETDEVICES && CPU_SUBTYPE_ST40 || PASEMI_MAC && NETDEVICES && NETDEV_10000 && PPC_PASEMI && PCI || OCTEON_ETHERNET && STAGING && !STAGING_EXCLUDE_BUILD && CPU_CAVIUM_OCTEON) selects PHYLIB which has unmet direct dependencies (!S390 && NET_ETHERNET)

    PHYLIB is used by non-10/100 mbit ethernet drivers, so change the dependencies
    to be NETDEVICES instead of NET_ETHERNET.

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • This patch adds a limit for nframes as the number of frames in TX_SETUP and
    RX_SETUP are derived from a single byte multiplex value by default.
    Use-cases that would require to send/filter more than 256 CAN frames should
    be implemented in userspace for complexity reasons anyway.

    Additionally the assignments of unsigned values from userspace to signed
    values in kernelspace and vice versa are fixed by using unsigned values in
    kernelspace consistently.

    Signed-off-by: Oliver Hartkopp
    Reported-by: Ben Hawkes
    Acked-by: Urs Thuermann
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     
  • This should fix the oops which occurs during the packet injection
    on monitor interface.

    EIP is at ath9k_htc_tx_start+0x69/0x220 [ath9k_htc]
    [] ? invoke_tx_handlers+0xa5a/0xee0 [mac80211]
    [] ? ath9k_htc_tx+0x44/0xe0 [ath9k_htc]
    [] ? __ieee80211_tx+0xf8/0x190 [mac80211]
    [] ? ieee80211_tx+0x9d/0x1a0 [mac80211]
    [] ? ieee80211_xmit+0x9c/0x1c0 [mac80211]
    [] ? ieee80211_monitor_start_xmit+0x85/0xb0 [mac80211]
    [] ? dev_hard_start_xmit+0x1ad/0x210
    [] ? __alloc_skb+0x52/0x130
    [] ? sch_direct_xmit+0x105/0x170
    [] ? dev_queue_xmit+0x37f/0x4b0
    [] ? packet_snd+0x21e/0x250
    [] ? packet_sendmsg+0x32/0x40
    [] ? sock_aio_write+0x113/0x130
    [] ? do_sync_write+0xc4/0x100
    [] ? autoremove_wake_function+0x0/0x50
    [] ? security_file_permission+0x14/0x20
    [] ? rw_verify_area+0x64/0xe0
    [] ? handle_mm_fault+0x338/0x390
    [] ? vfs_write+0x185/0x1a0
    [] ? do_page_fault+0x160/0x3a0
    [] ? sys_write+0x42/0x70
    [] ? syscall_call+0x7/0xb

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

    Rajkumar Manoharan
     
  • It is necessary to call pm_qos_add_request prior to calling
    pm_qos_update_request. It was revealed that ipw2100 has been
    doing this wrong since "pm_qos: Get rid of the allocation in
    pm_qos_add_request()" (commit 82f682514a5df89ffb3890627eebf0897b7a84ec)
    added a WARN that results in the following backtrace:

    WARNING: at kernel/pm_qos_params.c:264 pm_qos_update_request+0x5e/0x70()
    pm_qos_update_request() called for unknown object
    Call Trace:
    [] ? warn_slowpath_common+0x78/0xb0
    [] ? pm_qos_update_request+0x5e/0x70
    [] ? pm_qos_update_request+0x5e/0x70
    [] ? warn_slowpath_fmt+0x33/0x40
    [] ? pm_qos_update_request+0x5e/0x70
    [] ? ipw2100_up+0x3f/0xf10 [ipw2100]
    [] ? vsnprintf+0xc9/0x530
    [] ? ipw2100_net_init+0x2c/0x1c0 [ipw2100]
    [] ? register_netdevice+0x7d/0x3c0
    [] ? ipw2100_irq_tasklet+0x910/0x9a0 [ipw2100]
    [] ? register_netdev+0x2f/0x40
    [] ? ipw2100_pci_init_one+0xd21/0x1060 [ipw2100]
    [] ? local_pci_probe+0xb/0x10
    [] ? pci_device_probe+0x69/0x90
    [] ? driver_probe_device+0x74/0x180
    [] ? sysfs_create_dir+0x6a/0xb0
    [] ? __driver_attach+0x79/0x80
    [] ? __driver_attach+0x0/0x80
    [] ? bus_for_each_dev+0x52/0x80
    [] ? driver_attach+0x16/0x20
    [] ? __driver_attach+0x0/0x80
    [] ? bus_add_driver+0x17f/0x250
    [] ? pci_device_shutdown+0x0/0x20
    [] ? pci_device_remove+0x0/0x40
    [] ? driver_register+0x63/0x120
    [] ? __pci_register_driver+0x36/0xa0
    [] ? ipw2100_init+0x48/0x67 [ipw2100]
    [] ? do_one_initcall+0x32/0x170
    [] ? __vunmap+0xb8/0xf0
    [] ? ipw2100_init+0x0/0x67 [ipw2100]
    [] ? sys_init_module+0x161/0x1000
    [] ? sys_close+0x67/0xe0
    [] ? syscall_call+0x7/0xb

    This patch moves pm_qos_add_request prior to pci_register_driver in
    ipw2100 in order to avoid this problem.

    Reported-by: Christoph Fritz
    Signed-off-by: John W. Linville

    John W. Linville
     

11 Aug, 2010

7 commits


10 Aug, 2010

13 commits

  • The previous value of 672 for L2CAP_DEFAULT_MAX_PDU_SIZE is based on
    the default L2CAP MTU. That default MTU is calculated from the size
    of two DH5 packets, minus ACL and L2CAP b-frame header overhead.

    ERTM is used with newer basebands that typically support larger 3-DH5
    packets, and i-frames and s-frames have more header overhead. With
    clean RF conditions, basebands will typically attempt to use 1021-byte
    3-DH5 packets for maximum throughput. Adjusting for 2 bytes of ACL
    headers plus 10 bytes of worst-case L2CAP headers yields 1009 bytes
    of payload.

    This PDU size imposes less overhead for header bytes and gives the
    baseband the option to choose 3-DH5 packets, but is small enough for
    ERTM traffic to interleave well with other L2CAP or SCO data.
    672-byte payloads do not allow the most efficient over-the-air
    packet choice, and cannot achieve maximum throughput over BR/EDR.

    Signed-off-by: Mat Martineau
    Signed-off-by: Marcel Holtmann

    Mat Martineau
     
  • remote_tx_win is intended to be set on receipt of an L2CAP
    configuration request. The value is used to determine the size of the
    transmit window on the remote side of an ERTM connection, so L2CAP
    can stop sending frames when that remote window is full.

    An incorrect remote_tx_win value will cause the stack to not fully
    utilize the tx window (performance impact), or to overfill the remote
    tx window (causing dropped frames or a disconnect).

    This patch removes an extra setting of remote_tx_win when a
    configuration response is received. The transmit window has a
    different meaning in a response - it is an informational value
    less than or equal to the local tx_win.

    Signed-off-by: Mat Martineau
    Signed-off-by: Marcel Holtmann

    Mat Martineau
     
  • The L2CAP specification requires that the ERTM retransmit timeout be at
    least 2 seconds for BR/EDR connections.

    Signed-off-by: Mat Martineau
    Signed-off-by: Marcel Holtmann

    Mat Martineau
     
  • Incoming configuration values must be converted to native CPU order
    before use. This fixes a bug where a little-endian MPS value is
    compared to a native CPU value. On big-endian processors, this
    can cause ERTM and streaming mode segmentation to produce PDUs
    that are larger than the remote stack is expecting, or that would
    produce fragmented skbs that the current FCS code cannot handle.

    Signed-off-by: Mat Martineau
    Signed-off-by: Marcel Holtmann

    Mat Martineau
     
  • This is based on work originally done by Patric McHardy.

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

    Ben Greear
     
  • Driver should call pci_disable_device() if it returns from pci_probe()
    with error.

    Signed-off-by: Kulikov Vasiliy
    Signed-off-by: David S. Miller

    Kulikov Vasiliy
     
  • Driver should call pci_disable_device() if it returns from pci_probe()
    with error.

    Signed-off-by: Kulikov Vasiliy
    Signed-off-by: David S. Miller

    Kulikov Vasiliy
     
  • Driver should call pci_disable_device() if it returns from pci_probe()
    with error.

    Signed-off-by: Kulikov Vasiliy
    Signed-off-by: David S. Miller

    Kulikov Vasiliy
     
  • This patch makes rx_submit() return an error code, and makes some call sites
    that care check the return value. This is important because it lets us properly
    handle cases where the device isn't ready to handle URB submissions (e.g., when
    it is autosuspended under some drivers); previously, we would attempt and fail
    to submit URBs and reschedule ourselves to try and fail again. This patch is
    against Linus's 2.6 repo commit 45d7f32c7a43cbb9592886d38190e379e2eb2226.

    Signed-Off-By: Elizabeth Jones
    Signed-off-by: David S. Miller

    David S. Miller
     
  • …mmy bind/unbind handles

    Verify in register_qdisc() some basic qdisc class handlers are present.

    Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

    Jarek Poplawski
     
  • …dummy bind/unbind handles

    Add dummy .unbind_tcf and .put qdisc class ops for easier verification.
    (All other schedulers have it like this.)

    Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

    Jarek Poplawski
     
  • qlcnic_pci_info structs are 128 bytes so an array of 8 uses 1024 bytes.
    That's a lot if you run with 4K stacks. I allocated them with kcalloc()
    instead.

    Signed-off-by: Dan Carpenter
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • In the original code we allocated memory conditionally and freed it in
    the error handling unconditionally. It turns out that this function is
    only called during initialization and "adapter->npars" and
    "adapter->eswitch" are always NULL at the start of the function. I
    removed those checks.

    Also since I was cleaning things, I changed the error handling for
    qlcnic_get_pci_info() and pulled everything in an indent level.

    Signed-off-by: Dan Carpenter
    Signed-off-by: David S. Miller

    Dan Carpenter