06 Sep, 2019

4 commits


05 Sep, 2019

2 commits

  • Pull NFS client bugfix from Trond Myklebust:
    "Regression fix inode fileid checks in attribute revalidation code"

    * tag 'nfs-for-5.3-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
    NFS: Fix inode fileid checks in attribute revalidation code

    Linus Torvalds
     
  • Thadeu Lima de Souza Cascardo reported that 'chrt' broke on recent kernels:

    $ chrt -p $$
    chrt: failed to get pid 26306's policy: Argument list too long

    and he has root-caused the bug to the following commit increasing sched_attr
    size and breaking sched_read_attr() into returning -EFBIG:

    a509a7cd7974 ("sched/uclamp: Extend sched_setattr() to support utilization clamping")

    The other, bigger bug is that the whole sched_getattr() and sched_read_attr()
    logic of checking non-zero bits in new ABI components is arguably broken,
    and pretty much any extension of the ABI will spuriously break the ABI.
    That's way too fragile.

    Instead implement the perf syscall's extensible ABI instead, which we
    already implement on the sched_setattr() side:

    - if user-attributes have the same size as kernel attributes then the
    logic is unchanged.

    - if user-attributes are larger than the kernel knows about then simply
    skip the extra bits, but set attr->size to the (smaller) kernel size
    so that tooling can (in principle) handle older kernel as well.

    - if user-attributes are smaller than the kernel knows about then just
    copy whatever user-space can accept.

    Also clean up the whole logic:

    - Simplify the code flow - there's no need for 'ret' for example.

    - Standardize on 'kattr/uattr' and 'ksize/usize' naming to make sure we
    always know which side we are dealing with.

    - Why is it called 'read' when what it does is to copy to user? This
    code is so far away from VFS read() semantics that the naming is
    actively confusing. Name it sched_attr_copy_to_user() instead, which
    mirrors other copy_to_user() functionality.

    - Move the attr->size assignment from the head of sched_getattr() to the
    sched_attr_copy_to_user() function. Nothing else within the kernel
    should care about the size of the structure.

    With these fixes the sched_getattr() syscall now nicely supports an
    extensible ABI in both a forward and backward compatible fashion, and
    will also fix the chrt bug.

    As an added bonus the bogus -EFBIG return is removed as well, which as
    Thadeu noted should have been -E2BIG to begin with.

    Reported-by: Thadeu Lima de Souza Cascardo
    Tested-by: Dietmar Eggemann
    Tested-by: Thadeu Lima de Souza Cascardo
    Acked-by: Thadeu Lima de Souza Cascardo
    Cc: Arnaldo Carvalho de Melo
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Patrick Bellasi
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Fixes: a509a7cd7974 ("sched/uclamp: Extend sched_setattr() to support utilization clamping")
    Link: https://lkml.kernel.org/r/20190904075532.GA26751@gmail.com
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

04 Sep, 2019

1 commit

  • This ThinkCentre machine has a new realtek codec alc222, it is not
    in the support list, we add it in the realtek.c then this machine
    can apply FIXUPs for the realtek codec.

    And this machine has two front mics which can't be handled
    by PA so far, it uses the pin 0x18 and 0x19 as the front mics, as
    a result the existing FIXUP ALC294_FIXUP_LENOVO_MIC_LOCATION doesn't
    work on this machine. Fortunately another FIXUP
    ALC283_FIXUP_HEADSET_MIC also can change the location for one of the
    two mics on this machine.

    Link: https://lore.kernel.org/r/20190904055327.9883-1-hui.wang@canonical.com
    Signed-off-by: Hui Wang
    Cc:
    Signed-off-by: Takashi Iwai

    Hui Wang
     

03 Sep, 2019

