Linux 5.4.16
Greg KH
maintainerI'm announcing the release of the 5.4.16 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/powerpc/include/asm/book3s/64/mmu-hash.h | 5 arch/powerpc/include/asm/xive-regs.h | 1 arch/powerpc/sysdev/xive/common.c | 15 drivers/atm/firestream.c | 3 drivers/gpu/drm/i915/gem/i915_gem_busy.c | 12 drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 9 drivers/gpu/drm/i915/gt/intel_engine_types.h | 4 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 drivers/gpu/drm/panfrost/panfrost_drv.c | 91 ++- drivers/gpu/drm/panfrost/panfrost_gem.c | 124 +++- drivers/gpu/drm/panfrost/panfrost_gem.h | 41 + drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 3 drivers/gpu/drm/panfrost/panfrost_job.c | 13 drivers/gpu/drm/panfrost/panfrost_job.h | 1 drivers/gpu/drm/panfrost/panfrost_mmu.c | 61 +- drivers/gpu/drm/panfrost/panfrost_mmu.h | 6 drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 34 - drivers/hwmon/adt7475.c | 5 drivers/hwmon/hwmon.c | 68 +- drivers/hwmon/nct7802.c | 75 ++ drivers/infiniband/ulp/isert/ib_isert.c | 12 drivers/input/misc/keyspan_remote.c | 9 drivers/input/misc/pm8xxx-vibrator.c | 2 drivers/input/rmi4/rmi_smbus.c | 2 drivers/input/tablet/aiptek.c | 6 drivers/input/tablet/gtco.c | 10 drivers/input/tablet/pegasus_notetaker.c | 2 drivers/input/touchscreen/sun4i-ts.c | 6 drivers/input/touchscreen/sur40.c | 2 drivers/iommu/amd_iommu_init.c | 24 drivers/iommu/intel-iommu.c | 3 drivers/leds/leds-gpio.c | 10 drivers/media/v4l2-core/v4l2-ioctl.c | 24 drivers/mmc/host/sdhci-tegra.c | 2 drivers/mmc/host/sdhci.c | 10 drivers/mmc/host/sdhci_am654.c | 27 drivers/net/can/slcan.c | 12 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 2 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 49 - drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 9 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 drivers/net/ethernet/mellanox/mlx5/core/main.c | 1 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c | 3 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c | 42 - drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 16 drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 17 drivers/net/ethernet/natsemi/sonic.c | 380 +++++++------ drivers/net/ethernet/natsemi/sonic.h | 44 + drivers/net/gtp.c | 10 drivers/net/slip/slip.c | 12 drivers/net/tun.c | 4 drivers/net/usb/lan78xx.c | 15 drivers/net/wireless/cisco/airo.c | 20 drivers/net/wireless/intel/iwlwifi/mvm/constants.h | 1 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 28 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 4 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 19 drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 2 drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 6 drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 4 drivers/net/wireless/marvell/libertas/cfg.c | 16 drivers/pci/quirks.c | 19 drivers/pinctrl/intel/pinctrl-sunrisepoint.c | 1 drivers/target/iscsi/iscsi_target.c | 6 fs/afs/cell.c | 11 fs/ceph/mds_client.c | 8 fs/io_uring.c | 6 fs/namei.c | 17 fs/readdir.c | 79 +- include/linux/netdevice.h | 2 include/linux/netfilter/ipset/ip_set.h | 7 include/linux/netfilter/nfnetlink.h | 2 include/net/netns/nftables.h | 1 include/trace/events/xen.h | 6 kernel/power/snapshot.c | 20 kernel/trace/trace.c | 5 kernel/trace/trace_events_hist.c | 63 +- kernel/trace/trace_events_trigger.c | 20 kernel/trace/trace_kprobe.c | 2 kernel/trace/trace_probe.c | 5 kernel/trace/trace_probe.h | 3 kernel/trace/trace_uprobe.c | 124 ++-- lib/strncpy_from_user.c | 14 lib/strnlen_user.c | 14 lib/test_xarray.c | 56 + lib/xarray.c | 33 - net/core/dev.c | 97 +-- net/core/rtnetlink.c | 13 net/core/skmsg.c | 2 net/hsr/hsr_main.h | 2 net/ipv4/esp4_offload.c | 2 net/ipv4/fib_trie.c | 6 net/ipv4/fou.c | 4 net/ipv4/ip_tunnel.c | 4 net/ipv4/tcp.c | 1 net/ipv4/tcp_bbr.c | 3 net/ipv4/tcp_input.c | 1 net/ipv4/tcp_output.c | 1 net/ipv4/udp.c | 3 net/ipv6/esp6_offload.c | 2 net/ipv6/ip6_gre.c | 3 net/ipv6/ip6_tunnel.c | 4 net/ipv6/seg6_local.c | 4 net/netfilter/ipset/ip_set_bitmap_gen.h | 2 net/netfilter/ipset/ip_set_bitmap_ip.c | 6 net/netfilter/ipset/ip_set_bitmap_ipmac.c | 6 net/netfilter/ipset/ip_set_bitmap_port.c | 6 net/netfilter/nf_tables_api.c | 155 +++-- net/netfilter/nfnetlink.c | 6 net/netfilter/nft_osf.c | 3 net/sched/cls_api.c | 5 net/sched/ematch.c | 2 net/tls/tls_sw.c | 4 net/x25/af_x25.c | 6 scripts/recordmcount.c | 17 117 files changed, 1576 insertions(+), 766 deletions(-)
Al Viro (1):
do_last(): fetch directory ->i_mode and ->i_uid before it's too late
Alex Deucher (1):
PCI: Mark AMD Navi14 GPU rev 0xc5 ATS as broken
Alex Sverdlin (1):
ARM: 8950/1: ftrace/recordmcount: filter relocation types
Alexander Potapenko (1):
PM: hibernate: fix crashes with init_on_free=1
Aneesh Kumar K.V (1):
powerpc/mm/hash: Fix sharing context ids between kernel & userspace
Bart Van Assche (1):
scsi: RDMA/isert: Fix a recently introduced regression related to logout
Boris Brezillon (1):
drm/panfrost: Add the panfrost_gem_mapping concept
Boyan Ding (1):
pinctrl: sunrisepoint: Add missing Interrupt Status register offset
Changbin Du (1):
tracing: xen: Ordered comparison of function pointers
Christophe Leroy (1):
lib: Reduce user_access_begin() boundaries in strncpy_from_user() and strnlen_user()
Chuhong Yuan (1):
Input: sun4i-ts - add a check for devm_thermal_zone_of_sensor_register
Cong Wang (1):
net_sched: fix datalen for ematch
David Ahern (1):
ipv4: Detect rollover in specific fib table dump
David Howells (1):
afs: Fix characters allowed into cell names
Eli Cohen (1):
net/mlx5: E-Switch, Prevent ingress rate configuration of uplink rep
Emmanuel Grumbach (1):
iwlwifi: mvm: don't send the IWL_MVM_RXQ_NSSN_SYNC notif to Rx queues
Erez Shitrit (2):
net/mlx5: DR, Enable counter on non-fwd-dest objects net/mlx5: DR, use non preemptible call to get the current cpu number
Eric Dumazet (5):
gtp: make sure only SOCK_DGRAM UDP sockets are accepted
net: rtnetlink: validate IFLA_MTU attribute in rtnl_create_link()
net_sched: use validated TCA_KIND attribute in tc_new_tfilter()
tcp: do not leave dangling pointers in tp->highest_sack
tun: add mutex_unlock() call and napi.skb clearing in tun_get_user()
Faiz Abbas (2):
mmc: sdhci_am654: Remove Inverted Write Protect flag
mmc: sdhci_am654: Reset Command and Data line after tuning
Finn Thain (12):
net/sonic: Add mutual exclusion for accessing shared state net/sonic: Clear interrupt flags immediately net/sonic: Use MMIO accessors
net/sonic: Fix interface error stats collection net/sonic: Fix receive buffer handling
net/sonic: Avoid needless receive descriptor EOL flag updates net/sonic: Improve receive descriptor status flag check net/sonic: Fix receive buffer replenishment
net/sonic: Quiesce SONIC before re-initializing descriptor memory net/sonic: Fix command register usage
net/sonic: Fix CAM initialization
net/sonic: Prevent tx watchdog timeout
Florian Fainelli (1):
net: bcmgenet: Use netif_tx_napi_add() for TX NAPI
Florian Westphal (1):
netfilter: nft_osf: add missing check for DREG attribute
Frederic Barrat (1):
powerpc/xive: Discard ESB load value when interrupt is invalid
Gilles Buloz (2):
hwmon: (nct7802) Fix voltage limits to wrong registers
hwmon: (nct7802) Fix non-working alarm on voltages
Greg Kroah-Hartman (1):
Linux 5.4.16
Guenter Roeck (1):
hwmon: (core) Do not use device managed functions for memory allocations
Hans Verkuil (2):
Revert "Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers"
media: v4l2-ioctl.c: zero reserved fields for S/TRY_FMT
Ido Schimmel (2):
mlxsw: spectrum_acl: Fix use-after-free during reload
mlxsw: switchx2: Do not modify cloned SKBs during xmit
Jacek Anaszewski (1):
leds: gpio: Fix uninitialized gpio label for fwnode based probe
Jakub Kicinski (1):
net/tls: fix async operation
Jakub Sitnicki (1):
net, sk_msg: Don't check if sock is locked when tearing down psock
James Hughes (1):
net: usb: lan78xx: Add .ndo_features_check
Jeff Layton (1):
ceph: hold extra reference to r_parent over life of request
Jens Axboe (1):
Revert "io_uring: only allow submit from owning task"
Jerry Snitselaar (1):
iommu/vt-d: Call __dmar_remove_one_dev_info with valid pointer
Johan Hovold (5):
Input: keyspan-remote - fix control-message timeouts
Input: sur40 - fix interface sanity checks
Input: gtco - fix endpoint sanity check
Input: aiptek - fix endpoint sanity check
Input: pegasus_notetaker - fix endpoint sanity check
Johannes Berg (2):
iwlwifi: mvm: fix SKB leak on invalid queue
iwlwifi: mvm: fix potential SKB leak on TXQ TX
Jouni Hogander (1):
net-sysfs: Fix reference count leak
Kadlecsik József (1):
netfilter: ipset: use bitmap infrastructure completely
Kristian Evensen (1):
fou: Fix IPv6 netlink policy
Linus Torvalds (2):
readdir: make user_access_begin() use the real access range
readdir: be more conservative with directory entry names
Luuk Paulussen (1):
hwmon: (adt7475) Make volt2reg return same reg as reg2volt input
Martin Schiller (1):
net/x25: fix nonblocking connect
Masami Hiramatsu (2):
tracing: trigger: Replace unneeded RCU-list traversals tracing/uprobe: Fix double perf_event linking on multiprobe uprobe
Masami Ichikawa (1):
tracing: Do not set trace clock if tracefs lockdown is in effect
Matthew Auld (1):
drm/i915/userptr: fix size calculation
Matthew Wilcox (Oracle) (3):
XArray: Fix infinite loop with entry at ULONG_MAX
XArray: Fix xa_find_after with multi-index entries
XArray: Fix xas_find returning too many entries
Maxim Mikityanskiy (1):
net: Fix packet reordering caused by GRO and listified RX cooperation
Mehmet Akif Tasova (1):
Revert "iwlwifi: mvm: fix scan config command size"
Meir Lichtinger (1):
net/mlx5: Update the list of the PCI supported devices
Michael Ellerman (3):
net: cxgb3_main: Add CAP_NET_ADMIN check to CHELSIO_GET_MEM
airo: Fix possible info leak in AIROOLDIOCTL/SIOCDEVPRIVATE
airo: Add missing CAP_NET_ADMIN check in AIROOLDIOCTL/SIOCDEVPRIVATE
Michał Mirosław (2):
mmc: tegra: fix SDR50 tuning override
mmc: sdhci: fix minimum clock rate for v3 controller
Niko Kortstrom (1):
net: ip6_gre: fix moving ip6gre between namespaces
Pablo Neira Ayuso (2):
netfilter: nf_tables: add __nft_chain_type_get()
netfilter: nf_tables: autoload modules from the abort path
Paolo Abeni (1):
Revert "udp: do rmem bulk free even if the rx sk queue is empty"
Paul Blakey (1):
net/mlx5: Fix lowest FDB pool size
Richard Palethorpe (1):
can, slip: Protect tty->disc_data in write_wakeup and close with RCU
Shuah Khan (1):
iommu/amd: Fix IOMMU perf counter clobbering during init
Stephan Gerhold (1):
Input: pm8xxx-vib - fix handling of separate enable register
Steven Rostedt (VMware) (1):
tracing: Fix histogram code when expression has same var as value
Tariq Toukan (3):
net/mlx5e: kTLS, Fix corner-case checks in TX resync flow net/mlx5e: kTLS, Remove redundant posts in TX resync flow net/mlx5e: kTLS, Do not send decrypted-marked SKBs via non-accel path
Tvrtko Ursulin (1):
drm/i915: Align engine->uabi_class/instance with i915_drm.h
Ulrich Weber (1):
xfrm: support output_mark for offload ESP packets
Wen Huang (1):
libertas: Fix two buffer overflows at parsing bss descriptor
Wen Yang (1):
tcp_bbr: improve arithmetic division in bbr_update_bw()
Wenwen Wang (1):
firestream: fix memory leaks
William Dauchy (2):
net, ip6_tunnel: fix namespaces move
net, ip_tunnel: fix namespaces move
Yuki Taguchi (1):
ipv6: sr: remove SKB_GSO_IPXIP6 on End.D* actions
xiaofeng.yan (1):
hsr: Fix a compilation error
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 15 +SUBLEVEL = 16 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/powerpc/include/asm/book3s/64/mmu-hash.h +4 -1
@@ -600,8 +600,11 @@ extern void slb_set_size(u16 size);* */ #define MAX_USER_CONTEXT ((ASM_CONST(1) << CONTEXT_BITS) - 2) + +// The + 2 accounts for INVALID_REGION and 1 more to avoid overlap with kernel #define MIN_USER_CONTEXT (MAX_KERNEL_CTX_CNT + MAX_VMALLOC_CTX_CNT + \ - MAX_IO_CTX_CNT + MAX_VMEMMAP_CTX_CNT) + MAX_IO_CTX_CNT + MAX_VMEMMAP_CTX_CNT + 2) +/* * For platforms that support on 65bit VA we limit the context bits */
arch/powerpc/include/asm/xive-regs.h +1 -0
@@ -39,6 +39,7 @@#define XIVE_ESB_VAL_P 0x2#define XIVE_ESB_VAL_Q 0x1 +#define XIVE_ESB_INVALID 0xFF/* * Thread Management (aka "TM") registers
arch/powerpc/sysdev/xive/common.c +12 -3
@@ -972,12 +972,21 @@ static int xive_get_irqchip_state(struct irq_data *data, enum irqchip_irq_state which, bool *state) { struct xive_irq_data *xd = irq_data_get_irq_handler_data(data); +u8 pq;switch (which) {case IRQCHIP_STATE_ACTIVE : - *state = !xd->stale_p && - (xd->saved_p || - !!(xive_esb_read (xd,XIVE_ESB_GET ) &XIVE_ESB_VAL_P )); + pq =xive_esb_read (xd,XIVE_ESB_GET ); + +/* +* The esb value being all 1's means we couldn't get +* the PQ state of the interrupt through mmio. It may +* happen, for example when querying a PHB interrupt +* while the PHB is in an error state. We consider the +* interrupt to be inactive in that case. +*/ + *state = (pq !=XIVE_ESB_INVALID ) && !xd->stale_p && + (xd->saved_p || !!(pq &XIVE_ESB_VAL_P ));return 0 ;default :return -EINVAL ;
drivers/atm/firestream.c +3 -0
@@ -912,6 +912,7 @@ static int fs_open(struct atm_vcc *atm_vcc) }if (!to) {printk ("No more free channels for FS50..\n" ); +kfree (vcc);return -EBUSY ; } vcc->channo = dev->channo;
@@ -922,6 +923,7 @@ static int fs_open(struct atm_vcc *atm_vcc)if (((DO_DIRECTION (rxtp) && dev->atm_vccs[vcc->channo])) || (DO_DIRECTION (txtp) &&test_bit (vcc->channo, dev->tx_inuse))) {printk ("Channel is in use for FS155.\n" ); +kfree (vcc);return -EBUSY ; } }
@@ -935,6 +937,7 @@ static int fs_open(struct atm_vcc *atm_vcc) tc, sizeof (struct fs_transmit_config));if (!tc) {fs_dprintk (FS_DEBUG_OPEN ,"fs: can't alloc transmit_config.\n" ); +kfree (vcc);return -ENOMEM ; }
drivers/gpu/drm/i915/gem/i915_gem_busy.c +6 -6
@@ -9,16 +9,16 @@#include "i915_gem_ioctls.h" #include "i915_gem_object.h" -static __always_inline u32 __busy_read_flag(u8 id) +static __always_inline u32 __busy_read_flag(u16 id) { -if (id == (u8 )I915_ENGINE_CLASS_INVALID ) +if (id == (u16 )I915_ENGINE_CLASS_INVALID )return 0xffff0000u ;GEM_BUG_ON (id >=16 );return 0x10000u << id; } -static __always_inline u32 __busy_write_id(u8 id) +static __always_inline u32 __busy_write_id(u16 id) {/* * The uABI guarantees an active writer is also amongst the read
@@ -29,14 +29,14 @@ static __always_inline u32 __busy_write_id(u8 id)* last_read - hence we always set both read and write busy for * last_write. */ -if (id == (u8 )I915_ENGINE_CLASS_INVALID ) +if (id == (u16 )I915_ENGINE_CLASS_INVALID )return 0xffffffffu ;return (id +1 ) |__busy_read_flag (id); } static __always_inline unsigned int -__busy_set_if_active (const struct dma_fence *fence,u32 (*flag)(u8 id)) +__busy_set_if_active (const struct dma_fence *fence,u32 (*flag)(u16 id)) {const struct i915_request *rq;
@@ -57,7 +57,7 @@ __busy_set_if_active(const struct dma_fence *fence, u32 (*flag)(u8 id))return 0 ;/* Beware type-expansion follies! */ -BUILD_BUG_ON (!typecheck (u8, rq->engine->uabi_class)); +BUILD_BUG_ON (!typecheck (u16, rq->engine->uabi_class));return flag (rq->engine->uabi_class); }
drivers/gpu/drm/i915/gem/i915_gem_userptr.c +5 -4
@@ -427,7 +427,7 @@ struct get_pages_work {static struct sg_table *__i915_gem_userptr_alloc_pages (struct drm_i915_gem_object *obj, -struct page **pvec,int num_pages) +struct page **pvec,unsigned long num_pages) {unsigned int max_segment =i915_sg_segment_size ();struct sg_table *st;
@@ -473,9 +473,10 @@ __i915_gem_userptr_get_pages_worker(struct work_struct *_work) {struct get_pages_work *work =container_of (_work,typeof (*work), work);struct drm_i915_gem_object *obj = work->obj; -const int npages = obj->base.size >>PAGE_SHIFT ; +const unsigned long npages = obj->base.size >>PAGE_SHIFT ; +unsigned long pinned;struct page **pvec; -int pinned, ret; +int ret; ret = -ENOMEM ; pinned =0 ;
@@ -578,7 +579,7 @@ __i915_gem_userptr_get_pages_schedule(struct drm_i915_gem_object *obj)static int i915_gem_userptr_get_pages (struct drm_i915_gem_object *obj) { -const int num_pages = obj->base.size >>PAGE_SHIFT ; +const unsigned long num_pages = obj->base.size >>PAGE_SHIFT ;struct mm_struct *mm = obj->userptr.mm->mm;struct page **pvec;struct sg_table *pages;
drivers/gpu/drm/i915/gt/intel_engine_types.h +2 -2
@@ -300,8 +300,8 @@ struct intel_engine_cs {u8 class;u8 instance; -u8 uabi_class; -u8 uabi_instance; +u16 uabi_class; +u16 uabi_instance;u32 context_size;u32 mmio_base;
drivers/gpu/drm/i915/i915_gem_gtt.c +2 -0
@@ -1178,6 +1178,7 @@ gen8_ppgtt_insert_pte(struct i915_ppgtt *ppgtt, pd =i915_pd_entry (pdp,gen8_pd_index (idx,2 )); vaddr =kmap_atomic_px (i915_pt_entry (pd,gen8_pd_index (idx,1 ))); do { + GEM_BUG_ON(iter->sg->length < I915_GTT_PAGE_SIZE); vaddr[gen8_pd_index(idx, 0)] = pte_encode | iter->dma; iter->dma += I915_GTT_PAGE_SIZE;
@@ -1657,6 +1658,7 @@ static void gen6_ppgtt_insert_entries(struct i915_address_space *vm, vaddr =kmap_atomic_px (i915_pt_entry (pd, act_pt)); do { + GEM_BUG_ON(iter.sg->length < I915_GTT_PAGE_SIZE); vaddr[act_pte] = pte_encode | GEN6_PTE_ADDR_ENCODE(iter.dma); iter.dma += I915_GTT_PAGE_SIZE;
drivers/gpu/drm/panfrost/panfrost_drv.c +82 -9
159 lines not on this page · raw message
drivers/gpu/drm/panfrost/panfrost_gem.c +108 -16
169 lines not on this page · raw message
drivers/gpu/drm/panfrost/panfrost_gem.h +35 -6
64 lines not on this page · raw message
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c +2 -1
@@ -39,11 +39,12 @@ panfrost_gem_shrinker_count(struct shrinker *shrinker, struct shrink_control *scstatic bool panfrost_gem_purge (struct drm_gem_object *obj) {struct drm_gem_shmem_object *shmem =to_drm_gem_shmem_obj (obj); +struct panfrost_gem_object *bo =to_panfrost_bo (obj);if (!mutex_trylock (&shmem->pages_lock))return false; -panfrost_mmu_unmap (to_panfrost_bo (obj)); +panfrost_gem_teardown_mappings (bo);drm_gem_shmem_purge_locked (obj);mutex_unlock (&shmem->pages_lock);
drivers/gpu/drm/panfrost/panfrost_job.c +12 -1
@@ -269,9 +269,20 @@ static void panfrost_job_cleanup(struct kref *ref)dma_fence_put (job->done_fence);dma_fence_put (job->render_done_fence); -if (job->bos) { +if (job->mappings) {for (i =0 ; i < job->bo_count; i++) +panfrost_gem_mapping_put (job->mappings[i]); +kvfree (job->mappings); + } + +if (job->bos) { +struct panfrost_gem_object *bo; + +for (i =0 ; i < job->bo_count; i++) { + bo =to_panfrost_bo (job->bos[i]);drm_gem_object_put_unlocked (job->bos[i]); + } +kvfree (job->bos); }
drivers/gpu/drm/panfrost/panfrost_job.h +1 -0
@@ -32,6 +32,7 @@ struct panfrost_job {/* Exclusive fences we have taken from the BOs to wait for */ struct dma_fence **implicit_fences; +struct panfrost_gem_mapping **mappings;struct drm_gem_object **bos;u32 bo_count;
drivers/gpu/drm/panfrost/panfrost_mmu.c +35 -26
148 lines not on this page · raw message
drivers/gpu/drm/panfrost/panfrost_mmu.h +3 -3
@@ -4,12 +4,12 @@#ifndef __PANFROST_MMU_H__#define __PANFROST_MMU_H__ -struct panfrost_gem_object ; +struct panfrost_gem_mapping ;struct panfrost_file_priv ;struct panfrost_mmu ; -int panfrost_mmu_map (struct panfrost_gem_object *bo); -void panfrost_mmu_unmap (struct panfrost_gem_object *bo); +int panfrost_mmu_map (struct panfrost_gem_mapping *mapping); +void panfrost_mmu_unmap (struct panfrost_gem_mapping *mapping);int panfrost_mmu_init (struct panfrost_device *pfdev);void panfrost_mmu_fini (struct panfrost_device *pfdev);
drivers/gpu/drm/panfrost/panfrost_perfcnt.c +22 -12
@@ -25,7 +25,7 @@#define V4_SHADERS_PER_COREGROUP 4struct panfrost_perfcnt { -struct panfrost_gem_object *bo; +struct panfrost_gem_mapping *mapping;size_t bosize;void *buf;struct panfrost_file_priv *user;
@@ -49,7 +49,7 @@ static int panfrost_perfcnt_dump_locked(struct panfrost_device *pfdev)int ret;reinit_completion (&pfdev->perfcnt->dump_comp); - gpuva = pfdev->perfcnt->bo->node.start <<PAGE_SHIFT ; + gpuva = pfdev->perfcnt->mapping->mmnode.start <<PAGE_SHIFT ;gpu_write (pfdev,GPU_PERFCNT_BASE_LO , gpuva);gpu_write (pfdev,GPU_PERFCNT_BASE_HI , gpuva >>32 ); gpu_write(pfdev, GPU_INT_CLEAR,
@@ -89,17 +89,22 @@ static int panfrost_perfcnt_enable_locked(struct panfrost_device *pfdev,if (IS_ERR (bo))return PTR_ERR (bo); - perfcnt->bo =to_panfrost_bo (&bo->base); -/* Map the perfcnt buf in the address space attached to file_priv. */ - ret =panfrost_gem_open (&perfcnt->bo->base.base, file_priv); + ret =panfrost_gem_open (&bo->base, file_priv);if (ret) goto err_put_bo; + perfcnt->mapping =panfrost_gem_mapping_get (to_panfrost_bo (&bo->base), + user); +if (!perfcnt->mapping) { + ret = -EINVAL ; + goto err_close_bo; + } + perfcnt->buf =drm_gem_shmem_vmap (&bo->base);if (IS_ERR (perfcnt->buf)) { ret =PTR_ERR (perfcnt->buf); - goto err_close_bo; + goto err_put_mapping; }/*
@@ -154,12 +159,17 @@ static int panfrost_perfcnt_enable_locked(struct panfrost_device *pfdev,if (panfrost_has_hw_issue (pfdev,HW_ISSUE_8186 ))gpu_write (pfdev,GPU_PRFCNT_TILER_EN ,0xffffffff ); +/* The BO ref is retained by the mapping. */ +drm_gem_object_put_unlocked (&bo->base); +return 0 ; err_vunmap: -drm_gem_shmem_vunmap (&perfcnt->bo->base.base, perfcnt->buf); +drm_gem_shmem_vunmap (&bo->base, perfcnt->buf); +err_put_mapping: +panfrost_gem_mapping_put (perfcnt->mapping); err_close_bo: -panfrost_gem_close (&perfcnt->bo->base.base, file_priv); +panfrost_gem_close (&bo->base, file_priv); err_put_bo:drm_gem_object_put_unlocked (&bo->base);return ret;
@@ -182,11 +192,11 @@ static int panfrost_perfcnt_disable_locked(struct panfrost_device *pfdev, GPU_PERFCNT_CFG_MODE(GPU_PERFCNT_CFG_MODE_OFF)); perfcnt->user =NULL ; -drm_gem_shmem_vunmap (&perfcnt->bo->base.base, perfcnt->buf); +drm_gem_shmem_vunmap (&perfcnt->mapping->obj->base.base, perfcnt->buf); perfcnt->buf =NULL ; -panfrost_gem_close (&perfcnt->bo->base.base, file_priv); -drm_gem_object_put_unlocked (&perfcnt->bo->base.base); - perfcnt->bo =NULL ; +panfrost_gem_close (&perfcnt->mapping->obj->base.base, file_priv); +panfrost_gem_mapping_put (perfcnt->mapping); + perfcnt->mapping =NULL ;pm_runtime_mark_last_busy (pfdev->dev);pm_runtime_put_autosuspend (pfdev->dev);
drivers/hwmon/adt7475.c +3 -2
@@ -294,9 +294,10 @@ static inline u16 volt2reg(int channel, long volt, u8 bypass_attn)long reg;if (bypass_attn & (1 << channel)) - reg = (volt *1024 ) /2250 ; + reg =DIV_ROUND_CLOSEST (volt *1024 ,2250 );else - reg = (volt * r[1 ] *1024 ) / ((r[0 ] + r[1 ]) *2250 ); + reg =DIV_ROUND_CLOSEST (volt * r[1 ] *1024 , + (r[0 ] + r[1 ]) *2250 );return clamp_val (reg,0 ,1023 ) & (0xff <<2 ); }
drivers/hwmon/hwmon.c +41 -27
182 lines not on this page · raw message
drivers/hwmon/nct7802.c +69 -6
121 lines not on this page · raw message
drivers/infiniband/ulp/isert/ib_isert.c +0 -12
@@ -2575,17 +2575,6 @@ isert_wait4logout(struct isert_conn *isert_conn) } } -static void -isert_wait4cmds (struct iscsi_conn *conn) -{ -isert_info ("iscsi_conn %p\n" , conn); - -if (conn->sess) { -target_sess_cmd_list_set_waiting (conn->sess->se_sess); -target_wait_for_sess_cmds (conn->sess->se_sess); - } -} -/** * isert_put_unsol_pending_cmds() - Drop commands waiting for * unsolicitate dataout
@@ -2633,7 +2622,6 @@ static void isert_wait_conn(struct iscsi_conn *conn)ib_drain_qp (isert_conn->qp);isert_put_unsol_pending_cmds (conn); -isert_wait4cmds (conn);isert_wait4logout (isert_conn);queue_work (isert_release_wq, &isert_conn->release_work);
drivers/input/misc/keyspan_remote.c +6 -3
@@ -336,7 +336,8 @@ static int keyspan_setup(struct usb_device* dev)int retval =0 ; retval =usb_control_msg (dev,usb_sndctrlpipe (dev,0 ), -0x11 ,0x40 ,0x5601 ,0x0 ,NULL ,0 ,0 ); +0x11 ,0x40 ,0x5601 ,0x0 ,NULL ,0 , +USB_CTRL_SET_TIMEOUT );if (retval) {dev_dbg (&dev->dev,"%s - failed to set bit rate due to error: %d\n" , __func__, retval);
@@ -344,7 +345,8 @@ static int keyspan_setup(struct usb_device* dev) } retval =usb_control_msg (dev,usb_sndctrlpipe (dev,0 ), -0x44 ,0x40 ,0x0 ,0x0 ,NULL ,0 ,0 ); +0x44 ,0x40 ,0x0 ,0x0 ,NULL ,0 , +USB_CTRL_SET_TIMEOUT );if (retval) {dev_dbg (&dev->dev,"%s - failed to set resume sensitivity due to error: %d\n" , __func__, retval);
@@ -352,7 +354,8 @@ static int keyspan_setup(struct usb_device* dev) } retval =usb_control_msg (dev,usb_sndctrlpipe (dev,0 ), -0x22 ,0x40 ,0x0 ,0x0 ,NULL ,0 ,0 ); +0x22 ,0x40 ,0x0 ,0x0 ,NULL ,0 , +USB_CTRL_SET_TIMEOUT );if (retval) {dev_dbg (&dev->dev,"%s - failed to turn receive on due to error: %d\n" , __func__, retval);
drivers/input/misc/pm8xxx-vibrator.c +1 -1
@@ -90,7 +90,7 @@ static int pm8xxx_vib_set(struct pm8xxx_vib *vib, bool on)if (regs->enable_mask) rc =regmap_update_bits (vib->regmap, regs->enable_addr, - on ? regs->enable_mask :0 , val); + regs->enable_mask, on ? ~0 :0 );return rc; }
drivers/input/rmi4/rmi_smbus.c +2 -0
@@ -163,6 +163,7 @@ static int rmi_smb_write_block(struct rmi_transport_dev *xport, u16 rmiaddr,/* prepare to write next block of bytes */ cur_len -=SMB_MAX_COUNT ; databuff +=SMB_MAX_COUNT ; + rmiaddr +=SMB_MAX_COUNT ; } exit:mutex_unlock (&rmi_smb->page_mutex);
@@ -214,6 +215,7 @@ static int rmi_smb_read_block(struct rmi_transport_dev *xport, u16 rmiaddr,/* prepare to read next block of bytes */ cur_len -=SMB_MAX_COUNT ; databuff +=SMB_MAX_COUNT ; + rmiaddr +=SMB_MAX_COUNT ; } retval =0 ;
drivers/input/tablet/aiptek.c +3 -3
@@ -1802,14 +1802,14 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)input_set_abs_params (inputdev,ABS_WHEEL ,AIPTEK_WHEEL_MIN ,AIPTEK_WHEEL_MAX -1 ,0 ,0 );/* Verify that a device really has an endpoint */ -if (intf->altsetting[0 ].desc.bNumEndpoints <1 ) { +if (intf->cur_altsetting->desc.bNumEndpoints <1 ) {dev_err (&intf->dev,"interface has %d endpoints, but must have minimum 1\n" , - intf->altsetting[0 ].desc.bNumEndpoints); + intf->cur_altsetting->desc.bNumEndpoints); err = -EINVAL ; goto fail3; } - endpoint = &intf->altsetting[0 ].endpoint[0 ].desc; + endpoint = &intf->cur_altsetting->endpoint[0 ].desc;/* Go set up our URB, which is called when the tablet receives * input.
drivers/input/tablet/gtco.c +3 -7
@@ -875,18 +875,14 @@ static int gtco_probe(struct usb_interface *usbinterface, }/* Sanity check that a device has an endpoint */ -if (usbinterface->altsetting[0 ].desc.bNumEndpoints <1 ) { +if (usbinterface->cur_altsetting->desc.bNumEndpoints <1 ) {dev_err (&usbinterface->dev,"Invalid number of endpoints\n" ); error = -EINVAL ; goto err_free_urb; } -/* -* The endpoint is always altsetting 0, we know this since we know -* this device only has one interrupt endpoint -*/ - endpoint = &usbinterface->altsetting[0 ].endpoint[0 ].desc; + endpoint = &usbinterface->cur_altsetting->endpoint[0 ].desc;/* Some debug */ dev_dbg (&usbinterface->dev,"gtco # interfaces: %d\n" , usbinterface->num_altsetting);
@@ -973,7 +969,7 @@ static int gtco_probe(struct usb_interface *usbinterface, input_dev->dev.parent = &usbinterface->dev;/* Setup the URB, it will be posted later on open of input device */ - endpoint = &usbinterface->altsetting[0 ].endpoint[0 ].desc; + endpoint = &usbinterface->cur_altsetting->endpoint[0 ].desc; usb_fill_int_urb(gtco->urbinfo, udev,
drivers/input/tablet/pegasus_notetaker.c +1 -1
@@ -275,7 +275,7 @@ static int pegasus_probe(struct usb_interface *intf,return -ENODEV ;/* Sanity check that the device has an endpoint */ -if (intf->altsetting[0 ].desc.bNumEndpoints <1 ) { +if (intf->cur_altsetting->desc.bNumEndpoints <1 ) {dev_err (&intf->dev,"Invalid number of endpoints\n" );return -EINVAL ; }
drivers/input/touchscreen/sun4i-ts.c +5 -1
@@ -237,6 +237,7 @@ static int sun4i_ts_probe(struct platform_device *pdev)struct device *dev = &pdev->dev;struct device_node *np = dev->of_node;struct device *hwmon; +struct thermal_zone_device *thermal;int error;u32 reg;bool ts_attached;
@@ -355,7 +356,10 @@ static int sun4i_ts_probe(struct platform_device *pdev)if (IS_ERR (hwmon))return PTR_ERR (hwmon); -devm_thermal_zone_of_sensor_register (ts->dev,0 , ts, &sun4i_ts_tz_ops); + thermal =devm_thermal_zone_of_sensor_register (ts->dev,0 , ts, + &sun4i_ts_tz_ops); +if (IS_ERR (thermal)) +return PTR_ERR (thermal);writel (TEMP_IRQ_EN (1 ), ts->base +TP_INT_FIFOC );
drivers/input/touchscreen/sur40.c +1 -1
@@ -653,7 +653,7 @@ static int sur40_probe(struct usb_interface *interface,int error;/* Check if we really have the right interface. */ - iface_desc = &interface->altsetting[0 ]; + iface_desc = interface->cur_altsetting;if (iface_desc->desc.bInterfaceClass !=0xFF )return -ENODEV ;
drivers/iommu/amd_iommu_init.c +18 -6
@@ -1655,27 +1655,39 @@ static int iommu_pc_get_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr,static void init_iommu_perf_ctr (struct amd_iommu *iommu) {struct pci_dev *pdev = iommu->dev; -u64 val =0xabcd , val2 =0 ; +u64 val =0xabcd , val2 =0 , save_reg =0 ;if (!iommu_feature (iommu,FEATURE_PC ))return ; amd_iommu_pc_present = true; +/* save the value to restore, if writable */ +if (iommu_pc_get_set_reg (iommu,0 ,0 ,0 , &save_reg, false)) + goto pc_false; +/* Check if the performance counters can be written to */ if ((iommu_pc_get_set_reg (iommu,0 ,0 ,0 , &val, true)) || (iommu_pc_get_set_reg (iommu,0 ,0 ,0 , &val2, false)) || - (val != val2)) { -pci_err (pdev,"Unable to write to IOMMU perf counter.\n" ); - amd_iommu_pc_present = false; -return ; - } + (val != val2)) + goto pc_false; + +/* restore */ +if (iommu_pc_get_set_reg (iommu,0 ,0 ,0 , &save_reg, true)) + goto pc_false;pci_info (pdev,"IOMMU performance counters supported\n" ); val =readl (iommu->mmio_base +MMIO_CNTR_CONF_OFFSET ); iommu->max_banks = (u8) ((val >>12 ) &0x3f ); iommu->max_counters = (u8) ((val >>7 ) &0xf ); + +return ; + +pc_false: +pci_err (pdev,"Unable to read/write to IOMMU perf counter.\n" ); + amd_iommu_pc_present = false; +return ; } static ssize_t amd_iommu_show_cap(struct device *dev,
drivers/iommu/intel-iommu.c +2 -1
@@ -5132,7 +5132,8 @@ static void dmar_remove_one_dev_info(struct device *dev)spin_lock_irqsave (&device_domain_lock, flags); info = dev->archdata.iommu; -if (info) +if (info && info !=DEFER_DEVICE_DOMAIN_INFO + && info !=DUMMY_DEVICE_DOMAIN_INFO )__dmar_remove_one_dev_info (info);spin_unlock_irqrestore (&device_domain_lock, flags); }
drivers/leds/leds-gpio.c +9 -1
@@ -151,9 +151,14 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev)struct gpio_led led = {};const char *state =NULL ; +/* +* Acquire gpiod from DT with uninitialized label, which +* will be updated after LED class device is registered, +* Only then the final LED name is known. +*/ led.gpiod =devm_fwnode_get_gpiod_from_child (dev,NULL , child,GPIOD_ASIS , - led.name); +NULL );if (IS_ERR (led.gpiod)) {fwnode_handle_put (child);return ERR_CAST (led.gpiod);
@@ -186,6 +191,9 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev)fwnode_handle_put (child);return ERR_PTR (ret); } +/* Set gpiod label to match the corresponding LED name. */ +gpiod_set_consumer_name (led_dat->gpiod, + led_dat->cdev.dev->kobj.name); priv->num_leds++; }
drivers/media/v4l2-core/v4l2-ioctl.c +12 -12
@@ -1605,12 +1605,12 @@ static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops,case V4L2_BUF_TYPE_VBI_CAPTURE :if (unlikely (!ops->vidioc_s_fmt_vbi_cap))break ; -CLEAR_AFTER_FIELD (p, fmt.vbi); +CLEAR_AFTER_FIELD (p, fmt.vbi.flags);return ops->vidioc_s_fmt_vbi_cap (file, fh, arg);case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE :if (unlikely (!ops->vidioc_s_fmt_sliced_vbi_cap))break ; -CLEAR_AFTER_FIELD (p, fmt.sliced); +CLEAR_AFTER_FIELD (p, fmt.sliced.io_size);return ops->vidioc_s_fmt_sliced_vbi_cap (file, fh, arg);case V4L2_BUF_TYPE_VIDEO_OUTPUT :if (unlikely (!ops->vidioc_s_fmt_vid_out))
@@ -1636,22 +1636,22 @@ static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops,case V4L2_BUF_TYPE_VBI_OUTPUT :if (unlikely (!ops->vidioc_s_fmt_vbi_out))break ; -CLEAR_AFTER_FIELD (p, fmt.vbi); +CLEAR_AFTER_FIELD (p, fmt.vbi.flags);return ops->vidioc_s_fmt_vbi_out (file, fh, arg);case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT :if (unlikely (!ops->vidioc_s_fmt_sliced_vbi_out))break ; -CLEAR_AFTER_FIELD (p, fmt.sliced); +CLEAR_AFTER_FIELD (p, fmt.sliced.io_size);return ops->vidioc_s_fmt_sliced_vbi_out (file, fh, arg);case V4L2_BUF_TYPE_SDR_CAPTURE :if (unlikely (!ops->vidioc_s_fmt_sdr_cap))break ; -CLEAR_AFTER_FIELD (p, fmt.sdr); +CLEAR_AFTER_FIELD (p, fmt.sdr.buffersize);return ops->vidioc_s_fmt_sdr_cap (file, fh, arg);case V4L2_BUF_TYPE_SDR_OUTPUT :if (unlikely (!ops->vidioc_s_fmt_sdr_out))break ; -CLEAR_AFTER_FIELD (p, fmt.sdr); +CLEAR_AFTER_FIELD (p, fmt.sdr.buffersize);return ops->vidioc_s_fmt_sdr_out (file, fh, arg);case V4L2_BUF_TYPE_META_CAPTURE :if (unlikely (!ops->vidioc_s_fmt_meta_cap))
@@ -1707,12 +1707,12 @@ static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops,case V4L2_BUF_TYPE_VBI_CAPTURE :if (unlikely (!ops->vidioc_try_fmt_vbi_cap))break ; -CLEAR_AFTER_FIELD (p, fmt.vbi); +CLEAR_AFTER_FIELD (p, fmt.vbi.flags);return ops->vidioc_try_fmt_vbi_cap (file, fh, arg);case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE :if (unlikely (!ops->vidioc_try_fmt_sliced_vbi_cap))break ; -CLEAR_AFTER_FIELD (p, fmt.sliced); +CLEAR_AFTER_FIELD (p, fmt.sliced.io_size);return ops->vidioc_try_fmt_sliced_vbi_cap (file, fh, arg);case V4L2_BUF_TYPE_VIDEO_OUTPUT :if (unlikely (!ops->vidioc_try_fmt_vid_out))
@@ -1738,22 +1738,22 @@ static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops,case V4L2_BUF_TYPE_VBI_OUTPUT :if (unlikely (!ops->vidioc_try_fmt_vbi_out))break ; -CLEAR_AFTER_FIELD (p, fmt.vbi); +CLEAR_AFTER_FIELD (p, fmt.vbi.flags);return ops->vidioc_try_fmt_vbi_out (file, fh, arg);case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT :if (unlikely (!ops->vidioc_try_fmt_sliced_vbi_out))break ; -CLEAR_AFTER_FIELD (p, fmt.sliced); +CLEAR_AFTER_FIELD (p, fmt.sliced.io_size);return ops->vidioc_try_fmt_sliced_vbi_out (file, fh, arg);case V4L2_BUF_TYPE_SDR_CAPTURE :if (unlikely (!ops->vidioc_try_fmt_sdr_cap))break ; -CLEAR_AFTER_FIELD (p, fmt.sdr); +CLEAR_AFTER_FIELD (p, fmt.sdr.buffersize);return ops->vidioc_try_fmt_sdr_cap (file, fh, arg);case V4L2_BUF_TYPE_SDR_OUTPUT :if (unlikely (!ops->vidioc_try_fmt_sdr_out))break ; -CLEAR_AFTER_FIELD (p, fmt.sdr); +CLEAR_AFTER_FIELD (p, fmt.sdr.buffersize);return ops->vidioc_try_fmt_sdr_out (file, fh, arg);case V4L2_BUF_TYPE_META_CAPTURE :if (unlikely (!ops->vidioc_try_fmt_meta_cap))
drivers/mmc/host/sdhci-tegra.c +1 -1
@@ -386,7 +386,7 @@ static void tegra_sdhci_reset(struct sdhci_host *host, u8 mask) misc_ctrl |=SDHCI_MISC_CTRL_ENABLE_DDR50 ;if (soc_data->nvquirks &NVQUIRK_ENABLE_SDR104 ) misc_ctrl |=SDHCI_MISC_CTRL_ENABLE_SDR104 ; -if (soc_data->nvquirks &SDHCI_MISC_CTRL_ENABLE_SDR50 ) +if (soc_data->nvquirks &NVQUIRK_ENABLE_SDR50 ) clk_ctrl |=SDHCI_CLOCK_CTRL_SDR50_TUNING_OVERRIDE ; }
drivers/mmc/host/sdhci.c +6 -4
@@ -3902,11 +3902,13 @@ int sdhci_setup_host(struct sdhci_host *host)if (host->ops->get_min_clock) mmc->f_min = host->ops->get_min_clock (host);else if (host->version >=SDHCI_SPEC_300 ) { -if (host->clk_mul) { - mmc->f_min = (host->max_clk * host->clk_mul) /1024 ; +if (host->clk_mul) max_clk = host->max_clk * host->clk_mul; - }else - mmc->f_min = host->max_clk /SDHCI_MAX_DIV_SPEC_300 ; +/* +* Divided Clock Mode minimum clock rate is always less than +* Programmable Clock Mode minimum clock rate. +*/ + mmc->f_min = host->max_clk /SDHCI_MAX_DIV_SPEC_300 ; }else mmc->f_min = host->max_clk /SDHCI_MAX_DIV_SPEC_200 ;
drivers/mmc/host/sdhci_am654.c +21 -6
@@ -236,6 +236,22 @@ static void sdhci_am654_write_b(struct sdhci_host *host, u8 val, int reg)writeb (val, host->ioaddr + reg); } +static int sdhci_am654_execute_tuning (struct mmc_host *mmc,u32 opcode) +{ +struct sdhci_host *host =mmc_priv (mmc); +int err =sdhci_execute_tuning (mmc, opcode); + +if (err) +return err; +/* +* Tuning data remains in the buffer after tuning. +* Do a command and data reset to get rid of it +*/ +sdhci_reset (host,SDHCI_RESET_CMD |SDHCI_RESET_DATA ); + +return 0 ; +} +static struct sdhci_ops sdhci_am654_ops = { .get_max_clock = sdhci_pltfm_clk_get_max_clock, .get_timeout_clock = sdhci_pltfm_clk_get_max_clock,
@@ -249,8 +265,7 @@ static struct sdhci_ops sdhci_am654_ops = {static const struct sdhci_pltfm_data sdhci_am654_pdata = { .ops = &sdhci_am654_ops, - .quirks =SDHCI_QUIRK_INVERTED_WRITE_PROTECT | -SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 , + .quirks =SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 , .quirks2 =SDHCI_QUIRK2_PRESET_VALUE_BROKEN , };
@@ -272,8 +287,7 @@ static struct sdhci_ops sdhci_j721e_8bit_ops = {static const struct sdhci_pltfm_data sdhci_j721e_8bit_pdata = { .ops = &sdhci_j721e_8bit_ops, - .quirks =SDHCI_QUIRK_INVERTED_WRITE_PROTECT | -SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 , + .quirks =SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 , .quirks2 =SDHCI_QUIRK2_PRESET_VALUE_BROKEN , };
@@ -295,8 +309,7 @@ static struct sdhci_ops sdhci_j721e_4bit_ops = {static const struct sdhci_pltfm_data sdhci_j721e_4bit_pdata = { .ops = &sdhci_j721e_4bit_ops, - .quirks =SDHCI_QUIRK_INVERTED_WRITE_PROTECT | -SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 , + .quirks =SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 , .quirks2 =SDHCI_QUIRK2_PRESET_VALUE_BROKEN , };
@@ -480,6 +493,8 @@ static int sdhci_am654_probe(struct platform_device *pdev) goto pm_runtime_put; } + host->mmc_host_ops.execute_tuning = sdhci_am654_execute_tuning; + ret =sdhci_am654_init (host);if (ret) goto pm_runtime_put;
drivers/net/can/slcan.c +10 -2
@@ -344,9 +344,16 @@ static void slcan_transmit(struct work_struct *work)*/ static void slcan_write_wakeup (struct tty_struct *tty) { -struct slcan *sl = tty->disc_data; +struct slcan *sl; + +rcu_read_lock (); + sl =rcu_dereference (tty->disc_data); +if (!sl) + goto out;schedule_work (&sl->tx_work); +out: +rcu_read_unlock (); }/* Send a can_frame to a TTY queue. */
@@ -644,10 +651,11 @@ static void slcan_close(struct tty_struct *tty)return ;spin_lock_bh (&sl->lock); - tty->disc_data =NULL ; +rcu_assign_pointer (tty->disc_data,NULL ); sl->tty =NULL ;spin_unlock_bh (&sl->lock); +synchronize_rcu ();flush_work (&sl->tx_work);/* Flush network side */
drivers/net/ethernet/broadcom/genet/bcmgenet.c +2 -2
@@ -2164,8 +2164,8 @@ static void bcmgenet_init_tx_ring(struct bcmgenet_priv *priv, DMA_END_ADDR);/* Initialize Tx NAPI */ -netif_napi_add (priv->dev, &ring->napi, bcmgenet_tx_poll, -NAPI_POLL_WEIGHT ); +netif_tx_napi_add (priv->dev, &ring->napi, bcmgenet_tx_poll, +NAPI_POLL_WEIGHT ); }/* Initialize a RDMA ring */
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +2 -0
@@ -2448,6 +2448,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)if (!is_offload (adapter))return -EOPNOTSUPP ; +if (!capable (CAP_NET_ADMIN )) +return -EPERM ;if (!(adapter->flags &FULL_INIT_DONE ))return -EIO ;/* need the memory controllers */ if (copy_from_user (&t, useraddr,sizeof (t)))
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c +29 -20
99 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +7 -2
@@ -3951,6 +3951,13 @@ static int apply_police_params(struct mlx5e_priv *priv, u32 rate,u32 rate_mbps;int err; + vport_num = rpriv->rep->vport; +if (vport_num >=MLX5_VPORT_ECPF ) { +NL_SET_ERR_MSG_MOD (extack, +"Ingress rate limit is supported only for Eswitch ports connected to VFs" ); +return -EOPNOTSUPP ; + } + esw = priv->mdev->priv.eswitch;/* rate is given in bytes/sec. * First convert to bits/sec and then round to the nearest mbit/secs.
@@ -3959,8 +3966,6 @@ static int apply_police_params(struct mlx5e_priv *priv, u32 rate,* 1 mbit/sec. */ rate_mbps = rate ?max_t (u32, (rate *8 +500000 ) /1000000 ,1 ) :0 ; - vport_num = rpriv->rep->vport; - err =mlx5_esw_modify_vport_rate (esw, vport_num, rate_mbps);if (err)NL_SET_ERR_MSG_MOD (extack,"failed applying action to hardware" );
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +1 -1
@@ -858,7 +858,7 @@ static int esw_add_fdb_miss_rule(struct mlx5_eswitch *esw)*/ #define ESW_SIZE (16 * 1024 * 1024)const unsigned int ESW_POOLS [4 ] = {4 *1024 *1024 ,1 *1024 *1024 , -64 *1024 ,4 *1024 }; +64 *1024 ,128 };static int get_sz_from_pool (struct mlx5_eswitch *esw)
drivers/net/ethernet/mellanox/mlx5/core/main.c +1 -0
@@ -1569,6 +1569,7 @@ static const struct pci_device_id mlx5_core_pci_table[] = { { PCI_VDEVICE(MELLANOX, 0x101d) }, /* ConnectX-6 Dx */ { PCI_VDEVICE(MELLANOX, 0x101e), MLX5_PCI_DEV_IS_VF}, /* ConnectX Family mlx5Gen Virtual Function */ { PCI_VDEVICE(MELLANOX, 0x101f) }, /* ConnectX-6 LX */ + { PCI_VDEVICE(MELLANOX, 0x1021) }, /* ConnectX-7 */ { PCI_VDEVICE(MELLANOX, 0xa2d2) }, /* BlueField integrated ConnectX-5 network controller */ { PCI_VDEVICE(MELLANOX, 0xa2d3), MLX5_PCI_DEV_IS_VF}, /* BlueField integrated ConnectX-5 network controller VF */ { PCI_VDEVICE(MELLANOX, 0xa2d6) }, /* BlueField-2 integrated ConnectX-6 Dx network controller */
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c +2 -1
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB /* Copyright (c) 2019 Mellanox Technologies. */ +#include <linux/smp.h> #include "dr_types.h" #define QUEUE_SIZE 128
@@ -729,7 +730,7 @@ static struct mlx5dr_cq *dr_create_cq(struct mlx5_core_dev *mdev,if (!in) goto err_cqwq; - vector =smp_processor_id () %mlx5_comp_vectors_count (mdev); + vector =raw_smp_processor_id () %mlx5_comp_vectors_count (mdev); err =mlx5_vector2eqn (mdev, vector, &eqn, &irqn);if (err) {kvfree (in);
drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c +29 -13
61 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c +12 -4
@@ -8,6 +8,7 @@#include <linux/string.h> #include <linux/rhashtable.h> #include <linux/netdevice.h> +#include <linux/mutex.h> #include <net/net_namespace.h> #include <net/tc_act/tc_vlan.h>
@@ -25,6 +26,7 @@ struct mlxsw_sp_acl {struct mlxsw_sp_fid *dummy_fid;struct rhashtable ruleset_ht;struct list_head rules; +struct mutex rules_lock;/* Protects rules list */ struct {struct delayed_work dw;unsigned long interval;/* ms */
@@ -701,7 +703,9 @@ int mlxsw_sp_acl_rule_add(struct mlxsw_sp *mlxsw_sp, goto err_ruleset_block_bind; } +mutex_lock (&mlxsw_sp->acl->rules_lock);list_add_tail (&rule->list, &mlxsw_sp->acl->rules); +mutex_unlock (&mlxsw_sp->acl->rules_lock); block->rule_count++; block->egress_blocker_rule_count += rule->rulei->egress_bind_blocker;return 0 ;
@@ -723,7 +727,9 @@ void mlxsw_sp_acl_rule_del(struct mlxsw_sp *mlxsw_sp, block->egress_blocker_rule_count -= rule->rulei->egress_bind_blocker; ruleset->ht_key.block->rule_count--; +mutex_lock (&mlxsw_sp->acl->rules_lock);list_del (&rule->list); +mutex_unlock (&mlxsw_sp->acl->rules_lock);if (!ruleset->ht_key.chain_index &&mlxsw_sp_acl_ruleset_is_singular (ruleset)) mlxsw_sp_acl_ruleset_block_unbind(mlxsw_sp, ruleset,
@@ -783,19 +789,18 @@ static int mlxsw_sp_acl_rules_activity_update(struct mlxsw_sp_acl *acl)struct mlxsw_sp_acl_rule *rule;int err; -/* Protect internal structures from changes */ -rtnl_lock (); +mutex_lock (&acl->rules_lock);list_for_each_entry (rule, &acl->rules, list) { err =mlxsw_sp_acl_rule_activity_update (acl->mlxsw_sp, rule);if (err) goto err_rule_update; } -rtnl_unlock (); +mutex_unlock (&acl->rules_lock);return 0 ; err_rule_update: -rtnl_unlock (); +mutex_unlock (&acl->rules_lock);return err; }
@@ -880,6 +885,7 @@ int mlxsw_sp_acl_init(struct mlxsw_sp *mlxsw_sp) acl->dummy_fid = fid;INIT_LIST_HEAD (&acl->rules); +mutex_init (&acl->rules_lock); err =mlxsw_sp_acl_tcam_init (mlxsw_sp, &acl->tcam);if (err) goto err_acl_ops_init;
@@ -892,6 +898,7 @@ int mlxsw_sp_acl_init(struct mlxsw_sp *mlxsw_sp)return 0 ; err_acl_ops_init: +mutex_destroy (&acl->rules_lock);mlxsw_sp_fid_put (fid); err_fid_get:rhashtable_destroy (&acl->ruleset_ht);
@@ -908,6 +915,7 @@ void mlxsw_sp_acl_fini(struct mlxsw_sp *mlxsw_sp)cancel_delayed_work_sync (&mlxsw_sp->acl->rule_activity_update.dw);mlxsw_sp_acl_tcam_fini (mlxsw_sp, &acl->tcam); +mutex_destroy (&acl->rules_lock);WARN_ON (!list_empty (&acl->rules));mlxsw_sp_fid_put (acl->dummy_fid);rhashtable_destroy (&acl->ruleset_ht);
drivers/net/ethernet/mellanox/mlxsw/switchx2.c +6 -11
@@ -299,22 +299,17 @@ static netdev_tx_t mlxsw_sx_port_xmit(struct sk_buff *skb,u64 len;int err; +if (skb_cow_head (skb,MLXSW_TXHDR_LEN )) { +this_cpu_inc (mlxsw_sx_port->pcpu_stats->tx_dropped); +dev_kfree_skb_any (skb); +return NETDEV_TX_OK ; + } +memset (skb->cb,0 ,sizeof (struct mlxsw_skb_cb ));if (mlxsw_core_skb_transmit_busy (mlxsw_sx->core, &tx_info))return NETDEV_TX_BUSY ; -if (unlikely (skb_headroom (skb) <MLXSW_TXHDR_LEN )) { -struct sk_buff *skb_orig = skb; - - skb =skb_realloc_headroom (skb,MLXSW_TXHDR_LEN ); -if (!skb) { -this_cpu_inc (mlxsw_sx_port->pcpu_stats->tx_dropped); -dev_kfree_skb_any (skb_orig); -return NETDEV_TX_OK ; - } -dev_consume_skb_any (skb_orig); - }mlxsw_sx_txhdr_construct (skb, &tx_info);/* TX header is consumed by HW on the way so we shouldn't count its * bytes as being sent.
drivers/net/ethernet/natsemi/sonic.c +230 -150
582 lines not on this page · raw message
drivers/net/ethernet/natsemi/sonic.h +32 -12
102 lines not on this page · raw message
drivers/net/gtp.c +6 -4
@@ -804,19 +804,21 @@ static struct sock *gtp_encap_enable_socket(int fd, int type,return NULL ; } -if (sock->sk->sk_protocol !=IPPROTO_UDP ) { + sk = sock->sk; +if (sk->sk_protocol !=IPPROTO_UDP || + sk->sk_type !=SOCK_DGRAM || + (sk->sk_family !=AF_INET && sk->sk_family !=AF_INET6 )) {pr_debug ("socket fd=%d not UDP\n" , fd); sk =ERR_PTR (-EINVAL ); goto out_sock; } -lock_sock (sock->sk); -if (sock->sk->sk_user_data) { +lock_sock (sk); +if (sk->sk_user_data) { sk =ERR_PTR (-EBUSY ); goto out_rel_sock; } - sk = sock->sk;sock_hold (sk); tuncfg.sk_user_data = gtp;
drivers/net/slip/slip.c +10 -2
@@ -452,9 +452,16 @@ static void slip_transmit(struct work_struct *work)*/ static void slip_write_wakeup (struct tty_struct *tty) { -struct slip *sl = tty->disc_data; +struct slip *sl; + +rcu_read_lock (); + sl =rcu_dereference (tty->disc_data); +if (!sl) + goto out;schedule_work (&sl->tx_work); +out: +rcu_read_unlock (); }static void sl_tx_timeout (struct net_device *dev)
@@ -882,10 +889,11 @@ static void slip_close(struct tty_struct *tty)return ;spin_lock_bh (&sl->lock); - tty->disc_data =NULL ; +rcu_assign_pointer (tty->disc_data,NULL ); sl->tty =NULL ;spin_unlock_bh (&sl->lock); +synchronize_rcu ();flush_work (&sl->tx_work);/* VSV = very important to remove timers */
drivers/net/tun.c +4 -0
@@ -1936,6 +1936,10 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,if (ret !=XDP_PASS ) {rcu_read_unlock ();local_bh_enable (); +if (frags) { + tfile->napi.skb =NULL ; +mutex_unlock (&tfile->napi_mutex); + }return total_len; } }
drivers/net/usb/lan78xx.c +15 -0
@@ -20,6 +20,7 @@#include <linux/mdio.h> #include <linux/phy.h> #include <net/ip6_checksum.h> +#include <net/vxlan.h> #include <linux/interrupt.h> #include <linux/irqdomain.h> #include <linux/irq.h>
@@ -3668,6 +3669,19 @@ static void lan78xx_tx_timeout(struct net_device *net)tasklet_schedule (&dev->bh); } +static netdev_features_t lan78xx_features_check (struct sk_buff *skb, +struct net_device *netdev, +netdev_features_t features) +{ +if (skb->len +TX_OVERHEAD >MAX_SINGLE_PACKET_SIZE ) + features &= ~NETIF_F_GSO_MASK ; + + features =vlan_features_check (skb, features); + features =vxlan_features_check (skb, features); + +return features; +} +static const struct net_device_ops lan78xx_netdev_ops = { .ndo_open = lan78xx_open, .ndo_stop = lan78xx_stop,
@@ -3681,6 +3695,7 @@ static const struct net_device_ops lan78xx_netdev_ops = { .ndo_set_features = lan78xx_set_features, .ndo_vlan_rx_add_vid = lan78xx_vlan_rx_add_vid, .ndo_vlan_rx_kill_vid = lan78xx_vlan_rx_kill_vid, + .ndo_features_check = lan78xx_features_check, };static void lan78xx_stat_monitor (struct timer_list *t)
drivers/net/wireless/cisco/airo.c +9 -11
@@ -7790,16 +7790,8 @@ static int readrids(struct net_device *dev, aironet_ioctl *comp) {case AIROGVLIST : ridcode =RID_APLIST ;break ;case AIROGDRVNAM : ridcode =RID_DRVNAME ;break ;case AIROGEHTENC : ridcode =RID_ETHERENCAP ;break ; -case AIROGWEPKTMP : ridcode =RID_WEP_TEMP ; -/* Only super-user can read WEP keys */ -if (!capable (CAP_NET_ADMIN )) -return -EPERM ; -break ; -case AIROGWEPKNV : ridcode =RID_WEP_PERM ; -/* Only super-user can read WEP keys */ -if (!capable (CAP_NET_ADMIN )) -return -EPERM ; -break ; +case AIROGWEPKTMP : ridcode =RID_WEP_TEMP ;break ; +case AIROGWEPKNV : ridcode =RID_WEP_PERM ;break ;case AIROGSTAT : ridcode =RID_STATUS ;break ;case AIROGSTATSD32 : ridcode =RID_STATSDELTA ;break ;case AIROGSTATSC32 : ridcode =RID_STATS ;break ;
@@ -7813,7 +7805,13 @@ static int readrids(struct net_device *dev, aironet_ioctl *comp) {return -EINVAL ; } -if ((iobuf =kmalloc (RIDSIZE ,GFP_KERNEL )) ==NULL ) +if (ridcode ==RID_WEP_TEMP || ridcode ==RID_WEP_PERM ) { +/* Only super-user can read WEP keys */ +if (!capable (CAP_NET_ADMIN )) +return -EPERM ; + } + +if ((iobuf =kzalloc (RIDSIZE ,GFP_KERNEL )) ==NULL )return -ENOMEM ;PC4500_readrid (ai,ridcode,iobuf,RIDSIZE ,1 );
drivers/net/wireless/intel/iwlwifi/mvm/constants.h +1 -0
@@ -154,5 +154,6 @@#define IWL_MVM_D3_DEBUG false#define IWL_MVM_USE_TWT false#define IWL_MVM_AMPDU_CONSEC_DROPS_DELBA 10 +#define IWL_MVM_USE_NSSN_SYNC 0#endif /* __MVM_CONSTANTS_H */
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +16 -12
@@ -742,6 +742,20 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)return ret; } +static void iwl_mvm_tx_skb (struct iwl_mvm *mvm,struct sk_buff *skb, +struct ieee80211_sta *sta) +{ +if (likely (sta)) { +if (likely (iwl_mvm_tx_skb_sta (mvm, skb, sta) ==0 )) +return ; + }else { +if (likely (iwl_mvm_tx_skb_non_sta (mvm, skb) ==0 )) +return ; + } + +ieee80211_free_txskb (mvm->hw, skb); +} +static void iwl_mvm_mac_tx (struct ieee80211_hw *hw,struct ieee80211_tx_control *control,struct sk_buff *skb)
@@ -785,14 +799,7 @@ static void iwl_mvm_mac_tx(struct ieee80211_hw *hw, } } -if (sta) { -if (iwl_mvm_tx_skb (mvm, skb, sta)) - goto drop; -return ; - } - -if (iwl_mvm_tx_skb_non_sta (mvm, skb)) - goto drop; +iwl_mvm_tx_skb (mvm, skb, sta);return ; drop:ieee80211_free_txskb (hw, skb);
@@ -842,10 +849,7 @@ void iwl_mvm_mac_itxq_xmit(struct ieee80211_hw *hw, struct ieee80211_txq *txq)break ; } -if (!txq->sta) -iwl_mvm_tx_skb_non_sta (mvm, skb); -else -iwl_mvm_tx_skb (mvm, skb, txq->sta); +iwl_mvm_tx_skb (mvm, skb, txq->sta); } }while (atomic_dec_return (&mvmtxq->tx_request));rcu_read_unlock ();
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +2 -2
@@ -1508,8 +1508,8 @@ int __must_check iwl_mvm_send_cmd_status(struct iwl_mvm *mvm,int __must_check iwl_mvm_send_cmd_pdu_status (struct iwl_mvm *mvm,u32 id,u16 len,const void *data,u32 *status); -int iwl_mvm_tx_skb (struct iwl_mvm *mvm,struct sk_buff *skb, -struct ieee80211_sta *sta); +int iwl_mvm_tx_skb_sta (struct iwl_mvm *mvm,struct sk_buff *skb, +struct ieee80211_sta *sta);int iwl_mvm_tx_skb_non_sta (struct iwl_mvm *mvm,struct sk_buff *skb); void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb, struct iwl_tx_cmd *tx_cmd,
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +11 -8
@@ -514,14 +514,17 @@ static bool iwl_mvm_is_sn_less(u16 sn1, u16 sn2, u16 buffer_size)static void iwl_mvm_sync_nssn (struct iwl_mvm *mvm,u8 baid,u16 nssn) { -struct iwl_mvm_rss_sync_notif notif = { - .metadata.type =IWL_MVM_RXQ_NSSN_SYNC , - .metadata.sync =0 , - .nssn_sync.baid = baid, - .nssn_sync.nssn = nssn, - }; - -iwl_mvm_sync_rx_queues_internal (mvm, (void *)¬if,sizeof (notif)); +if (IWL_MVM_USE_NSSN_SYNC ) { +struct iwl_mvm_rss_sync_notif notif = { + .metadata.type =IWL_MVM_RXQ_NSSN_SYNC , + .metadata.sync =0 , + .nssn_sync.baid = baid, + .nssn_sync.nssn = nssn, + }; + +iwl_mvm_sync_rx_queues_internal (mvm, (void *)¬if, +sizeof (notif)); + } }#define RX_REORDER_BUF_TIMEOUT_MQ (HZ / 10)
drivers/net/wireless/intel/iwlwifi/mvm/scan.c +1 -1
@@ -1220,7 +1220,7 @@ static int iwl_mvm_legacy_config_scan(struct iwl_mvm *mvm) cmd_size =sizeof (struct iwl_scan_config_v2 ); else cmd_size =sizeof (struct iwl_scan_config_v1 ); - cmd_size += num_channels; + cmd_size += mvm->fw->ucode_capa.n_scan_channels; cfg =kzalloc (cmd_size,GFP_KERNEL );if (!cfg)
drivers/net/wireless/intel/iwlwifi/mvm/tx.c +3 -3
@@ -1151,7 +1151,7 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb,if (WARN_ONCE (txq_id ==IWL_MVM_INVALID_QUEUE ,"Invalid TXQ id" )) {iwl_trans_free_tx_cmd (mvm->trans, dev_cmd);spin_unlock (&mvmsta->lock); -return 0 ; +return -1 ; }if (!iwl_mvm_has_new_tx_api (mvm)) {
@@ -1203,8 +1203,8 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb,return -1 ; } -int iwl_mvm_tx_skb (struct iwl_mvm *mvm,struct sk_buff *skb, -struct ieee80211_sta *sta) +int iwl_mvm_tx_skb_sta (struct iwl_mvm *mvm,struct sk_buff *skb, +struct ieee80211_sta *sta) {struct iwl_mvm_sta *mvmsta =iwl_mvm_sta_from_mac80211 (sta);struct ieee80211_tx_info info;
drivers/net/wireless/intel/iwlwifi/pcie/rx.c +2 -2
@@ -1537,13 +1537,13 @@ static void iwl_pcie_rx_handle(struct iwl_trans *trans, int queue) napi = &rxq->napi;if (napi->poll) { +napi_gro_flush (napi, false); +if (napi->rx_count) {netif_receive_skb_list (&napi->rx_list);INIT_LIST_HEAD (&napi->rx_list); napi->rx_count =0 ; } - -napi_gro_flush (napi, false); }iwl_pcie_rxq_restock (trans, rxq);
drivers/net/wireless/marvell/libertas/cfg.c +13 -3
@@ -273,6 +273,10 @@ add_ie_rates(u8 *tlv, const u8 *ie, int *nrates)int hw, ap, ap_max = ie[1 ];u8 hw_rate; +if (ap_max >MAX_RATES ) { +lbs_deb_assoc ("invalid rates\n" ); +return tlv; + }/* Advance past IE header */ ie +=2 ;
@@ -1717,6 +1721,9 @@ static int lbs_ibss_join_existing(struct lbs_private *priv,struct cmd_ds_802_11_ad_hoc_join cmd;u8 preamble =RADIO_PREAMBLE_SHORT ;int ret =0 ; +int hw, i; +u8 rates_max; +u8 *rates;/* TODO: set preamble based on scan result */ ret =lbs_set_radio (priv, preamble,1 );
@@ -1775,9 +1782,12 @@ static int lbs_ibss_join_existing(struct lbs_private *priv,if (!rates_eid) {lbs_add_rates (cmd.bss.rates); }else { -int hw, i; -u8 rates_max = rates_eid[1 ]; -u8 *rates = cmd.bss.rates; + rates_max = rates_eid[1 ]; +if (rates_max >MAX_RATES ) { +lbs_deb_join ("invalid rates" ); + goto out; + } + rates = cmd.bss.rates;for (hw =0 ; hw <ARRAY_SIZE (lbs_rates); hw++) {u8 hw_rate = lbs_rates[hw].bitrate /5 ;for (i =0 ; i < rates_max; i++) {
drivers/pci/quirks.c +13 -6
@@ -5021,18 +5021,25 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0422, quirk_no_ext_tags);#ifdef CONFIG_PCI_ATS /* -* Some devices have a broken ATS implementation causing IOMMU stalls. -* Don't use ATS for those devices. +* Some devices require additional driver setup to enable ATS. Don't use +* ATS for those devices as ATS will be enabled before the driver has had a +* chance to load and configure the device. */ -static void quirk_no_ats (struct pci_dev *pdev) +static void quirk_amd_harvest_no_ats (struct pci_dev *pdev) { -pci_info (pdev,"disabling ATS (broken on this device)\n" ); +if (pdev->device ==0x7340 && pdev->revision !=0xc5 ) +return ; + +pci_info (pdev,"disabling ATS\n" ); pdev->ats_cap =0 ; }/* AMD Stoney platform GPU */ -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x98e4 , quirk_no_ats); -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x6900 , quirk_no_ats); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x98e4 , quirk_amd_harvest_no_ats); +/* AMD Iceland dGPU */ +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x6900 , quirk_amd_harvest_no_ats); +/* AMD Navi14 dGPU */ +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x7340 , quirk_amd_harvest_no_ats);#endif /* CONFIG_PCI_ATS */ /* Freescale PCIe doesn't support MSI in RC mode */
drivers/pinctrl/intel/pinctrl-sunrisepoint.c +1 -0
@@ -49,6 +49,7 @@ .padown_offset = SPT_PAD_OWN, \ .padcfglock_offset = SPT_PADCFGLOCK, \ .hostown_offset = SPT_HOSTSW_OWN, \ + .is_offset = SPT_GPI_IS, \ .ie_offset = SPT_GPI_IE, \ .pin_base = (s), \ .npins = ((e) - (s) + 1), \
drivers/target/iscsi/iscsi_target.c +3 -3
@@ -4151,9 +4151,6 @@ int iscsit_close_connection(iscsit_stop_nopin_response_timer (conn);iscsit_stop_nopin_timer (conn); -if (conn->conn_transport->iscsit_wait_conn) - conn->conn_transport->iscsit_wait_conn (conn); -/* * During Connection recovery drop unacknowledged out of order * commands for this connection, and prepare the other commands
@@ -4239,6 +4236,9 @@ int iscsit_close_connection(target_sess_cmd_list_set_waiting (sess->se_sess);target_wait_for_sess_cmds (sess->se_sess); +if (conn->conn_transport->iscsit_wait_conn) + conn->conn_transport->iscsit_wait_conn (conn); +ahash_request_free (conn->conn_tx_hash);if (conn->conn_rx_hash) {struct crypto_ahash *tfm;
fs/afs/cell.c +10 -1
@@ -134,8 +134,17 @@ static struct afs_cell *afs_alloc_cell(struct afs_net *net,_leave (" = -ENAMETOOLONG" );return ERR_PTR (-ENAMETOOLONG ); } -if (namelen ==5 &&memcmp (name,"@cell" ,5 ) ==0 ) + +/* Prohibit cell names that contain unprintable chars, '/' and '@' or +* that begin with a dot. This also precludes "@cell". +*/ +if (name[0 ] =='.' )return ERR_PTR (-EINVAL ); +for (i =0 ; i < namelen; i++) { +char ch = name[i]; +if (!isprint (ch) || ch =='/' || ch =='@' ) +return ERR_PTR (-EINVAL ); + }_enter ("%*.*s,%s" , namelen, namelen, name, addresses);
fs/ceph/mds_client.c +6 -2
@@ -708,8 +708,10 @@ void ceph_mdsc_release_request(struct kref *kref)/* avoid calling iput_final() in mds dispatch threads */ ceph_async_iput (req->r_inode); } -if (req->r_parent) +if (req->r_parent) {ceph_put_cap_refs (ceph_inode (req->r_parent),CEPH_CAP_PIN ); +ceph_async_iput (req->r_parent); + }ceph_async_iput (req->r_target_inode);if (req->r_dentry)dput (req->r_dentry);
@@ -2670,8 +2672,10 @@ int ceph_mdsc_submit_request(struct ceph_mds_client *mdsc, struct inode *dir,/* take CAP_PIN refs for r_inode, r_parent, r_old_dentry */ if (req->r_inode)ceph_get_cap_refs (ceph_inode (req->r_inode),CEPH_CAP_PIN ); -if (req->r_parent) +if (req->r_parent) {ceph_get_cap_refs (ceph_inode (req->r_parent),CEPH_CAP_PIN ); +ihold (req->r_parent); + }if (req->r_old_dentry_dir)ceph_get_cap_refs (ceph_inode (req->r_old_dentry_dir),CEPH_CAP_PIN );
fs/io_uring.c +0 -6
@@ -3716,12 +3716,6 @@ SYSCALL_DEFINE6(io_uring_enter, unsigned int, fd, u32, to_submit,wake_up (&ctx->sqo_wait); submitted = to_submit; }else if (to_submit) { -if (current->mm != ctx->sqo_mm || -current_cred () != ctx->creds) { - ret = -EPERM ; - goto out; - } - to_submit =min (to_submit, ctx->sq_entries);mutex_lock (&ctx->uring_lock);
fs/namei.c +10 -7
@@ -1001,7 +1001,8 @@ static int may_linkat(struct path *link)* may_create_in_sticky - Check whether an O_CREAT open in a sticky directory * should be allowed, or not, on files that already * exist. -* @dir: the sticky parent directory +* @dir_mode: mode bits of directory +* @dir_uid: owner of directory * @inode: the inode of the file to open * * Block an O_CREAT open of a FIFO (or a regular file) when:
@@ -1017,18 +1018,18 @@ static int may_linkat(struct path *link)*
Lines of this file are not shown. View the raw message.
fs/readdir.c +40 -39
79 lines not on this page · raw message
kernel/trace/trace_events_hist.c +52 -11
63 lines not on this page · raw message
kernel/trace/trace_uprobe.c +80 -44
124 lines not on this page · raw message
lib/test_xarray.c +42 -14
56 lines not on this page · raw message
net/core/dev.c +55 -42
97 lines not on this page · raw message
net/netfilter/ipset/ip_set_bitmap_gen.h +1 -1
Lines of this file are not shown. View the raw message.
net/netfilter/ipset/ip_set_bitmap_ipmac.c +3 -3
Lines of this file are not shown. View the raw message.
net/netfilter/ipset/ip_set_bitmap_port.c +3 -3
Lines of this file are not shown. View the raw message.
net/netfilter/nf_tables_api.c +107 -48
155 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.