02 Apr, 2011

1 commit


01 Apr, 2011

1 commit

  • Commit 60d9f461a20ba59219fdcdc30cbf8e3a4ad3f625 ("appletalk: remove
    the BKL") added a dereference of "sk" before checking for NULL in
    atalk_release().

    Guard the code block completely, rather than partially, with the
    NULL check.

    Reported-by: Dave Jones
    Signed-off-by: David S. Miller

    David S. Miller
     

31 Mar, 2011

9 commits

  • We should reduce the number of reserved completion queues from the total
    number of entries. Since the queue size is power of two, not reducing the
    reserved entries, caused a double queue size, which may lead to allocation
    failures in some cases.

    Signed-off-by: Yevgeny Petrilin
    Signed-off-by: David S. Miller

    Yevgeny Petrilin
     
  • In case of allocation failure, tried to use the promiscuous QP
    entry that was previously freed.
    Now freeing this entry only in case we will not put it back to the list
    of promiscuous entries.

    Reported-by: Dan Carpenter
    Signed-off-by: Yevgeny Petrilin
    Signed-off-by: David S. Miller

    Yevgeny Petrilin
     
  • use accumulates instead of acumulates.

    Signed-off-by: Pan Weiping
    Signed-off-by: David S. Miller

    Peter Pan(潘卫平)
     
  • Like DCCP and other similar pieces of code, there are mechanisms
    here to try allocating smaller hash tables if the allocation
    fails. So pass in __GFP_NOWARN like the others do instead of
    emitting a scary message.

    Reported-by: Dave Jones
    Signed-off-by: David S. Miller

    David S. Miller
     
  • Commits 01a16b21 (netlink: kill eff_cap from struct netlink_skb_parms)
    and c53fa1ed (netlink: kill loginuid/sessionid/sid members from struct
    netlink_skb_parms) removed some members from struct netlink_skb_parms
    that depend on the current context, all netlink users are now required
    to do synchronous message processing.

    connector however queues received messages and processes them in a work
    queue, which is not valid anymore. This patch converts connector to do
    synchronous message processing by invoking the registered callback handler
    directly from the netlink receive function.

    In order to avoid invoking the callback with connector locks held, a
    reference count is added to struct cn_callback_entry, the reference
    is taken when finding a matching callback entry on the device's queue_list
    and released after the callback handler has been invoked.

    Signed-off-by: Patrick McHardy
    Acked-by: Evgeniy Polyakov
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Daniel J Blueman reported a lockdep splat in trie_firstleaf(), caused by
    RTNL being not locked before a call to fib_table_flush()

    Reported-by: Daniel J Blueman
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Don't flap VCs when carrier state changes; higher-level protocols
    can detect loss of connectivity and act accordingly. This is more
    consistent with how other network interfaces work.

    We no longer use release_vccs() so we can delete it.

    release_vccs() was duplicated from net/atm/common.c; make the
    corresponding function exported, since other code duplicates it
    and could leverage it if it were public.

    Signed-off-by: Philip A. Prindeville
    Signed-off-by: David S. Miller

    Philip A. Prindeville
     
  • Omit pkt_hdr preamble when dumping transmitted packet as hex-dump;
    we can pull this up because the frame has already been sent, and
    dumping it is the last thing we do with it before freeing it.

    Also include the size, vpi, and vci in the debug as is done on
    receive.

    Use "port" consistently instead of "device" intermittently.

    Signed-off-by: Philip Prindeville
    Signed-off-by: David S. Miller

    Philip A. Prindeville
     
  • Use VPI.VCI notation consistently throughout the module. This is the
    one remaining place where the VCI is used before the VPI in any output.

    Signed-off-by: Philip Prindeville
    Signed-off-by: David S. Miller

    Philip A. Prindeville
     

30 Mar, 2011

24 commits

  • We leak in some error paths of drivers/net/atlx/atl2.c:atl2_set_eeprom().
    The memory allocated to 'eeprom_buff' is not freed when we return -EIO.
    This patch fixes that up and also removes a pointless explicit cast.

    Signed-off-by: Jesper Juhl
    Signed-off-by: David S. Miller

    Jesper Juhl
     
  • In case the device where is coming from the packet has TSO enabled,
    we should not check the mtu size value as this one could be bigger
    than the expected value.

    This is the case for the macvlan driver when the lower device has
    TSO enabled. The macvlan inherit this feature and forward the packets
    without fragmenting them. Then the packets go through dev_forward_skb
    and are dropped. This patch fix this by checking TSO is not enabled
    when we want to check the mtu size.

    Signed-off-by: Daniel Lezcano
    Acked-by: "Eric W. Biederman"
    Signed-off-by: David S. Miller

    Daniel Lezcano
     
  • This adds a driver for the CDC Ethernet part of this modem. The
    device's ID is blacklisted in cdc_ether.c and is white-listed in
    this new driver because of the quirks needed to make it useful.
    The modem's firmware exposes a CDC ACM port for modem control and a
    CDC Ethernet port for network data. The descriptors look fine but
    both ports actually are some sort of multiplexers requiring non-
    standard headers added/removed from every packet or they get
    ignored. All information is based on a usb traffic log from a
    Windows machine.

    On the Verizon 4G network I've seen speeds up to 1.1MB/s so far with
    this driver, a speed-o-meter site reports 16.2Mbps/10.5Mbps.
    Userspace scripts are required to talk to the CDC ACM port.

    Signed-off-by: Andrzej Zaborowski
    Signed-off-by: David S. Miller

    Andrzej Zaborowski
     
  • The function phy_attach_direct attaches the phy and calls phy_init_hw.
    phy_init_hw can fail, but the phy is still marked as attached. Successive
    calls to phy_attach_direct will fail because the phy is busy.

    [ 1.020000] eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=1:00, irq=-1)
    [ 1.030000] eth1: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=1:01, irq=-1)
    [ 2.050000] Sending DHCP requests .
    [ 3.020000] PHY: 1:00 - Link is Up - 100/Full
    [ 5.110000] ..... timed out!
    [ 87.660000] IP-Config: Reopening network devices...
    [ 88.190000] FEC: MDIO read timeout
    [ 88.190000] eth0: could not attach to PHY
    [ 88.190000] IP-Config: Failed to open eth0
    [ 88.210000] FEC: MDIO read timeout
    [ 88.210000] eth1: could not attach to PHY
    [ 88.210000] IP-Config: Failed to open eth1
    [ 88.220000] IP-Config: No network devices available.
    [ 88.220000] Freeing init memory: 6968K

    [...]

    starting network interfaces...
    ip: RTNETLINK answers: File exists
    [ 94.000000] net eth0: PHY already attached
    [ 94.010000] eth0: could not attach to PHY
    ip: SIOCSIFFLAGS: Device or resource busy

    This patch adds phy_detach to clean up if phy_init_hw fails.

    Signed-off-by: Marc Kleine-Budde
    Signed-off-by: David S. Miller

    Marc Kleine-Budde
     
  • "len = ntohs(ip6h->payload_len)" does not include the length of the ipv6
    header itself, which the rest of this function assumes, though.

    This leads to a length check less restrictive as it should be in the
    following line for one thing. For another, it very likely leads to an
    integer underrun when substracting the offset and therefore to a very
    high new value of 'len' due to its unsignedness. This will ultimately
    lead to the pskb_trim_rcsum() practically never being called, even in
    the cases where it should.

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

    Linus Lüssing
     
  • via-ircc has been passing a NULL pointer to DMA allocation functions,
    which is completely invalid and results in a BUG on PowerPC. Now
    that we always have the device pointer available, pass it in.

    Reference: http://bugs.debian.org/619450
    Reported-by: Andrew Buckeridge
    Signed-off-by: Ben Hutchings
    Tested-by: Andrew Buckeridge [against 2.6.32]
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • via-ircc still maintains its own array of device pointers in Linux 2.4
    style. Worse, it always uses index 0, so it will crash if there are
    multiple suitable devices in the system.

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

    Ben Hutchings
     
  • My commit 6d55cb91a0020ac0 (gre: fix hard header destination
    address checking) broke multicast.

    The reason is that ip_gre used to get ipgre_header() calls with
    zero destination if we have NOARP or multicast destination. Instead
    the actual target was decided at ipgre_tunnel_xmit() time based on
    per-protocol dissection.

    Instead of allowing the "abuse" of ->header() calls with invalid
    destination, this creates multicast mappings for ip_gre. This also
    fixes "ip neigh show nud noarp" to display the proper multicast
    mappings used by the gre device.

    Reported-by: Doug Kehn
    Signed-off-by: Timo Teräs
    Acked-by: Doug Kehn
    Signed-off-by: David S. Miller

    Timo Teräs
     
  • net/bridge/br_stp_if.c: In function ‘br_stp_recalculate_bridge_id’:
    net/bridge/br_stp_if.c:216:3: warning: ‘return’ with no value, in function returning non-void

    Signed-off-by: G.Balaji
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Balaji G
     
  • After commit a715dea3c8e9ef2771c534e05ee1d36f65987e64 ("net: Always
    allocate at least 16 skb frags regardless of page size"), the value
    of MAX_SKB_FRAGS can now take on either an "unsigned long" or an
    "int" value.

    This causes warnings like:

    net/packet/af_packet.c: In function ‘tpacket_fill_skb’:
    net/packet/af_packet.c:948: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘int’

    Fix by forcing the constant to be unsigned long, otherwise we have
    a situation where the type of a system wide constant is variable.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • If change_interface gets invoked during a firmware
    restart, it may crash; prevent that from happening
    by checking if ctx->vif is assigned.

    Additionally, in my initial commit I forgot to set
    the vif->p2p variable correctly, so fix that too.

    Cc: stable@kernel.org [2.6.38+]
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • Some clients seem to rely upon the reception of BlockAckReqs to flush
    their rx reorder buffer. In order to fix aggregation for these clients
    carl9170 should set IEEE80211_TX_STAT_AMPDU_NO_BACK to generate a
    BlockAckReq if the transmission of an AMPDU subframe fails.

    This fixes aggregation problems with Intel 5100 Windows STAs (and maybe
    others as well).

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

    Christian Lamparter
     
  • After new NetworkManager 0.8.996 changes, hardware scanning is causing
    microcode errors as reported here:
    https://bugzilla.redhat.com/show_bug.cgi?id=683571
    and sometimes kernel crashes:
    https://bugzilla.redhat.com/show_bug.cgi?id=688252

    Also with hw scan there are very bad performance on some systems
    as reported here:
    https://bugzilla.redhat.com/show_bug.cgi?id=671366

    Since Intel no longer supports 3945, there is no chance to get proper
    firmware fixes, we need workaround problems by disable hardware scanning
    by default.

    Signed-off-by: Stanislaw Gruszka
    Signed-off-by: John W. Linville

    Stanislaw Gruszka
     
  • taken from staging/rt2860
    0x0411,0x016f de37cd49b5a54facef174cf34496919857436e8f MelCo(Buffalo) WLI-UC-G301N
    0x050d,0x825b 12840c63b0679f7fab88ea1cc26b52db8b574ce7 Belkin F5D8055
    0x050d,0x935a 705059a670f3af2b37695e82de0ee58e75e656ed Belkin F6D4050 v1
    0x050d,0x935b 5d92fe3387d086fc2f10426fbdb6b86d6cce5a47 Belkin F6D4050 v2

    identifed from ralink driverss
    0x0930,0x0a07 RT35xx TOSHIBA 2010_1215_RT3572_Linux_STA_v2.5.0.0.DPO
    0x1d4d,0x0011 3072 Pegatron 2011_0107_RT3070_RT3370_Linux_STA_v2.5.0.1_DPO

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

    Xose Vazquez Perez
     
  • Software scanning can be used for workaround some performance problems,
    so do not deprecate it.

    Signed-off-by: Stanislaw Gruszka
    Acked-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Stanislaw Gruszka
     
  • Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (26 commits)
    mmc: SDHI should depend on SUPERH || ARCH_SHMOBILE
    mmc: tmio_mmc: Move some defines into a shared header
    mmc: tmio: support aggressive clock gating
    mmc: tmio: fix power-mode interpretation
    mmc: tmio: remove work-around for unmasked SDIO interrupts
    sh: fix SDHI IO address-range
    ARM: mach-shmobile: fix SDHI IO address-range
    mmc: tmio: only access registers above 0xff, if available
    mfd: remove now redundant sh_mobile_sdhi.h header
    sh: convert boards to use linux/mmc/sh_mobile_sdhi.h
    ARM: mach-shmobile: convert boards to use linux/mmc/sh_mobile_sdhi.h
    mmc: tmio: convert the SDHI MMC driver from MFD to a platform driver
    sh: ecovec: use the CONFIG_MMC_TMIO symbols instead of MFD
    mmc: tmio: split core functionality, DMA and MFD glue
    mmc: tmio: use PIO for short transfers
    mmc: tmio-mmc: Improve DMA stability on sh-mobile
    mmc: fix mmc_app_send_scr() for dma transfer
    mmc: sdhci-esdhc: enable esdhc on imx53
    mmc: sdhci-esdhc: use writel/readl as general APIs
    mmc: sdhci: add the abort CMDTYPE bits definition
    ...

    Linus Torvalds
     
  • * 'frv' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-frv:
    FRV: Use generic show_interrupts()
    FRV: Convert genirq namespace
    frv: Select GENERIC_HARDIRQS_NO_DEPRECATED
    frv: Convert cpu irq_chip to new functions
    frv: Convert mb93493 irq_chip to new functions
    frv: Convert mb93093 irq_chip to new function
    frv: Convert mb93091 irq_chip to new functions
    frv: Fix typo from __do_IRQ overhaul
    frv: Remove stale irq_chip.end
    FRV: Do some cleanups
    FRV: Missing node arg in alloc_thread_info_node() macro
    NOMMU: implement access_remote_vm
    NOMMU: support SMP dynamic percpu_alloc
    NOMMU: percpu should use is_vmalloc_addr().

    Linus Torvalds
     
  • * 'stable/bug-fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: Use new irq_move functions
    xen: Convert genirq namespace
    xen: fix p2m section mismatches
    xen/p2m: Allocate p2m tracking pages on override
    xen-gntdev: unlock on error path in gntdev_mmap()
    xen-gntdev: return -EFAULT on copy_to_user failure

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
    watchdog: softdog.c: enhancement to optionally invoke panic instead of reboot on timer expiry
    watchdog: fix nv_tco section mismatch
    watchdog: sp5100_tco.c: Check if firmware has set correct value in tcobase.
    watchdog: Convert release_resource to release_region/release_mem_region
    watchdog: s3c2410_wdt.c: Convert release_resource to release_region/release_mem_region

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
    amd64_edac: Fix potential memleak

    Linus Torvalds
     
  • …el/git/tip/linux-2.6-tip

    * 'irq-final-for-linus-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (111 commits)
    gpio: ab8500: Mark broken
    genirq: Remove move_*irq leftovers
    genirq: Remove compat code
    drivers: Final irq namespace conversion
    mn10300: Use generic show_interrupts()
    mn10300: Cleanup irq_desc access
    mn10300: Convert genirq namespace
    frv: Use generic show_interrupts()
    frv: Convert genirq namespace
    frv: Select GENERIC_HARDIRQS_NO_DEPRECATED
    frv: Convert cpu irq_chip to new functions
    frv: Convert mb93493 irq_chip to new functions
    frv: Convert mb93093 irq_chip to new function
    frv: Convert mb93091 irq_chip to new functions
    frv: Fix typo from __do_IRQ overhaul
    frv: Remove stale irq_chip.end
    m68k: Convert irq function namespace
    xen: Use new irq_move functions
    xen: Cleanup genirq namespace
    unicore32: Use generic show_interrupts()
    ...

    Linus Torvalds
     
  • This patch fixes information leakage to the userspace by initializing
    the data buffer to zero.

    Reported-by: Peter Huewe
    Signed-off-by: Peter Huewe
    Signed-off-by: Marcel Selhorst
    [ Also removed the silly "* sizeof(u8)". If that isn't 1, we have way
    deeper problems than a simple multiplication can fix. - Linus ]
    Signed-off-by: Linus Torvalds

    Peter Huewe
     
  • We check the pointers together but at least one of them could be invalid
    due to failed allocation. Since we cannot continue if either of the two
    allocations has failed, exit early by freeing them both.

    Cc: # 38.x
    Reported-by: Mauro Carvalho Chehab
    Signed-off-by: Borislav Petkov

    Borislav Petkov
     

29 Mar, 2011

5 commits

  • Fix the incorrect use of igrab() inside the i_lock in NFS and Ceph‥

    If we are already holding the i_lock, we have a reference to the
    inode so we can safely use ihold() to gain an extra reference. This
    avoids hangs due to lock recursion on the i_lock now that the
    inode_lock is gone and igrab() uses the i_lock itself.

    Signed-off-by: Dave Chinner
    Cc: Al Viro
    Cc: linux-fsdevel@vger.kernel.org
    Cc: Ryan Mallon
    Signed-off-by: Linus Torvalds

    Dave Chinner
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (30 commits)
    xfrm: Restrict extended sequence numbers to esp
    xfrm: Check for esn buffer len in xfrm_new_ae
    xfrm: Assign esn pointers when cloning a state
    xfrm: Move the test on replay window size into the replay check functions
    netdev: bfin_mac: document TE setting in RMII modes
    drivers net: Fix declaration ordering in inline functions.
    cxgb3: Apply interrupt coalescing settings to all queues
    net: Always allocate at least 16 skb frags regardless of page size
    ipv4: Don't ip_rt_put() an error pointer in RAW sockets.
    net: fix ethtool->set_flags not intended -EINVAL return value
    mlx4_en: Fix loss of promiscuity
    tg3: Fix inline keyword usage
    tg3: use and instead and
    net: use CHECKSUM_NONE instead of magic number
    Net / jme: Do not use legacy PCI power management
    myri10ge: small rx_done refactoring
    bridge: notify applications if address of bridge device changes
    ipv4: Fix IP timestamp option (IPOPT_TS_PRESPEC) handling in ip_options_echo()
    can: c_can: Fix tx_bytes accounting
    can: c_can_platform: fix irq check in probe
    ...

    Linus Torvalds
     
  • These functions take irq_data as an argument and avoid a redundant
    lookup in the sparse irq case.

    Signed-off-by: Thomas Gleixner
    Cc: Ian Campbell
    Cc: Jeremy Fitzhardinge
    Cc: Konrad Rzeszutek Wilk
    Signed-off-by: Konrad Rzeszutek Wilk

    Thomas Gleixner
     
  • Converted with coccinelle.

    Signed-off-by: Thomas Gleixner
    Acked-by: Ian Campbell
    Signed-off-by: Konrad Rzeszutek Wilk

    Thomas Gleixner
     
  • Fix section mismatch warnings:
    set_phys_range_identity() is called by __init xen_set_identity(),
    so also mark set_phys_range_identity() as __init.
    then:
    __early_alloc_p2m() is called set_phys_range_identity(), so also mark
    __early_alloc_p2m() as __init.

    WARNING: arch/x86/built-in.o(.text+0x7856): Section mismatch in reference from the function __early_alloc_p2m() to the function .init.text:extend_brk()
    The function __early_alloc_p2m() references
    the function __init extend_brk().
    This is often because __early_alloc_p2m lacks a __init
    annotation or the annotation of extend_brk is wrong.

    WARNING: arch/x86/built-in.o(.text+0x7967): Section mismatch in reference from the function set_phys_range_identity() to the function .init.text:extend_brk()
    The function set_phys_range_identity() references
    the function __init extend_brk().
    This is often because set_phys_range_identity lacks a __init
    annotation or the annotation of extend_brk is wrong.

    [v2: Per Stephen Hemming recommonedation made __early_alloc_p2m static]
    Signed-off-by: Randy Dunlap
    Signed-off-by: Konrad Rzeszutek Wilk

    Randy Dunlap