7 commits

  • do_sched_cfs_period_timer() will refill cfs_b runtime and call
    distribute_cfs_runtime to unthrottle cfs_rq, sometimes cfs_b->runtime
    will allocate all quota to one cfs_rq incorrectly, then other cfs_rqs
    attached to this cfs_b can't get runtime and will be throttled.

    We find that one throttled cfs_rq has non-negative
    cfs_rq->runtime_remaining and cause an unexpetced cast from s64 to u64
    in snippet:

    distribute_cfs_runtime() {
    runtime = -cfs_rq->runtime_remaining + 1;
    }

    The runtime here will change to a large number and consume all
    cfs_b->runtime in this cfs_b period.

    According to Ben Segall, the throttled cfs_rq can have
    account_cfs_rq_runtime called on it because it is throttled before
    idle_balance, and the idle_balance calls update_rq_clock to add time
    that is accounted to the task.

    This commit prevents cfs_rq to be assgined new runtime if it has been
    throttled until that distribute_cfs_runtime is called.

    Signed-off-by: Liangyan
    Signed-off-by: Peter Zijlstra (Intel)
    Reviewed-by: Valentin Schneider
    Reviewed-by: Ben Segall
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: shanpeic@linux.alibaba.com
    Cc: stable@vger.kernel.org
    Cc: xlpang@linux.alibaba.com
    Fixes: d3d9dc330236 ("sched: Throttle entities exceeding their allowed bandwidth")
    Link: https://lkml.kernel.org/r/20190826121633.6538-1-liangyan.peng@linux.alibaba.com
    Signed-off-by: Ingo Molnar

    Liangyan
     
  • Original pin node values of ASUS UX431FL with ALC294:

    0x12 0xb7a60140
    0x13 0x40000000
    0x14 0x90170110
    0x15 0x411111f0
    0x16 0x411111f0
    0x17 0x90170111
    0x18 0x411111f0
    0x19 0x411111f0
    0x1a 0x411111f0
    0x1b 0x411111f0
    0x1d 0x4066852d
    0x1e 0x411111f0
    0x1f 0x411111f0
    0x21 0x04211020

    1. Has duplicated internal speakers (0x14 & 0x17) which makes the output
    route become confused. So, the output volume cannot be changed by
    setting.
    2. Misses the headset mic pin node.

    This patch disables the confusing speaker (NID 0x14) and enables the
    headset mic (NID 0x19).

    Link: https://lore.kernel.org/r/20190902100054.6941-1-jian-hong@endlessm.com
    Signed-off-by: Jian-Hong Pan
    Cc:
    Signed-off-by: Takashi Iwai

    Jian-Hong Pan
     
  • When the 'start' parameter is >= 0xFF000000 on 32-bit
    systems, or >= 0xFFFFFFFF'FF000000 on 64-bit systems,
    fill_gva_list() gets into an infinite loop.

    With such inputs, 'cur' overflows after adding HV_TLB_FLUSH_UNIT
    and always compares as less than end. Memory is filled with
    guest virtual addresses until the system crashes.

    Fix this by never incrementing 'cur' to be larger than 'end'.

    Reported-by: Jong Hyun Park
    Signed-off-by: Tianyu Lan
    Reviewed-by: Michael Kelley
    Cc: Borislav Petkov
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Fixes: 2ffd9e33ce4a ("x86/hyper-v: Use hypercall for remote TLB flush")
    Signed-off-by: Ingo Molnar

    Tianyu Lan
     
  • We want to throw out the attrbute if it refers to the mounted on fileid,
    and not the real fileid. However we do not want to block cache consistency
    updates from NFSv4 writes.

    Reported-by: Murphy Zhou
    Fixes: 7e10cc25bfa0 ("NFS: Don't refresh attributes with mounted-on-file...")
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Linus Torvalds
     
  • Pull char/misc driver fixes from Greg KH:
    "Here are some small char and misc driver fixes for reported issues for
    5.3-rc7

    Also included in here is the documentation for how we are handling
    hardware issues under embargo that everyone has finally agreed on, as
    well as a MAINTAINERS update for the suckers who agreed to handle the
    LICENSES/ files.

    All of these have been in linux-next last week with no reported
    issues"

    * tag 'char-misc-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    fsi: scom: Don't abort operations for minor errors
    vmw_balloon: Fix offline page marking with compaction
    VMCI: Release resource if the work is already queued
    Documentation/process: Embargoed hardware security issues
    lkdtm/bugs: fix build error in lkdtm_EXHAUST_STACK
    mei: me: add Tiger Lake point LP device ID
    intel_th: pci: Add Tiger Lake support
    intel_th: pci: Add support for another Lewisburg PCH
    stm class: Fix a double free of stm_source_device
    MAINTAINERS: add entry for LICENSES and SPDX stuff
    fpga: altera-ps-spi: Fix getting of optional confd gpio

    Linus Torvalds
     
  • Pull USB fixes from Greg KH:
    "Here are some small USB fixes that have been in linux-next this past
    week for 5.3-rc7

    They fix the usual xhci, syzbot reports, and other small issues that
    have come up last week.

    All have been in linux-next with no reported issues"

    * tag 'usb-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
    USB: cdc-wdm: fix race between write and disconnect due to flag abuse
    usb: host: xhci: rcar: Fix typo in compatible string matching
    usb: host: xhci-tegra: Set DMA mask correctly
    USB: storage: ums-realtek: Whitelist auto-delink support
    USB: storage: ums-realtek: Update module parameter description for auto_delink_en
    usb: host: ohci: fix a race condition between shutdown and irq
    usb: hcd: use managed device resources
    typec: tcpm: fix a typo in the comparison of pdo_max_voltage
    usb-storage: Add new JMS567 revision to unusual_devs
    usb: chipidea: udc: don't do hardware access if gadget has stopped
    usbtmc: more sanity checking for packet size
    usb: udc: lpc32xx: silence fall-through warning

    Linus Torvalds
     

