22 Jan, 2013

2 commits

  • This implements a socket release callback function to check
    if the socket cached route got invalid during the time
    we owned the socket. The function is used from udp, raw
    and ping sockets.

    Signed-off-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • The route lookup in ipv4_sk_update_pmtu() might return a route
    different from the route we cached at the socket. This is because
    standart routes are per cpu, so each cpu has it's own struct rtable.
    This means that we do not invalidate the socket cached route if the
    NET_RX_SOFTIRQ is not served by the same cpu that the sending socket
    uses. As a result, the cached route reused until we disconnect.

    With this patch we invalidate the socket cached route if possible.
    If the socket is owened by the user, we can't update the cached
    route directly. A followup patch will implement socket release
    callback functions for datagram sockets to handle this case.

    Reported-by: Yurij M. Plotnikov
    Signed-off-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Steffen Klassert
     

21 Jan, 2013

3 commits

  • commit 9ca1b22d6d2 (net: splice: avoid high order page splitting)
    forgot that skb->head could need a copy into several page frags.

    This could be the case for loopback traffic mostly.

    Also remove now useless skb argument from linear_to_page()
    and __splice_segment() prototypes.

    Signed-off-by: Eric Dumazet
    Cc: Willy Tarreau
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • splice() can handle pages of any order, but network code tries hard to
    split them in PAGE_SIZE units. Not quite successfully anyway, as
    __splice_segment() assumed poff < PAGE_SIZE. This is true for
    the skb->data part, not necessarily for the fragments.

    This patch removes this logic to give the pages as they are in the skb.

    Signed-off-by: Eric Dumazet
    Cc: Willy Tarreau
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • commit 563d34d057 (tcp: dont drop MTU reduction indications)
    added an error leading to incorrect accounting of
    LINUX_MIB_LOCKDROPPEDICMPS

    If socket is owned by the user, we want to increment
    this SNMP counter, unless the message is a
    (ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED) one.

    Reported-by: Maciej Żenczykowski
    Signed-off-by: Eric Dumazet
    Cc: Neal Cardwell
    Signed-off-by: Maciej Żenczykowski
    Acked-by: Neal Cardwell
    Signed-off-by: David S. Miller

    Eric Dumazet
     

20 Jan, 2013

1 commit


19 Jan, 2013

5 commits

  • The driver description files gives these names to the vendor specific
    functions on this modem:

    Diag VID_19D2&PID_0265&MI_00
    NMEA VID_19D2&PID_0265&MI_01
    AT cmd VID_19D2&PID_0265&MI_02
    Modem VID_19D2&PID_0265&MI_03
    Net VID_19D2&PID_0265&MI_04

    Signed-off-by: Bjørn Mork
    Signed-off-by: David S. Miller

    Bjørn Mork
     
  • The lines

    if (mlx4_is_mfunc(dev)) {
    nreq = 2;
    } else {

    which hard code the number of requested msi-x vectors under multi-function
    mode to two can be removed completely, since the firmware sets num_eqs and
    reserved_eqs appropriately Thus, the code line:

    nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs, nreq);

    is by itself sufficient and correct for all cases. Currently, for mfunc
    mode num_eqs = 32 and reserved_eqs = 28, hence four vectors will be enabled.

    This triples (one vector is used for the async events and commands EQ) the
    horse power provided for processing of incoming packets on netdev RSS scheme,
    IO initiators/targets commands processing flows, etc.

    Reviewed-by: Jack Morgenstein
    Signed-off-by: Amir Vadai
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • Commit 5b4c4d36860e "mlx4_en: Allow communication between functions on
    same host" introduced a regression under which a bridge acting as vSwitch
    whose uplink is an mlx4 Ethernet device become non-operative in native
    (non sriov) mode. This happens since broadcast ARP requests sent by VMs
    were loopback-ed by the HW and hence the bridge learned VM source MACs
    on both the VM and the uplink ports.

    The fix is to place the DMAC in the send WQE only under SRIOV/eSwitch
    configuration or when the device is in selftest.

    Reviewed-by: Or Gerlitz
    Signed-off-by: Yan Burman
    Signed-off-by: Amir Vadai
    Signed-off-by: David S. Miller

    Yan Burman
     
  • pmtu and redirect events are now handled in the protocols error handler,
    so add an error handler for icmp6 to do this. It is needed in the case
    when we have no socket context. Based on a patch by Duan Jiong.

    Reported-by: Duan Jiong
    Signed-off-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • The xgmac driver assumes 1 frame per descriptor. If a frame larger than
    the descriptor's buffer size is received, the frame will spill over into
    the next descriptor. So check for received frames that span more than one
    descriptor and discard them. This prevents a crash if we receive erroneous
    large packets.

    Signed-off-by: Rob Herring
    Cc: netdev@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: David S. Miller

    Rob Herring
     

18 Jan, 2013

6 commits

  • Jamie Parsons reported a problem recently, in which the re-initalization of an
    association (The duplicate init case), resulted in a loss of receive window
    space. He tracked down the root cause to sctp_outq_teardown, which discarded
    all the data on an outq during a re-initalization of the corresponding
    association, but never reset the outq->outstanding_data field to zero. I wrote,
    and he tested this fix, which does a proper full re-initalization of the outq,
    fixing this problem, and hopefully future proofing us from simmilar issues down
    the road.

    Signed-off-by: Neil Horman
    Reported-by: Jamie Parsons
    Tested-by: Jamie Parsons
    CC: Jamie Parsons
    CC: Vlad Yasevich
    CC: "David S. Miller"
    CC: netdev@vger.kernel.org
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Neil Horman
     
  • commit df8ef8f3aaa (macvlan: add FDB bridge ops and macvlan flags)
    forgot to update macvlan_get_size() after the addition of
    IFLA_MACVLAN_FLAGS

    Signed-off-by: Eric Dumazet
    Cc: John Fastabend
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Remove the code that always enables copper/fiber autoselect,
    ignoring the DIS_FC strapping pin. The default value for this
    register is autoselect on anyway, and if you explicitly disable
    autoselect via strapping you probably really don't want
    autoselect.

    Signed-off-by: Stef van Os
    Signed-off-by: David S. Miller

    Stef van Os
     
  • The code to print the FIFO size in tc574_config computes it as:

    8 << config & Ram_size

    which evaluates the '<
    Signed-off-by: David S. Miller

    Nickolai Zeldovich
     
  • John W. Linville says:

    ====================
    This batch of fixes is intended for 3.8...

    Included is a Bluetooth pull. Gustavo says:

    "A few fixes for 3.8. Five of them are just new devices ids addition.
    Apart from the that there is fix to a kernel memory leak to userspace from
    Anderson Lizardo, two interoperability fixes from Jaganath Kanakkassery and
    Szymon Janc. And a crash fix by me."

    Along with that, Amitkumar Karwar brings a pair of mwifiex fixes for
    problems related to handling of band information within the driver.
    These problems can lead to association failures.

    Sujith Manoharan fixes a memory leak in the ath9k_htc code (originally
    reported by Larry Finger).

    The big hero this round is Felix Fietkau. Felix gives us seven
    ath9k fixes, including a fix for a race condition, the removal of a
    double-free, and a fix for a deadlock, among others.

    These have all been in linux-next for at least a couple of days,
    with no complaints so far. Please let me know if there are problems!
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • …wireless into for-davem

    John W. Linville
     

17 Jan, 2013