02 Sep, 2019

8 commits

  • HP Pavilion 15 (AMD Ryzen-based model) with 103c:84e7 needs the same
    quirk like HP Envy/Spectre x360 for enabling the mute LED over Mic3 pin.

    [ rearranged in the SSID number order by tiwai ]

    Signed-off-by: Sam Bazley
    Cc:
    Signed-off-by: Takashi Iwai

    Sam Bazley
     
  • Identical to __put_user(); the __get_user() argument evalution will too
    leak UBSAN crud into the __uaccess_begin() / __uaccess_end() region.
    While uncommon this was observed to happen for:

    drivers/xen/gntdev.c: if (__get_user(old_status, batch->status[i]))

    where UBSAN added array bound checking.

    This complements commit:

    6ae865615fc4 ("x86/uaccess: Dont leak the AC flag into __put_user() argument evaluation")

    Tested-by Sedat Dilek
    Reported-by: Randy Dunlap
    Signed-off-by: Peter Zijlstra (Intel)
    Reviewed-by: Josh Poimboeuf
    Reviewed-by: Thomas Gleixner
    Cc: broonie@kernel.org
    Cc: sfr@canb.auug.org.au
    Cc: akpm@linux-foundation.org
    Cc: Randy Dunlap
    Cc: mhocko@suse.cz
    Cc: Josh Poimboeuf
    Link: https://lkml.kernel.org/r/20190829082445.GM2369@hirez.programming.kicks-ass.net

    Peter Zijlstra
     
  • Commit

    a90118c445cc ("x86/boot: Save fields explicitly, zero out everything else")

    now zeroes the secure boot setting information (enabled/disabled/...)
    passed by the boot loader or by the kernel's EFI handover mechanism.

    The problem manifests itself with signed kernels using the EFI handoff
    protocol with grub and the kernel loses the information whether secure
    boot is enabled in the firmware, i.e., the log message "Secure boot
    enabled" becomes "Secure boot could not be determined".

    efi_main() arch/x86/boot/compressed/eboot.c sets this field early but it
    is subsequently zeroed by the above referenced commit.

    Include boot_params.secure_boot in the preserve field list.

    [ bp: restructure commit message and massage. ]

    Fixes: a90118c445cc ("x86/boot: Save fields explicitly, zero out everything else")
    Signed-off-by: John S. Gruber
    Signed-off-by: Borislav Petkov
    Reviewed-by: John Hubbard
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Juergen Gross
    Cc: Mark Brown
    Cc: stable
    Cc: Thomas Gleixner
    Cc: x86-ml
    Link: https://lkml.kernel.org/r/CAPotdmSPExAuQcy9iAHqX3js_fc4mMLQOTr5RBGvizyCOPcTQQ@mail.gmail.com

    John S. Gruber
     
  • Pull networking fixes from David Miller:

    1) Fix some length checks during OGM processing in batman-adv, from
    Sven Eckelmann.

    2) Fix regression that caused netfilter conntrack sysctls to not be
    per-netns any more. From Florian Westphal.

    3) Use after free in netpoll, from Feng Sun.

    4) Guard destruction of pfifo_fast per-cpu qdisc stats with
    qdisc_is_percpu_stats(), from Davide Caratti. Similar bug is fixed
    in pfifo_fast_enqueue().

    5) Fix memory leak in mld_del_delrec(), from Eric Dumazet.

    6) Handle neigh events on internal ports correctly in nfp, from John
    Hurley.

    7) Clear SKB timestamp in NF flow table code so that it does not
    confuse fq scheduler. From Florian Westphal.

    8) taprio destroy can crash if it is invoked in a failure path of
    taprio_init(), because the list head isn't setup properly yet and
    the list del is unconditional. Perform the list add earlier to
    address this. From Vladimir Oltean.

    9) Make sure to reapply vlan filters on device up, in aquantia driver.
    From Dmitry Bogdanov.

    10) sgiseeq driver releases DMA memory using free_page() instead of
    dma_free_attrs(). From Christophe JAILLET.

    * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (58 commits)
    net: seeq: Fix the function used to release some memory in an error handling path
    enetc: Add missing call to 'pci_free_irq_vectors()' in probe and remove functions
    net: bcmgenet: use ethtool_op_get_ts_info()
    tc-testing: don't hardcode 'ip' in nsPlugin.py
    net: dsa: microchip: add KSZ8563 compatibility string
    dt-bindings: net: dsa: document additional Microchip KSZ8563 switch
    net: aquantia: fix out of memory condition on rx side
    net: aquantia: linkstate irq should be oneshot
    net: aquantia: reapply vlan filters on up
    net: aquantia: fix limit of vlan filters
    net: aquantia: fix removal of vlan 0
    net/sched: cbs: Set default link speed to 10 Mbps in cbs_set_port_rate
    taprio: Set default link speed to 10 Mbps in taprio_set_picos_per_byte
    taprio: Fix kernel panic in taprio_destroy
    net: dsa: microchip: fill regmap_config name
    rxrpc: Fix lack of conn cleanup when local endpoint is cleaned up [ver #2]
    net: stmmac: dwmac-rk: Don't fail if phy regulator is absent
    amd-xgbe: Fix error path in xgbe_mod_init()
    netfilter: nft_meta_bridge: Fix get NFT_META_BRI_IIFVPROTO in network byteorder
    mac80211: Correctly set noencrypt for PAE frames
    ...

    Linus Torvalds
     
  • In commit 99cd149efe82 ("sgiseeq: replace use of dma_cache_wback_inv"),
    a call to 'get_zeroed_page()' has been turned into a call to
    'dma_alloc_coherent()'. Only the remove function has been updated to turn
    the corresponding 'free_page()' into 'dma_free_attrs()'.
    The error hndling path of the probe function has not been updated.

    Fix it now.

    Rename the corresponding label to something more in line.

    Fixes: 99cd149efe82 ("sgiseeq: replace use of dma_cache_wback_inv")
    Signed-off-by: Christophe JAILLET
    Reviewed-by: Thomas Bogendoerfer
    Signed-off-by: David S. Miller

    Christophe JAILLET
     
  • Pull x86 fixes from Thomas Gleixner:
    "A set of fixes for x86:

    - Fix the bogus detection of 32bit user mode for uretprobes which
    caused corruption of the user return address resulting in
    application crashes. In the uprobes handler in_ia32_syscall() is
    obviously always returning false on a 64bit kernel. Use
    user_64bit_mode() instead which works correctly.

    - Prevent large page splitting when ftrace flips RW/RO on the kernel
    text which caused iTLB performance issues. Ftrace wants to be
    converted to text_poke() which avoids the problem, but for now
    allow large page preservation in the static protections check when
    the change request spawns a full large page.

    - Prevent arch_dynirq_lower_bound() from returning 0 when the IOAPIC
    is configured via device tree. In the device tree case the GSI 1:1
    mapping is meaningless therefore the lower bound which protects the
    GSI range on ACPI machines is irrelevant. Return the lower bound
    which the core hands to the function instead of blindly returning 0
    which causes the core to allocate the invalid virtual interupt
    number 0 which in turn prevents all drivers from allocating and
    requesting an interrupt.

    - Remove the bogus initialization of LDR and DFR in the 32bit bigsmp
    APIC driver. That uses physical destination mode where LDR/DFR are
    ignored, but the initialization and the missing clear of LDR caused
    the APIC to be left in a inconsistent state on kexec/reboot.

    - Clear LDR when clearing the APIC registers so the APIC is in a well
    defined state.

    - Initialize variables proper in the find_trampoline_placement()
    code.

    - Silence GCC( build warning for the real mode part of the build"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/mm/cpa: Prevent large page split when ftrace flips RW on kernel text
    x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning
    x86/boot/compressed/64: Fix missing initialization in find_trampoline_placement()
    x86/apic: Include the LDR when clearing out APIC registers
    x86/apic: Do not initialize LDR and DFR for bigsmp
    uprobes/x86: Fix detection of 32-bit user mode
    x86/apic: Fix arch_dynirq_lower_bound() bug for DT enabled machines

    Linus Torvalds
     
  • Pull perf fixes from Thomas Gleixner:
    "Two fixes for perf x86 hardware implementations:

    - Restrict the period on Nehalem machines to prevent perf from
    hogging the CPU

    - Prevent the AMD IBS driver from overwriting the hardwre controlled
    and pre-seeded reserved bits (0-6) in the count register which
    caused a sample bias for dispatched micro-ops"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86/amd/ibs: Fix sample bias for dispatched micro-ops
    perf/x86/intel: Restrict period on Nehalem

    Linus Torvalds
     
  • Pull turbostat updates from Len Brown:
    "User-space turbostat (and x86_energy_perf_policy) patches.

    They are primarily bug fixes from users"

    * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
    tools/power turbostat: update version number
    tools/power turbostat: Add support for Hygon Fam 18h (Dhyana) RAPL
    tools/power turbostat: Fix caller parameter of get_tdp_amd()
    tools/power turbostat: Fix CPU%C1 display value
    tools/power turbostat: do not enforce 1ms
    tools/power turbostat: read from pipes too
    tools/power turbostat: Add Ice Lake NNPI support
    tools/power turbostat: rename has_hsw_msrs()
    tools/power turbostat: Fix Haswell Core systems
    tools/power turbostat: add Jacobsville support
    tools/power turbostat: fix buffer overrun
    tools/power turbostat: fix file descriptor leaks
    tools/power turbostat: fix leak of file descriptor on error return path
    tools/power turbostat: Make interval calculation per thread to reduce jitter
    tools/power turbostat: remove duplicate pc10 column
    tools/power x86_energy_perf_policy: Fix argument parsing
    tools/power: Fix typo in man page
    tools/power/x86: Enable compiler optimisations and Fortify by default
    tools/power x86_energy_perf_policy: Fix "uninitialized variable" warnings at -O2

    Linus Torvalds
     

01 Sep, 2019

18 commits

  • Call to 'pci_free_irq_vectors()' are missing both in the error handling
    path of the probe function, and in the remove function.
    Add them.

    Fixes: 19971f5ea0ab ("enetc: add PTP clock driver")
    Signed-off-by: Christophe JAILLET
    Signed-off-by: David S. Miller

    Christophe JAILLET
     
  • This change enables the use of SW timestamping on the Raspberry Pi 4.

    bcmgenet's transmit function bcmgenet_xmit() implements software
    timestamping. However the SOF_TIMESTAMPING_TX_SOFTWARE capability was
    missing and only SOF_TIMESTAMPING_RX_SOFTWARE was announced. By using
    ethtool_ops bcmgenet_ethtool_ops() as get_ts_info(), the
    SOF_TIMESTAMPING_TX_SOFTWARE capability is announced.

    Similar to commit a8f5cb9e7991 ("smsc95xx: use ethtool_op_get_ts_info()")

    Signed-off-by: Ryan M. Collins
    Acked-by: Florian Fainelli
    Acked-by: Doug Berger
    Signed-off-by: David S. Miller

    Ryan M. Collins
     
  • the following tdc test fails on Fedora:

    # ./tdc.py -e 2638
    -- ns/SubPlugin.__init__
    Test 2638: Add matchall and try to get it
    -----> prepare stage *** Could not execute: "$TC qdisc add dev $DEV1 clsact"
    -----> prepare stage *** Error message: "/bin/sh: ip: command not found"
    returncode 127; expected [0]
    -----> prepare stage *** Aborting test run.

    Let nsPlugin.py use the 'IP' variable introduced with commit 92c1a19e2fb9
    ("tc-tests: added path to ip command in tdc"), so that the path to 'ip' is
    correctly resolved to the value we have in tdc_config.py.

    # ./tdc.py -e 2638
    -- ns/SubPlugin.__init__
    Test 2638: Add matchall and try to get it
    All test results:
    1..1
    ok 1 2638 - Add matchall and try to get it

    Fixes: 489ce2f42514 ("tc-testing: Restore original behaviour for namespaces in tdc")
    Reported-by: Hangbin Liu
    Signed-off-by: Davide Caratti
    Acked-by: Nicolas Dichtel
    Signed-off-by: David S. Miller

    Davide Caratti
     
  • Razvan Stefanescu says:

    ====================
    net: dsa: microchip: add KSZ8563 support

    This patchset adds compatibility string for the KSZ8563 switch.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • It is a 3-Port 10/100 Ethernet Switch with 1588v2 PTP.

    Signed-off-by: Razvan Stefanescu
    Signed-off-by: David S. Miller

    Razvan Stefanescu
     
  • It is a 3-Port 10/100 Ethernet Switch with 1588v2 PTP.

    Signed-off-by: Razvan Stefanescu
    Signed-off-by: David S. Miller

    Razvan Stefanescu
     
  • Igor Russkikh says:

    ====================
    net: aquantia: fixes on vlan filters and other conditions

    Here is a set of various bug fixes related to vlan filter offload and
    two other rare cases.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • On embedded environments with hard memory limits it is a normal although
    rare case when skb can't be allocated on rx part under high traffic.

    In such OOM cases napi_complete_done() was not called.
    So the napi object became in an invalid state like it is "scheduled".
    Kernel do not re-schedules the poll of that napi object.

    Consequently, kernel can not remove that object the system hangs on
    `ifconfig down` waiting for a poll.

    We are fixing this by gracefully closing napi poll routine with correct
    invocation of napi_complete_done.

    This was reproduced with artificially failing the allocation of skb to
    simulate an "out of memory" error case and check that traffic does
    not get stuck.

    Fixes: 970a2e9864b0 ("net: ethernet: aquantia: Vector operations")
    Signed-off-by: Igor Russkikh
    Signed-off-by: Dmitry Bogdanov
    Signed-off-by: David S. Miller

    Dmitry Bogdanov
     
  • Declaring threaded irq handler should also indicate the irq is
    oneshot. It is oneshot indeed, because HW implements irq automasking
    on trigger.

    Not declaring this causes some kernel configurations to fail
    on interface up, because request_threaded_irq returned an err code.

    The issue was originally hidden on normal x86_64 configuration with
    latest kernel, because depending on interrupt controller, irq driver
    added ONESHOT flag on its own.

    Issue was observed on older kernels (4.14) where no such logic exists.

    Fixes: 4c83f170b3ac ("net: aquantia: link status irq handling")
    Signed-off-by: Igor Russkikh
    Reported-by: Michael Symolkin
    Signed-off-by: David S. Miller

    Igor Russkikh
     
  • In case of device reconfiguration the driver may reset the device invisible
    for other modules, vlan module in particular. So vlans will not be
    removed&created and vlan filters will not be configured in the device.
    The patch reapplies the vlan filters at device start.

    Fixes: 7975d2aff5afb ("net: aquantia: add support of rx-vlan-filter offload")
    Signed-off-by: Dmitry Bogdanov
    Signed-off-by: Igor Russkikh
    Signed-off-by: David S. Miller

    Dmitry Bogdanov
     
  • Fix a limit condition of vlans on the interface before setting vlan
    promiscuous mode

    Fixes: 48dd73d08d4dd ("net: aquantia: fix vlans not working over bridged network")
    Signed-off-by: Dmitry Bogdanov
    Signed-off-by: Igor Russkikh
    Signed-off-by: David S. Miller

    Dmitry Bogdanov
     
  • Due to absence of checking against the rx flow rule when vlan 0 is being
    removed, the other rule could be removed instead of the rule with vlan 0

    Fixes: 7975d2aff5afb ("net: aquantia: add support of rx-vlan-filter offload")
    Signed-off-by: Dmitry Bogdanov
    Signed-off-by: Igor Russkikh
    Signed-off-by: David S. Miller

    Dmitry Bogdanov
     
  • Vladimir Oltean says:

    ====================
    Fix issues in tc-taprio and tc-cbs

    This series fixes one panic and one WARN_ON found in the tc-taprio
    qdisc, while trying to apply it:

    - On an interface which is not multi-queue
    - On an interface which has no carrier

    The tc-cbs was also visually found to suffer of the same issue as
    tc-taprio, and the fix was only compile-tested in that case.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • The discussion to be made is absolutely the same as in the case of
    previous patch ("taprio: Set default link speed to 10 Mbps in
    taprio_set_picos_per_byte"). Nothing is lost when setting a default.

    Cc: Leandro Dorileo
    Fixes: e0a7683d30e9 ("net/sched: cbs: fix port_rate miscalculation")
    Acked-by: Vinicius Costa Gomes
    Signed-off-by: Vladimir Oltean
    Signed-off-by: David S. Miller

    Vladimir Oltean
     
  • The taprio budget needs to be adapted at runtime according to interface
    link speed. But that handling is problematic.

    For one thing, installing a qdisc on an interface that doesn't have
    carrier is not illegal. But taprio prints the following stack trace:

    [ 31.851373] ------------[ cut here ]------------
    [ 31.856024] WARNING: CPU: 1 PID: 207 at net/sched/sch_taprio.c:481 taprio_dequeue+0x1a8/0x2d4
    [ 31.864566] taprio: dequeue() called with unknown picos per byte.
    [ 31.864570] Modules linked in:
    [ 31.873701] CPU: 1 PID: 207 Comm: tc Not tainted 5.3.0-rc5-01199-g8838fe023cd6 #1689
    [ 31.881398] Hardware name: Freescale LS1021A
    [ 31.885661] [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
    [ 31.893368] [] (show_stack) from [] (dump_stack+0xb4/0xc8)
    [ 31.900555] [] (dump_stack) from [] (__warn+0xe0/0xf8)
    [ 31.907395] [] (__warn) from [] (warn_slowpath_fmt+0x48/0x6c)
    [ 31.914841] [] (warn_slowpath_fmt) from [] (taprio_dequeue+0x1a8/0x2d4)
    [ 31.923150] [] (taprio_dequeue) from [] (__qdisc_run+0x90/0x61c)
    [ 31.930856] [] (__qdisc_run) from [] (net_tx_action+0x12c/0x2bc)
    [ 31.938560] [] (net_tx_action) from [] (__do_softirq+0x130/0x3c8)
    [ 31.946350] [] (__do_softirq) from [] (irq_exit+0xbc/0xd8)
    [ 31.953536] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb4)
    [ 31.961328] [] (__handle_domain_irq) from [] (gic_handle_irq+0x58/0x9c)
    [ 31.969638] [] (gic_handle_irq) from [] (__irq_svc+0x6c/0x90)
    [ 31.977076] Exception stack(0xe8167b20 to 0xe8167b68)
    [ 31.982100] 7b20: e9d4bd80 00000cc0 000000cf 00000000 e9d4bd80 c1f38958 00000cc0 c1f38960
    [ 31.990234] 7b40: 00000001 000000cf 00000004 e9dc0800 00000000 e8167b70 c0f478ec c0f46d94
    [ 31.998363] 7b60: 60070013 ffffffff
    [ 32.001833] [] (__irq_svc) from [] (netlink_trim+0x18/0xd8)
    [ 32.009104] [] (netlink_trim) from [] (netlink_broadcast_filtered+0x34/0x414)
    [ 32.017930] [] (netlink_broadcast_filtered) from [] (netlink_broadcast+0x20/0x28)
    [ 32.027102] [] (netlink_broadcast) from [] (rtnetlink_send+0x34/0x88)
    [ 32.035238] [] (rtnetlink_send) from [] (notify_and_destroy+0x2c/0x44)
    [ 32.043461] [] (notify_and_destroy) from [] (qdisc_graft+0x398/0x470)
    [ 32.051595] [] (qdisc_graft) from [] (tc_modify_qdisc+0x3a4/0x724)
    [ 32.059470] [] (tc_modify_qdisc) from [] (rtnetlink_rcv_msg+0x260/0x2ec)
    [ 32.067864] [] (rtnetlink_rcv_msg) from [] (netlink_rcv_skb+0xb8/0x110)
    [ 32.076172] [] (netlink_rcv_skb) from [] (netlink_unicast+0x1b4/0x22c)
    [ 32.084392] [] (netlink_unicast) from [] (netlink_sendmsg+0x33c/0x380)
    [ 32.092614] [] (netlink_sendmsg) from [] (sock_sendmsg+0x14/0x24)
    [ 32.100403] [] (sock_sendmsg) from [] (___sys_sendmsg+0x214/0x228)
    [ 32.108279] [] (___sys_sendmsg) from [] (__sys_sendmsg+0x50/0x8c)
    [ 32.116068] [] (__sys_sendmsg) from [] (ret_fast_syscall+0x0/0x54)
    [ 32.123938] Exception stack(0xe8167fa8 to 0xe8167ff0)
    [ 32.128960] 7fa0: b6fa68c8 000000f8 00000003 bea142d0 00000000 00000000
    [ 32.137093] 7fc0: b6fa68c8 000000f8 0052154c 00000128 5d6468a2 00000000 00000028 00558c9c
    [ 32.145224] 7fe0: 00000070 bea14278 00530d64 b6e17e64
    [ 32.150659] ---[ end trace 2139c9827c3e5177 ]---

    This happens because the qdisc ->dequeue callback gets called. Which
    again is not illegal, the qdisc will dequeue even when the interface is
    up but doesn't have carrier (and hence SPEED_UNKNOWN), and the frames
    will be dropped further down the stack in dev_direct_xmit().

    And, at the end of the day, for what? For calculating the initial budget
    of an interface which is non-operational at the moment and where frames
    will get dropped anyway.

    So if we can't figure out the link speed, default to SPEED_10 and move
    along. We can also remove the runtime check now.

    Cc: Leandro Dorileo
    Fixes: 7b9eba7ba0c1 ("net/sched: taprio: fix picos_per_byte miscalculation")
    Acked-by: Vinicius Costa Gomes
    Signed-off-by: Vladimir Oltean
    Signed-off-by: David S. Miller

    Vladimir Oltean
     
  • taprio_init may fail earlier than this line:

    list_add(&q->taprio_list, &taprio_list);

    i.e. due to the net device not being multi queue.

    Attempting to remove q from the global taprio_list when it is not part
    of it will result in a kernel panic.

    Fix it by matching list_add and list_del better to one another in the
    order of operations. This way we can keep the deletion unconditional
    and with lower complexity - O(1).

    Cc: Leandro Dorileo
    Fixes: 7b9eba7ba0c1 ("net/sched: taprio: fix picos_per_byte miscalculation")
    Signed-off-by: Vladimir Oltean
    Acked-by: Vinicius Costa Gomes
    Signed-off-by: David S. Miller

    Vladimir Oltean
     
  • Use the register value width as the regmap_config name to prevent the
    following error when the second and third regmap_configs are
    initialized.
    "debugfs: Directory '${bus-id}' with parent 'regmap' already present!"

    Signed-off-by: George McCollister
    Reviewed-by: Marek Vasut
    Signed-off-by: David S. Miller

    George McCollister
     
  • Simon Wunderlich says:

    ====================
    Here are two batman-adv bugfixes:

    - Fix OGM and OGMv2 header read boundary check,
    by Sven Eckelmann (2 patches)
    ====================

    Signed-off-by: David S. Miller

    David S. Miller