7 commits

  • Routes with locked mtu should not use learned pmtu informations,
    so do not update the pmtu on these routes.

    Reported-by: Julian Anastasov
    Signed-off-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • The output route check was introduced with git commit 261663b0
    (ipv4: Don't use the cached pmtu informations for input routes)
    during times when we cached the pmtu informations on the
    inetpeer. Now the pmtu informations are back in the routes,
    so this check is obsolete. It also had some unwanted side effects,
    as reported by Timo Teras and Lukas Tribus.

    Signed-off-by: Steffen Klassert
    Acked-by: Timo Teräs
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • Commit 299b0767 (ipv6: Fix IPsec slowpath fragmentation problem)
    has introduced a error in the header length calculation that
    provokes corrupted packets when non-fragmentable extensions
    headers (Destination Option or Routing Header Type 2) are used.

    rt->rt6i_nfheader_len is the length of the non-fragmentable
    extension header, and it should be substracted to
    rt->dst.header_len, and not to exthdrlen, as it was done before
    commit 299b0767.

    This patch reverts to the original and correct behavior. It has
    been successfully tested with and without IPsec on packets
    that include non-fragmentable extensions headers.

    Signed-off-by: Romain Kuntz
    Acked-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Romain KUNTZ
     
  • The driver description files gives these names to the vendor specific
    functions on this modem:

    Diagnostics VID_2357&PID_0201&MI_00
    NMEA VID_2357&PID_0201&MI_01
    Modem VID_2357&PID_0201&MI_03
    Networkcard VID_2357&PID_0201&MI_04

    The "Networkcard" function has been verified to support these QMI
    services:
    ctl (1.3)
    wds (1.3)
    dms (1.2)
    nas (1.0)

    Reported-by: Thomas Schäfer
    Signed-off-by: Bjørn Mork
    Signed-off-by: David S. Miller

    Bjørn Mork
     
  • commit 24b1042c4eb2 ("usbnet: dm9601: apply introduced usb command
    APIs") removes the distiction between DM_WRITE_REG and DM_WRITE_REGS
    command. The distiction is reintroduced to the driver so that the
    functionality of the driver remains same.

    CC: Ming Lei
    Signed-off-by: Tushar Behera
    Signed-off-by: David S. Miller

    Tushar Behera
     
  • The coalesce parameters was set only on the first queue, which caused
    interrupt rates to be larger on all the other queues.

    This patch allows interrupt rates to be reduced for certain workloads
    and colaesce parameters by 41%.

    Signed-off-by: Thadeu Lima de Souza Cascardo
    Cc: steved@us.ibm.com
    Cc: toml@us.ibm.com
    Signed-off-by: David S. Miller

    Thadeu Lima de Souza Cascardo
     
  • I changed my email because the vyatta.com mail server is now
    redirected to brocade.com; and the Brocade mail system
    is not friendly to Linux desktop users.

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

    Stephen Hemminger
     

16 Jan, 2013

2 commits


15 Jan, 2013

14 commits

  • TG3_PHY_AUXCTL_SMDSP_ENABLE/DISABLE macros do a blind write to the phy
    auxiliary control register and overwrite the EXT_PKT_LEN (bit 14) resulting
    in intermittent crc errors on jumbo frames with some link partners. Change
    the code to do a read/modify/write.

    Signed-off-by: Nithin Nayak Sujir
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Nithin Nayak Sujir
     
  • When netconsole is enabled, logging messages generated during tg3_open
    can result in a null pointer dereference for the uninitialized tg3
    status block. Use the irq_sync flag to disable polling in the early
    stages. irq_sync is cleared when the driver is enabling interrupts after
    all initialization is completed.

    Signed-off-by: Nithin Nayak Sujir
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Nithin Nayak Sujir
     
  • Pablo Neira Ayuso says:

    ====================
    The following patchset contains netfilter fixes for 3.8-rc3,
    they are:

    * fix possible BUG_ON if several netns are in use and the nf_conntrack
    module is removed, initial patch from Gao feng, final patch from myself.

    * fix unset return value if conntrack zone are disabled at
    compile-time, reported by Borislav Petkov, fix from myself.

    * fix display error message via dmesg for arp_tables, from Jan Engelhardt.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This patch corrects some problems with LSM/SELinux that were introduced
    with the multiqueue patchset. The problem stems from the fact that the
    multiqueue work changed the relationship between the tun device and its
    associated socket; before the socket persisted for the life of the
    device, however after the multiqueue changes the socket only persisted
    for the life of the userspace connection (fd open). For non-persistent
    devices this is not an issue, but for persistent devices this can cause
    the tun device to lose its SELinux label.

    We correct this problem by adding an opaque LSM security blob to the
    tun device struct which allows us to have the LSM security state, e.g.
    SELinux labeling information, persist for the lifetime of the tun
    device. In the process we tweak the LSM hooks to work with this new
    approach to TUN device/socket labeling and introduce a new LSM hook,
    security_tun_dev_attach_queue(), to approve requests to attach to a
    TUN queue via TUNSETQUEUE.

    The SELinux code has been adjusted to match the new LSM hooks, the
    other LSMs do not make use of the LSM TUN controls. This patch makes
    use of the recently added "tun_socket:attach_queue" permission to
    restrict access to the TUNSETQUEUE operation. On older SELinux
    policies which do not define the "tun_socket:attach_queue" permission
    the access control decision for TUNSETQUEUE will be handled according
    to the SELinux policy's unknown permission setting.

    Signed-off-by: Paul Moore
    Acked-by: Eric Paris
    Tested-by: Jason Wang
    Signed-off-by: David S. Miller

    Paul Moore
     
  • Add a new permission to align with the new TUN multiqueue support,
    "tun_socket:attach_queue".

    The corresponding SELinux reference policy patch is show below:

    diff --git a/policy/flask/access_vectors b/policy/flask/access_vectors
    index 28802c5..a0664a1 100644
    --- a/policy/flask/access_vectors
    +++ b/policy/flask/access_vectors
    @@ -827,6 +827,9 @@ class kernel_service

    class tun_socket
    inherits socket
    +{
    + attach_queue
    +}

    class x_pointer
    inherits x_device

    Signed-off-by: Paul Moore
    Acked-by: Eric Paris
    Tested-by: Jason Wang
    Signed-off-by: David S. Miller

    Paul Moore
     
  • spin_is_locked() on a non !SMP build is kind of useless.

    BUG_ON(!spin_is_locked(xx)) is guaranteed to crash.

    Just remove this check in reqsk_fastopen_remove() as
    the callers do hold the socket lock.

    Reported-by: Ketan Kulkarni
    Signed-off-by: Eric Dumazet
    Cc: Jerry Chu
    Cc: Yuchung Cheng
    Cc: Dave Taht
    Acked-by: H.K. Jerry Chu
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Pull devicetree fixes from Rob Herring:
    "Two fixes to prevent unconditional re-compile of dts files on arm and
    arm64."

    * tag 'dt-fixes-for-3.8' of git://sources.calxeda.com/kernel/linux:
    ARM: dts: prevent *.dtb from always being rebuilt
    arm64: dts: prevent *.dtb from always being rebuilt

    Linus Torvalds
     
  • Andrew Morton pointed this out a month ago, and then I completely forgot
    about it.

    If we read a partial last page of a block device, we will zero out the
    end of the page, but since that page can then be mapped into user space,
    we should also make sure to flush the cache on architectures that have
    virtual caches. We have the flush_dcache_page() function for this, so
    use it.

    Now, in practice this really never matters, because nobody sane uses
    virtual caches to begin with, and they largely exist on old broken RISC
    arhitectures.

    And even if you did run on one of those obsolete CPU's, the whole "mmap
    and access the last partial page of a block device" behavior probably
    doesn't actually exist. The normal IO functions (read/write) will never
    see the zeroed-out part of the page that migth not be coherent in the
    cache, because they honor the size of the device.

    So I'm marking this for stable (3.7 only), but I'm not sure anybody will
    ever care.

    Pointed-out-by: Andrew Morton
    Cc: stable@vger.kernel.org # 3.7
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Fixes a reported CPU soft lockup where the tasklet tries to acquire the
    lock and blocks while ath_prepare_reset (holding the lock) waits for it
    to complete.

    Cc: stable@vger.kernel.org
    Reported-by: Robert Shade
    Signed-off-by: Felix Fietkau
    Signed-off-by: John W. Linville

    Felix Fietkau
     
  • The commit "ath9k: fix rx flush handling" added a deadlock that happens
    because ath_rx_tasklet is called in a section that has already taken the
    rx buffer lock.

    It seems that the only purpose of the rxbuflock was a band-aid fix to the
    reset vs rx tasklet race, which has been properly fixed in the commit
    "ath9k: add a better fix for the rx tasklet vs rx flush race".

    Now that the fix is in, we can safely remove the lock to avoid such issues.

    Cc: stable@vger.kernel.org
    Reported-by: Sujith Manoharan
    Signed-off-by: Felix Fietkau
    Signed-off-by: John W. Linville

    Felix Fietkau
     
  • Pull sound fixes from Takashi Iwai:
    "Most of commits found here are for ASoC device specific fixes,
    arizona, cs4271, wm5102, wm2200, etc, in addition to a couple of
    memory leak fixes in ASoC core.

    Other than that, regression fixes in HD-audio and USB-audio, and a fix
    for new Realtek codecs."

    * tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (30 commits)
    ALSA: usb-audio: Fix NULL dereference by access to non-existing substream
    ALSA: hda - Add support of new codec ALC284
    ALSA: usb-audio: Make ebox44_table static
    ALSA: hdspm - Fix wordclock status on AES32
    Revert "ALSA: hda - Shut up pins at power-saving mode with Conexnat codecs"
    ALSA: hda - Disable runtime D3 for Intel CPT & co
    ALSA: pxa27x: fix ac97 warm reset
    ALSA: pxa27x: fix ac97 cold reset
    ASoC: wm_adsp: Ensure that block writes are from DMA aligned addresses
    ASoC: wm2000: Fix sense of speech clarity enable
    ASoC: wm5100: Remove DSP B and left justified formats
    ASoC: arizona: Remove DSP B and left justified AIF modes
    ASoC: wm2200: Remove DSP B and left justified AIF modes
    ASoC: wm5102: Improve speaker enable performance
    ASoC: core: fix the memory leak in case of remove_aux_dev()
    ASoC: core: fix the memory leak in case of device_add() failure
    ASoC: cs42l52: Catch no-match case in cs42l52_get_clk
    ASoC: lm49453: Update lm49453_reg_defs values as per LM49453 HW revision-B
    ASoC: lm49453: Fix adc, mic and sidetone volume ranges
    ASoC: arizona: Correct FLL source definitions
    ...

    Linus Torvalds
     
  • Pull staging fixes from Greg Kroah-Hartman:
    "Here are a number of small fixes to staging drivers for your 3.8-rc3
    tree.

    Well, the omapdrm fixes aren't really "small" but they were waiting on
    a number of other drm patches to go in through the drm tree, and got
    delayed by my vacation over the holidays. They are totally
    self-contained, everyone involved have acked them, and they fix issues
    that people have been having with the driver.

    Other than that one, it's a bunch of tiny bugfixes for a number of
    reported issues.

    Signed-off-by: Greg Kroah-Hartman "

    * tag 'staging-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (36 commits)
    staging: zram: fix invalid memory references during disk write
    staging: tidspbridge: use prepare/unprepare on dsp clocks
    staging: tidspbridge: Fix build breakage due to splitting CM functions.
    staging: comedi: comedi_test: fix race when cancelling command
    staging: comedi: Kconfig: COMEDI_NI_AT_A2150 should select COMEDI_FC
    staging: comedi: prevent auto-unconfig of manually configured devices
    staging: comedi: fix minimum AO period for NI 625x and NI 628x
    staging: vme_pio2: fix oops on module unloading
    staging: speakup: avoid out-of-range access in synth_add()
    staging: speakup: avoid out-of-range access in synth_init()
    staging: rtl8192e: Fix failure to check pci_map_single()
    staging: rtl8187se: Fix failure to check pci_map_single()
    staging: drm/imx: fix double free bug in error path
    staging: drm/imx: several bug fixes
    staging: drm/imx: check return value of ipu_reset()
    staging: drm/omap: fix flags in dma buf exporting
    staging: drm/omap: use omapdss low level API
    staging/fwserial: Update TODO file per reviewer comments
    staging/fwserial: Limit tx/rx to 1394-2008 spec maximum
    staging/fwserial: Refine Kconfig help text
    ...

    Linus Torvalds
     
  • Pull USB fixes from Greg Kroah-Hartman:
    "Here are a bunch of USB fixes for your 3.8-rc3 tree. They all either
    fix problems that have been reported (like the xhci/hub changes) or
    add new device ids to existing drivers.

    Signed-off-by: Greg Kroah-Hartman "

    * tag 'usb-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (39 commits)
    usb: ftdi_sio: Crucible Technologies COMET Caller ID - pid added
    usb: host: ohci-tmio: fix compile warning
    USB: Add device quirk for Microsoft VX700 webcam
    USB: ehci-fsl: fix regression on mpc5121e
    usb: chipidea: Allow disabling streaming not only in udc mode
    USB: fsl-mph-dr-of: fix regression on mpc5121e
    USB: select USB_ARCH_HAS_EHCI for MXS
    USB: hub: handle claim of enabled remote wakeup after reset
    USB: cdc-acm: Add support for "PSC Scanning, Magellan 800i"
    USB: option: add Nexpring NP10T terminal id
    USB: option: add Telekom Speedstick LTE II
    USB: option: blacklist network interface on ZTE MF880
    usb: imx21-hcd: Include missing linux/module.h
    USB: option: Add new MEDIATEK PID support
    USB: ehci: make debug port in-use detection functional again
    USB: usbtest: fix test number in log message
    xhci: Avoid "dead ports", add roothub port polling.
    USB: Handle warm reset failure on empty port.
    USB: Ignore port state until reset completes.
    USB: Increase reset timeout.
    ...

    Linus Torvalds
     
  • Pull driver core fixes from Greg Kroah-Hartman:
    "Here are two patches for 3.8-rc3.

    One removes the __dev* defines from init.h now that all usages of it
    are gone from your tree. The other fix is for debugfs's paramater
    that was using the wrong base for the option.

    Signed-off-by: Greg Kroah-Hartman "

    * tag 'driver-core-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    debugfs: convert gid= argument from decimal, not octal
    Remove __dev* markings from init.h

    Linus Torvalds