Commit graph

903,363 commits

Author SHA1 Message Date
Greg Kroah-Hartman
43bbe91c9f Revert "geneve: make sure to pull inner header in geneve_rx()"
This reverts commit 59d2a40769 which is
commit 1ca1ba465e55b9460e4e75dec9fff31e708fec74 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: I2b2aff69a954b1ed5f1218aa043be79b1cac0bb0
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-04-16 08:16:22 +00:00
Greg Kroah-Hartman
ee2f1c68f1 Merge 5.4.272 into android11-5.4-lts
Changes in 5.4.272
	lan78xx: Fix white space and style issues
	lan78xx: Add missing return code checks
	lan78xx: Fix partial packet errors on suspend/resume
	lan78xx: Fix race conditions in suspend/resume handling
	net: lan78xx: fix runtime PM count underflow on link stop
	ixgbe: {dis, en}able irqs in ixgbe_txrx_ring_{dis, en}able
	geneve: make sure to pull inner header in geneve_rx()
	net: ice: Fix potential NULL pointer dereference in ice_bridge_setlink()
	net/ipv6: avoid possible UAF in ip6_route_mpath_notify()
	net/rds: fix WARNING in rds_conn_connect_if_down
	netfilter: nft_ct: fix l3num expectations with inet pseudo family
	netfilter: nf_conntrack_h323: Add protection for bmp length out of range
	netrom: Fix a data-race around sysctl_netrom_default_path_quality
	netrom: Fix a data-race around sysctl_netrom_obsolescence_count_initialiser
	netrom: Fix data-races around sysctl_netrom_network_ttl_initialiser
	netrom: Fix a data-race around sysctl_netrom_transport_timeout
	netrom: Fix a data-race around sysctl_netrom_transport_maximum_tries
	netrom: Fix a data-race around sysctl_netrom_transport_acknowledge_delay
	netrom: Fix a data-race around sysctl_netrom_transport_busy_delay
	netrom: Fix a data-race around sysctl_netrom_transport_requested_window_size
	netrom: Fix a data-race around sysctl_netrom_transport_no_activity_timeout
	netrom: Fix a data-race around sysctl_netrom_routing_control
	netrom: Fix a data-race around sysctl_netrom_link_fails_count
	netrom: Fix data-races around sysctl_net_busy_read
	selftests: mm: fix map_hugetlb failure on 64K page size systems
	um: allow not setting extra rpaths in the linux binary
	serial: max310x: Use devm_clk_get_optional() to get the input clock
	serial: max310x: Try to get crystal clock rate from property
	serial: max310x: fail probe if clock crystal is unstable
	serial: max310x: Make use of device properties
	serial: max310x: use regmap methods for SPI batch operations
	serial: max310x: use a separate regmap for each port
	serial: max310x: prevent infinite while() loop in port startup
	Input: i8042 - fix strange behavior of touchpad on Clevo NS70PU
	hv_netvsc: Make netvsc/VF binding check both MAC and serial number
	hv_netvsc: use netif_is_bond_master() instead of open code
	hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed
	y2038: rusage: use __kernel_old_timeval
	getrusage: add the "signal_struct *sig" local variable
	getrusage: move thread_group_cputime_adjusted() outside of lock_task_sighand()
	getrusage: use __for_each_thread()
	getrusage: use sig->stats_lock rather than lock_task_sighand()
	serial: max310x: Unprepare and disable clock in error path
	regmap: allow to define reg_update_bits for no bus configuration
	regmap: Add bulk read/write callbacks into regmap_config
	serial: max310x: make accessing revision id interface-agnostic
	serial: max310x: implement I2C support
	serial: max310x: fix IO data corruption in batched operations
	arm64: dts: qcom: add PDC interrupt controller for SDM845
	arm64: dts: qcom: sdm845: fix USB DP/DM HS PHY interrupts
	Linux 5.4.272

Change-Id: Ia3f453dd3f080776d3fdd46b1ea58c6554a70fd6
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-04-05 12:37:33 +00:00
Greg Kroah-Hartman
79ed7de671 Merge branch 'android11-5.4' into branch 'android11-5.4-lts'
This brings it up to date with recent changes.  Included in here are the
following commits:

* 7570ec5696 Merge tag 'android11-5.4.268_r00' into android11-5.4
* b558f0cc4d BACKPORT: f2fs: expose # of overprivision segments
* ffb0cc5261 ANDROID: GKI: Update symbol list for Zebra
* d24801ee88 ANDROID: GKI: Update symbol list for Zebra
* 26423f6f2f UPSTREAM: usb: raw-gadget: properly handle interrupted requests
* 1306a39bd6 UPSTREAM: net: prevent skb corruption on frag list segmentation
* 502693befb UPSTREAM: netfilter: nft_set_rbtree: skip end interval element from gc

ABI updated with the following changes based on what happened in the
non-LTS branch:

'struct usb_role_switch at class.c:19:1' changed:
  type size hasn't changed
  1 data member insertion:
    'bool registered', at offset 7648 (in bits) at class.c:23:1
  15 impacted interfaces

Change-Id: I39c39d09a51f1995e938ad12a77bc292d78f310d
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-03-28 14:08:53 +00:00
Greg Kroah-Hartman
7570ec5696 Merge tag 'android11-5.4.268_r00' into android11-5.4
This merges up to the 5.4.268 LTS release into the android11-5.4 branch.
included in here are the following commits:

* 8eb6062606 ANDROID: GKI: db845c: Update symbols list and ABI
*   5400c339e0 Merge "Merge branch 'android11-5.4' into branch 'android11-5.4-lts'" into android11-5.4-lts
|\
| * 16a567b6c7 Merge branch 'android11-5.4' into branch 'android11-5.4-lts'
* | c980fbd6a6 UPSTREAM: drm/msm/dsi: Enable runtime PM
* | 7c607fec96 UPSTREAM: PM: runtime: Have devm_pm_runtime_enable() handle pm_runtime_dont_use_autosuspend()
* | f9f96d9da7 UPSTREAM: PM: runtime: add devm_pm_runtime_enable helper
|/
* b70f9975af FROMGIT: clk: qcom: gcc-sdm845: Add soft dependency on rpmhpd
*   74299cb130 Merge 5.4.268 into android11-5.4-lts
|\
| * f0602893f4 Linux 5.4.268
| * 5ff9836ab0 arm64: dts: armada-3720-turris-mox: set irq type for RTC
| * 300a55a3a6 perf top: Skip side-band event setup if HAVE_LIBBPF_SUPPORT is not set
| * ea5587946a i2c: s3c24xx: fix transferring more than one message in polling mode
| * 90734f1cde i2c: s3c24xx: fix read transfers in polling mode
| * 05b6d0234a mlxsw: spectrum_acl_erp: Fix error flow of pool allocation failure
| * d5661f46c1 kdb: Fix a potential buffer overflow in kdb_local()
| * cf6260a34d kdb: Censor attempts to set PROMPT without ENABLE_MEM_READ
| * 36b6db699c ipvs: avoid stat macros calls from preemptible context
| * 4c8a827d68 netfilter: nf_tables: skip dead set elements in netlink dump
| * db9fda526c net: dsa: vsc73xx: Add null pointer check to vsc73xx_gpio_probe
| * 8efe3e8a6c net: ravb: Fix dma_addr_t truncation in error case
| * f7a153e3ac net: phy: micrel: populate .soft_reset for KSZ9131
| * 02467ab8b4 net: qualcomm: rmnet: fix global oob in rmnet_policy
| * 5b58cfcd4c s390/pci: fix max size calculation in zpci_memcpy_toio()
| * 14a7e3a0d0 PCI: keystone: Fix race condition when initializing PHYs
| * 40d171ef23 nvmet-tcp: Fix the H2C expected PDU len calculation
| * 258dccd67b serial: imx: Correct clock error message in function probe()
| * 1d8e62b556 apparmor: avoid crash when parsed profile name is empty
| * 4cd5db4fc4 perf env: Avoid recursively taking env->bpf_progs.lock
| * f19a1cb1f9 perf bpf: Decouple creating the evlist from adding the SB event
| * 739b800279 perf top: Move sb_evlist to 'struct perf_top'
| * 2d59b6ed99 perf record: Move sb_evlist to 'struct record'
| * 14a9769a76 perf env: Add perf_env__numa_node()
| * 9638beb4e1 nvmet-tcp: fix a crash in nvmet_req_complete()
| * ee5e7632e9 nvmet-tcp: Fix a kernel panic when host sends an invalid H2C PDU length
| * 887ab0a444 perf genelf: Set ELF program header addresses properly
| * ed903eeb4e software node: Let args be NULL in software_node_get_reference_args
| * dbb71ba531 acpi: property: Let args be NULL in __acpi_node_get_property_reference
| * b502fb43f7 serial: 8250: omap: Don't skip resource freeing if pm_runtime_resume_and_get() failed
| * d8003fdcc6 MIPS: Alchemy: Fix an out-of-bound access in db1550_dev_setup()
| * 93a7b8d433 MIPS: Alchemy: Fix an out-of-bound access in db1200_dev_setup()
| * fa873e9030 mips: Fix incorrect max_low_pfn adjustment
| * b419fe1180 HID: wacom: Correct behavior when processing some confidence == false touches
| * f7a92bec8e x86/kvm: Do not try to disable kvmclock if it was not enabled
| * 1d6d95aaa6 wifi: mwifiex: configure BSSID consistently when starting AP
| * 249b78dbb1 wifi: rtlwifi: Convert LNKCTL change to PCIe cap RMW accessors
| * c22b4f159b wifi: rtlwifi: Remove bogus and dangerous ASPM disable/enable code
| * b33a303588 rootfs: Fix support for rootfstype= when root= is given
| * 02bd78673b fbdev: flush deferred work in fb_deferred_io_fsync()
| * 7cfc97d1ec ALSA: oxygen: Fix right channel of capture volume mixer
| * 85f6a6590d usb: mon: Fix atomicity violation in mon_bin_vma_fault
| * 14e60d584a usb: typec: class: fix typec_altmode_put_partner to put plugs
| * 94f2aa8145 Revert "usb: typec: class: fix typec_altmode_put_partner to put plugs"
| * a05ebd5779 usb: chipidea: wait controller resume finished for wakeup irq
| * d9c8275c59 Revert "usb: dwc3: don't reset device side if dwc3 was configured as host-only"
| * 548a00780d Revert "usb: dwc3: Soft reset phy on probe for host"
| * c145217af8 usb: dwc: ep0: Update request status in dwc3_ep0_stall_restart
| * 5d5d982701 usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host()
| * 29032c8e3e tick-sched: Fix idle and iowait sleeptime accounting vs CPU hotplug
| * 5c3d4930c7 binder: fix unused alloc->free_async_space
| * 252a2a5569 binder: fix race between mmput() and do_exit()
| * 4404c2b832 xen-netback: don't produce zero-size SKB frags
| * ee4e9c5fff Revert "ASoC: atmel: Remove system clock tree configuration for at91sam9g20ek"
| * 01fe1b7bb0 Input: atkbd - use ab83 as id when skipping the getid command
| * a53e15e592 binder: fix use-after-free in shinker's callback
| * fc1119a3c6 binder: fix async space check for 0-sized buffers
| * 1b7c039260 of: unittest: Fix of_count_phandle_with_args() expected value message
| * a0a061151a of: Fix double free in of_parse_phandle_with_args_map
| * a9de8a4f52 mmc: sdhci_omap: Fix TI SoC dependencies
| * b8bbe33544 clk: si5341: fix an error code problem in si5341_output_clk_set_rate
| * 4810cce029 watchdog: bcm2835_wdt: Fix WDIOC_SETTIMEOUT handling
| * 11a64041d9 watchdog/hpwdt: Only claim UNKNOWN NMI if from iLO
| * 0d5685c13d watchdog: set cdev owner before adding
| * 777aa44f63 drivers: clk: zynqmp: calculate closest mux rate
| * 5a572eb32f gpu/drm/radeon: fix two memleaks in radeon_vm_init
| * 8b55b06e73 drivers/amd/pm: fix a use-after-free in kv_parse_power_table
| * 06d95c99d5 drm/amd/pm: fix a double-free in si_dpm_init
| * 8ee1fb4c51 drm/amdgpu/debugfs: fix error code when smc register accessors are NULL
| * 68ec0a0211 media: dvbdev: drop refcount on error path in dvb_device_open()
| * 06a9263ac9 media: cx231xx: fix a memleak in cx231xx_init_isoc
| * 6a421928f7 drm/bridge: tc358767: Fix return value on error case
| * d46fe2e93e drm/radeon/trinity_dpm: fix a memleak in trinity_parse_power_table
| * c0769f091f drm/radeon/dpm: fix a memleak in sumo_parse_power_table
| * 5d12c5d75f drm/radeon: check the alloc_workqueue return value in radeon_crtc_init()
| * 09d59f73f4 drm/drv: propagate errors from drm_modeset_register_all()
| * 31b169a8be drm/msm/dsi: Use pm_runtime_resume_and_get to prevent refcnt leaks
| * 9170aa07cb drm/msm/mdp4: flush vblank event on disable
| * 136f919816 ASoC: cs35l34: Fix GPIO name and drop legacy include
| * 86af5d7acf ASoC: cs35l33: Fix GPIO name and drop legacy include
| * 94aa82723a drm/radeon: check return value of radeon_ring_lock()
| * bf48d89123 drm/radeon/r100: Fix integer overflow issues in r100_cs_track_check()
| * 8e5bcb781f drm/radeon/r600_cs: Fix possible int overflows in r600_cs_check_reg()
| * 5624a3c1b1 f2fs: fix to avoid dirent corruption
| * b083ec00f3 drm/bridge: Fix typo in post_disable() description
| * 47aa8fcd5e media: pvrusb2: fix use after free on context disconnection
| * f6a35c21cd RDMA/usnic: Silence uninitialized symbol smatch warnings
| * 9bb9775217 ARM: davinci: always select CONFIG_CPU_ARM926T
| * 3f15ba3dc1 ip6_tunnel: fix NEXTHDR_FRAGMENT handling in ip6_tnl_parse_tlv_enc_lim()
| * dcc9cd5ddb Bluetooth: btmtkuart: fix recv_buf() return value
| * efcfcd5f2b Bluetooth: Fix bogus check for re-auth no supported with non-ssp
| * 598c902649 netfilter: nf_tables: mark newset as dead on transaction abort
| * 8dbaaf71ff wifi: rtlwifi: rtl8192se: using calculate_bit_shift()
| * 8fa54f7532 wifi: rtlwifi: rtl8192ee: using calculate_bit_shift()
| * 4838d16666 wifi: rtlwifi: rtl8192de: using calculate_bit_shift()
| * e15fcb1945 rtlwifi: rtl8192de: make arrays static const, makes object smaller
| * ae1df4cc0a wifi: rtlwifi: rtl8192ce: using calculate_bit_shift()
| * a3a25b5d01 wifi: rtlwifi: rtl8192cu: using calculate_bit_shift()
| * 6f84a338ed wifi: rtlwifi: rtl8192c: using calculate_bit_shift()
| * ee0a81cf7e wifi: rtlwifi: rtl8188ee: phy: using calculate_bit_shift()
| * 7cbcf5fe01 wifi: rtlwifi: add calculate_bit_shift()
| * 4985e507e0 dma-mapping: clear dev->dma_mem to NULL after freeing it
| * 48614d528b virtio/vsock: fix logic which reduces credit update messages
| * 332cd73a92 selftests/net: fix grep checking for fib_nexthop_multiprefix
| * 12b91f3636 scsi: hisi_sas: Replace with standard error code return value
| * 14470da02d arm64: dts: qcom: sdm845-db845c: correct LED panic indicator
| * c23c4984ce scsi: fnic: Return error if vmalloc() failed
| * 16d21bfcb3 wifi: rtlwifi: rtl8821ae: phy: fix an undefined bitwise shift behavior
| * 4a20fa7322 rtlwifi: Use ffs in <foo>_phy_calculate_bit_shift
| * 0226926ba3 firmware: ti_sci: Fix an off-by-one in ti_sci_debugfs_create()
| * ef75f3c56b net/ncsi: Fix netlink major/minor version numbers
| * 7276fac0a6 ncsi: internal.h: Fix a spello
| * f6154d4983 ARM: dts: qcom: apq8064: correct XOADC register address
| * bd1bf5e805 wifi: libertas: stop selecting wext
| * dc843ed97d bpf, lpm: Fix check prefixlen before walking trie
| * 93c71706a1 wifi: rtw88: fix RX filter in FIF_ALLMULTI flag
| * aebe7e47c2 NFSv4.1/pnfs: Ensure we handle the error NFS4ERR_RETURNCONFLICT
| * db55dbbba5 blocklayoutdriver: Fix reference leak of pnfs_device_node
| * e0e3f4a187 crypto: scomp - fix req->dst buffer overflow
| * 77d2b18336 crypto: sahara - do not resize req->src when doing hash operations
| * 53ba86f765 crypto: sahara - fix processing hash requests with req->nbytes < sg->length
| * ba1ef4276e crypto: sahara - improve error handling in sahara_sha_process()
| * 0274697075 crypto: sahara - fix wait_for_completion_timeout() error handling
| * b588ed190b crypto: sahara - fix ahash reqsize
| * aea92cca43 crypto: virtio - Wait for tasklet to complete on device remove
| * efc8ef87ab gfs2: Fix kernel NULL pointer dereference in gfs2_rgrp_dump
| * d1fe1aede6 pstore: ram_core: fix possible overflow in persistent_ram_init_ecc()
| * 6e907574ef crypto: sahara - fix error handling in sahara_hw_descriptor_create()
| * e82d07d5c7 crypto: sahara - fix processing requests with cryptlen < sg->length
| * da43c26203 crypto: sahara - fix ahash selftest failure
| * beb815a000 crypto: sahara - remove FLAGS_NEW_KEY logic
| * 4c10928e31 crypto: af_alg - Disallow multiple in-flight AIO requests
| * ca3484d5ca crypto: ccp - fix memleak in ccp_init_dm_workarea
| * 9fffae6cc4 virtio_crypto: Introduce VIRTIO_CRYPTO_NOSPC
| * 01081d76cc crypto: virtio - don't use 'default m'
| * 830a4f073f crypto: virtio - Handle dataq logic with tasklet
| * 86a7c9ba83 selinux: Fix error priority for bind with AF_UNSPEC on PF_INET6 socket
| * 1bf4fe14e9 mtd: Fix gluebi NULL pointer dereference caused by ftl notifier
| * 6b84cb9e38 spi: sh-msiof: Enforce fixed DTDL for R-Car H3
| * 36e19f8463 calipso: fix memory leak in netlbl_calipso_add_pass()
| * 0396c1e211 netlabel: remove unused parameter in netlbl_netlink_auditinfo()
| * 7b99eafea0 net: netlabel: Fix kerneldoc warnings
| * 6c38e791bd ACPI: LPIT: Avoid u32 multiplication overflow
| * 1e3a2b9b40 ACPI: video: check for error while searching for backlight device parent
| * f5ea2cf3bb mtd: rawnand: Increment IFC_TIMEOUT_MSECS for nand controller response
| * 1e80aa25d1 powerpc/imc-pmu: Add a null pointer check in update_events_in_group()
| * 9da4a56dd3 powerpc/powernv: Add a null pointer check in opal_powercap_init()
| * e93d7cf4c1 powerpc/powernv: Add a null pointer check in opal_event_init()
| * f84c1446da powerpc/powernv: Add a null pointer check to scom_debug_init_one()
| * b0200560b6 selftests/powerpc: Fix error handling in FPU/VMX preemption tests
| * 9b5f03500b powerpc/pseries/memhp: Fix access beyond end of drmem array
| * 69c0b92f78 powerpc/pseries/memhotplug: Quieten some DLPAR operations
| * 5401b689ad powerpc/44x: select I2C for CURRITUCK
| * 245da9eebb powerpc: add crtsavres.o to always-y instead of extra-y
| * 5da3b6e719 EDAC/thunderx: Fix possible out-of-bounds string access
| * 555a2f09a6 x86/lib: Fix overflow when counting digits
| * 6ee48d7102 coresight: etm4x: Fix width of CCITMIN field
| * b00d5f7152 parport: parport_serial: Add Brainboxes device IDs and geometry
| * 760a5ab4d8 parport: parport_serial: Add Brainboxes BAR details
| * e93da893d5 uio: Fix use-after-free in uio_open
| * da488e1aad binder: fix comment on binder_alloc_new_buf() return value
| * a92b2797ca binder: fix trivial typo of binder_free_buf_locked()
| * 9774dabad7 binder: use EPOLLERR from eventpoll.h
| * 5e1eb0dfc9 ACPI: resource: Add another DMI match for the TongFang GMxXGxx
| * c5b0517500 drm/crtc: fix uninitialized variable use
| * cfc6afe930 ARM: sun9i: smp: fix return code check of of_property_match_string
| * ef7152f870 ida: Fix crash in ida_free when the bitmap is empty
| * c97996451f Input: xpad - add Razer Wolverine V2 support
| * 510a7bc368 ARC: fix spare error
| * 0fe6431622 s390/scm: fix virtual vs physical address confusion
| * 8fb5795bcf Input: i8042 - add nomux quirk for Acer P459-G2-M
| * 2c70bf9978 Input: atkbd - skip ATKBD_CMD_GETID in translated mode
| * 3d9a9c0881 reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning
| * 4f7512e779 ring-buffer: Do not record in NMI if the arch does not support cmpxchg in NMI
| * e405c22ee5 tracing: Add size check when printing trace_marker output
| * f787481af4 tracing: Have large events show up as '[LINE TOO BIG]' instead of nothing
| * d4408ffeb8 neighbour: Don't let neigh_forced_gc() disable preemption for long
| * 9cc9683aec drm/crtc: Fix uninit-value bug in drm_mode_setcrtc
| * 2f601e8696 jbd2: correct the printing of write_flags in jbd2_write_superblock()
| * 1c187cb210 clk: rockchip: rk3128: Fix HCLK_OTG gate register
| * 3f50a73fd9 drm/exynos: fix a wrong error checking
| * 8bc21ac17d drm/exynos: fix a potential error pointer dereference
| * 6eb9759328 nvme: introduce helper function to get ctrl state
| * 971c0b10c9 ASoC: da7219: Support low DC impedance headset
| * ec76b9e057 net/tg3: fix race condition in tg3_reset_task()
| * ef9fefca3f nouveau/tu102: flush all pdbs on vmm flush
| * b67005b284 ASoC: rt5650: add mutex to avoid the jack detection failure
| * 4fece6617b ASoC: cs43130: Fix incorrect frame delay configuration
| * 1bf33a67a9 ASoC: cs43130: Fix the position of const qualifier
| * 61c1e46fb8 ASoC: Intel: Skylake: mem leak in skl register function
| * 81610106fd ASoC: nau8822: Fix incorrect type in assignment and cast to restricted __be16
| * ad5a06e163 ASoC: Intel: Skylake: Fix mem leak in few functions
| * 57a95d06da ALSA: hda - Fix speaker and headset mic pin config for CHUWI CoreBook XPro
| * ebc3c8e090 pinctrl: lochnagar: Don't build on MIPS
| * 12cf91e23b f2fs: explicitly null-terminate the xattr list
* | 5826ec2af1 Revert "ipv6: make ip6_rt_gc_expire an atomic_t"
* | fa82780056 Revert "ipv6: remove max_size check inline with ipv4"
* |   bc9b1af36e Merge "Merge 5.4.267 into android11-5.4-lts" into android11-5.4-lts
|\ \
| * | ac7d08f396 Merge 5.4.267 into android11-5.4-lts
| |\|
| | * 9153fc9664 Linux 5.4.267
| | * 69ef165176 ASoC: meson: codec-glue: fix pcm format cast warning
| | * 584756c3d7 ipv6: remove max_size check inline with ipv4
| | * 66b3025202 ipv6: make ip6_rt_gc_expire an atomic_t
| | * ae424c848d net/dst: use a smaller percpu_counter batch for dst entries accounting
| | * 7b3a9c2bf3 PCI: Disable ATS for specific Intel IPU E2000 devices
| | * c6141c49bc PCI: Extract ATS disabling to a helper function
| | * 8711fa0c06 netfilter: nf_tables: Reject tables of unsupported family
| | * c67bf30baf net: tls, update curr on splice as well
| | * c2d9b43855 ath10k: Get rid of "per_ce_irq" hw param
| | * d15f869cb3 ath10k: Keep track of which interrupts fired, don't poll them
| | * 696b992edc ath10k: Add interrupt summary based CE processing
| | * 366df9ecbc ath10k: Wait until copy complete is actually done before completing
| | * c4541e3980 mmc: sdhci-sprd: Fix eMMC init failure after hw reset
| | * a9c9ffcd21 mmc: core: Cancel delayed work before releasing host
| | * bfc3720ca8 mmc: rpmb: fixes pause retune on all RPMB partitions.
| | * 77359c4973 mm: fix unmap_mapping_range high bits shift bug
| | * 5af5e946c4 i2c: core: Fix atomic xfer check for non-preempt config
| | * d8ec24d79d firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards
| | * 85015a96bc mm/memory-failure: check the mapcount of the precise page
| | * 3d8fab93ca net: Implement missing SO_TIMESTAMPING_NEW cmsg support
| | * f7084217d9 bnxt_en: Remove mis-applied code from bnxt_cfg_ntp_filters()
| | * acfeb9039b asix: Add check for usbnet_get_endpoints
| | * 6c00721ad7 net/qla3xxx: fix potential memleak in ql_alloc_buffer_queues
| | * a4ea54c528 net/qla3xxx: switch from 'pci_' to 'dma_' API
| | * 863ca421b4 i40e: Restore VF MSI-X state during PCI reset
| | * 01c2d73ae2 ASoC: meson: g12a-tohdmitx: Fix event generation for S/PDIF mux
| | * bdc00b8c3a ASoC: meson: g12a-tohdmitx: Validate written enum values
| | * fe2d1dda1d ASoC: meson: g12a: extract codec-to-codec utils
| | * 93d80aadc0 i40e: fix use-after-free in i40e_aqc_add_filters()
| | * b40828a2ab net: Save and restore msg_namelen in sock_sendmsg
| | * 68c8fdb9f9 net: bcmgenet: Fix FCS generation for fragmented skbuffs
| | * 4c0fa624a6 ARM: sun9i: smp: Fix array-index-out-of-bounds read in sunxi_mc_smp_init
| | * c1556217ff net-timestamp: extend SOF_TIMESTAMPING_OPT_ID to HW timestamps
| | * 2cdb650848 can: raw: add support for SO_MARK
| | * 96a6d1bb28 can: raw: add support for SO_TXTIME/SCM_TXTIME
| | * b1719cbb73 net: sched: em_text: fix possible memory leak in em_text_destroy()
| | * ef4fd7518c i40e: Fix filter input checks to prevent config with invalid values
| | * 65c6ef02ff nfc: llcp_core: Hold a ref to llcp_local->dev when holding a ref to llcp_local
* | | 6ba3eed4fa ANDROID: db845c: Enable device tree overlay support
|/ /
* / 0d5ac7fe30 Merge 5.4.266 into android11-5.4-lts
|/
* 4410df7011 Linux 5.4.266
* 7d0f1fd80a block: Don't invalidate pagecache for invalid falloc modes
* a0678f5047 ring-buffer: Fix wake ups when buffer_percent is set to 100
* 508e2fdd97 smb: client: fix OOB in smbCalcSize()
* 644b956c94 usb: fotg210-hcd: delete an incorrect bounds test
* a56a19e44b x86/alternatives: Sync core before enabling interrupts
* 4111986fb9 net: rfkill: gpio: set GPIO direction
* 5c375a83d1 net: 9p: avoid freeing uninit memory in p9pdu_vreadf
* 4e7f3899fb Bluetooth: hci_event: Fix not checking if HCI_OP_INQUIRY has been sent
* a83debb523 USB: serial: option: add Quectel RM500Q R13 firmware support
* c82ba4cb44 USB: serial: option: add Foxconn T99W265 with new baseline
* 1f87ba56c4 USB: serial: option: add Quectel EG912Y module support
* a59cb26bc1 USB: serial: ftdi_sio: update Actisense PIDs constant names
* a70b1933fa wifi: cfg80211: fix certs build to not depend on file order
* e8fb002051 wifi: cfg80211: Add my certificate
* 8717fd6d0c iio: adc: ti_am335x_adc: Fix return value check of tiadc_request_dma()
* 45af72f149 iio: common: ms_sensors: ms_sensors_i2c: fix humidity conversion time table
* 4257c16c14 scsi: bnx2fc: Fix skb double free in bnx2fc_rcv()
* e1b31edfe7 Input: ipaq-micro-keys - add error handling for devm_kmemdup
* a85d6aa2b5 iio: imu: inv_mpu6050: fix an error code problem in inv_mpu6050_read_raw
* 388c90c577 interconnect: Treat xlate() returning NULL node as an error
* 04c2223344 btrfs: do not allow non subvolume root targets for snapshot
* 3230a69e66 smb: client: fix NULL deref in asn1_ber_decoder()
* 0ccb39511a ALSA: hda/hdmi: add force-connect quirk for NUC5CPYB
* 6bcf819198 ALSA: hda/hdmi: Add quirk to force pin connectivity on NUC10
* 34e6c4c6a9 pinctrl: at91-pio4: use dedicated lock class for IRQ
* 624659563e i2c: aspeed: Handle the coalesced stop conditions with the start conditions.
* 47ae524229 afs: Fix overwriting of result of DNS query
* c04b7b28c9 net: check dev->gso_max_size in gso_features_check()
* 761ee09e9f net: warn if gso_type isn't set for a GSO SKB
* eec7ef60d2 afs: Fix dynamic root lookup DNS check
* 82d64cbe48 afs: Fix the dynamic root's d_delete to always delete unused dentries
* 2b4600fb69 net: check vlan filter feature in vlan_vids_add_by_dev() and vlan_vids_del_by_dev()
* b10265532d net/rose: fix races in rose_kill_by_device()
* ed4cb8a42c ethernet: atheros: fix a memleak in atl1e_setup_ring_resources
* 3f82a6a6d7 net: sched: ife: fix potential use-after-free
* f48e3337ab net/mlx5e: Correct snprintf truncation handling for fw_version buffer used by representors
* d07ef3a870 net/mlx5: Fix fw tracer first block check
* a46bb28fdb net/mlx5: improve some comments
* 333fd10955 Revert "net/mlx5e: fix double free of encap_header"
* 7bd305f5f2 wifi: mac80211: mesh_plink: fix matches_local logic
* 76366b399a s390/vx: fix save/restore of fpu kernel context
* f40d484e16 reset: Fix crash when freeing non-existent optional resets
* 14d915ca5a ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init
* 62ef5887dd ksmbd: fix wrong name of SMB2_CREATE_ALLOCATION_SIZE
* 35e12efde0 ALSA: hda/realtek: Enable headset on Lenovo M90 Gen5

Updates the .xml file to add the new needed symbol:

Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 Added function:

  [A] 'function int devm_pm_runtime_enable(device*)'

Change-Id: I1e68409087f3f833dbfcdbfc56546d982d22d10c
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-03-27 18:12:26 +00:00
Jaegeuk Kim
b558f0cc4d BACKPORT: f2fs: expose # of overprivision segments
This is useful when checking conditions during checkpoint=disable in Android.

Bug: 330501081
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit ed5309ad137e1f467ca1e1b61be3dc39d144316c)
[hakan: Resolved minor conflict in Documentation/ABI/testing/sysfs-fs-f2fs]
Signed-off-by: Håkan Kvist <hakan.kvist@sony.com>
Change-Id: I0bd59501836fbe8fe361da2872ae660f3ac1f541
2024-03-21 22:07:44 +00:00
xuguangyang
ffb0cc5261 ANDROID: GKI: Update symbol list for Zebra
Update the android/abi_gki_aarch64_zebra

Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 Added function:

  [A] 'function void prandom_bytes(void*, unsigned long int)'

Bug: 330656237

Change-Id: I703f92b9f2ee27cf5280cc56ba94e8f2242c248f
Signed-off-by: xuguangyang <xuguangyang91@gmail.com>
2024-03-21 07:46:19 +00:00
Johan Hovold
26385fa150 UPSTREAM: arm64: dts: qcom: sdm845: fix USB DP/DM HS PHY interrupts
[ Upstream commit 204f9ed4bad6293933179517624143b8f412347c ]

The USB DP/DM HS PHY interrupts need to be provided by the PDC interrupt
controller in order to be able to wake the system up from low-power
states and to be able to detect disconnect events, which requires
triggering on falling edges.

A recent commit updated the trigger type but failed to change the
interrupt provider as required. This leads to the current Linux driver
failing to probe instead of printing an error during suspend and USB
wakeup not working as intended.

Fixes: 84ad9ac8d9ca ("arm64: dts: qcom: sdm845: fix USB wakeup interrupt types")
Fixes: ca4db2b538 ("arm64: dts: qcom: sdm845: Add USB-related nodes")
Cc: stable@vger.kernel.org      # 4.20
Change-Id: Id86eebbf8a87ecce6b5b339c67b035e5cedba010
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20231213173403.29544-3-johan+linaro@kernel.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2024-03-19 23:40:13 +08:00
Lina Iyer
e1dfe2d3de UPSTREAM: arm64: dts: qcom: add PDC interrupt controller for SDM845
[ Upstream commit 72b67ebf9d242d8d18545250f340c736d900f763 ]

Add PDC interrupt controller device bindings for SDM845.

Change-Id: I07b567a71e7f79aa507193c2919c6c59510670be
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/1573855915-9841-11-git-send-email-ilina@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2024-03-19 23:40:13 +08:00
Sasha Levin
8407582630 Linux 5.4.272
Tested-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 14:40:56 -04:00
Johan Hovold
345ced4052 arm64: dts: qcom: sdm845: fix USB DP/DM HS PHY interrupts
[ Upstream commit 204f9ed4bad6293933179517624143b8f412347c ]

The USB DP/DM HS PHY interrupts need to be provided by the PDC interrupt
controller in order to be able to wake the system up from low-power
states and to be able to detect disconnect events, which requires
triggering on falling edges.

A recent commit updated the trigger type but failed to change the
interrupt provider as required. This leads to the current Linux driver
failing to probe instead of printing an error during suspend and USB
wakeup not working as intended.

Fixes: 84ad9ac8d9ca ("arm64: dts: qcom: sdm845: fix USB wakeup interrupt types")
Fixes: ca4db2b538 ("arm64: dts: qcom: sdm845: Add USB-related nodes")
Cc: stable@vger.kernel.org      # 4.20
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20231213173403.29544-3-johan+linaro@kernel.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:20 -04:00
Lina Iyer
1b3d8cbd1c arm64: dts: qcom: add PDC interrupt controller for SDM845
[ Upstream commit 72b67ebf9d242d8d18545250f340c736d900f763 ]

Add PDC interrupt controller device bindings for SDM845.

Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/1573855915-9841-11-git-send-email-ilina@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:20 -04:00
Jan Kundrát
59b3583da1 serial: max310x: fix IO data corruption in batched operations
[ Upstream commit 3f42b142ea1171967e40e10e4b0241c0d6d28d41 ]

After upgrading from 5.16 to 6.1, our board with a MAX14830 started
producing lots of garbage data over UART. Bisection pointed out commit
285e76fc049c as the culprit. That patch tried to replace hand-written
code which I added in 2b4bac48c1 ("serial: max310x: Use batched reads
when reasonably safe") with the generic regmap infrastructure for
batched operations.

Unfortunately, the `regmap_raw_read` and `regmap_raw_write` which were
used are actually functions which perform IO over *multiple* registers.
That's not what is needed for accessing these Tx/Rx FIFOs; the
appropriate functions are the `_noinc_` versions, not the `_raw_` ones.

Fix this regression by using `regmap_noinc_read()` and
`regmap_noinc_write()` along with the necessary `regmap_config` setup;
with this patch in place, our board communicates happily again. Since
our board uses SPI for talking to this chip, the I2C part is completely
untested.

Fixes: 285e76fc049c ("serial: max310x: use regmap methods for SPI batch operations")
Cc: stable@vger.kernel.org
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Link: https://lore.kernel.org/r/79db8e82aadb0e174bc82b9996423c3503c8fb37.1680732084.git.jan.kundrat@cesnet.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:20 -04:00
Cosmin Tanislav
f5c252aaa1 serial: max310x: implement I2C support
[ Upstream commit 2e1f2d9a9bdbe12ee475c82a45ac46a278e8049a ]

I2C implementation on this chip has a few key differences
compared to SPI, as described in previous patches.
 * extended register space access needs no extra logic
 * slave address is used to select which UART to communicate
   with

To accommodate these differences, add an I2C interface config,
set the RevID register address and implement an empty method
for setting the GlobalCommand register, since no special handling
is needed for the extended register space.

To handle the port-specific slave address, create an I2C dummy
device for each port, except the base one (UART0), which is
expected to be the one specified in firmware, and create a
regmap for each I2C device.
Add minimum and maximum slave addresses to each devtype for
sanity checking.

Also, use a separate regmap config with no write_flag_mask,
since I2C has a R/W bit in its slave address, and set the
max register to the address of the RevID register, since the
extended register space needs no extra logic.

Finally, add the I2C driver.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Link: https://lore.kernel.org/r/20220605144659.4169853-5-demonsingur@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 3f42b142ea11 ("serial: max310x: fix IO data corruption in batched operations")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:20 -04:00
Cosmin Tanislav
112094efd6 serial: max310x: make accessing revision id interface-agnostic
[ Upstream commit b3883ab5e95713e479f774ea68be275413e8e5b2 ]

SPI can only use 5 address bits, since one bit is reserved for
specifying R/W and 2 bits are used to specify the UART port.
To access registers that have addresses past 0x1F, an extended
register space can be enabled by writing to the GlobalCommand
register (address 0x1F).

I2C uses 8 address bits. The R/W bit is placed in the slave
address, and so is the UART port. Because of this, registers
that have addresses higher than 0x1F can be accessed normally.

To access the RevID register, on SPI, 0xCE must be written to
the 0x1F address to enable the extended register space, after
which the RevID register is accessible at address 0x5. 0xCD
must be written to the 0x1F address to disable the extended
register space.

On I2C, the RevID register is accessible at address 0x25.

Create an interface config struct, and add a method for
toggling the extended register space and a member for the RevId
register address. Implement these for SPI.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Link: https://lore.kernel.org/r/20220605144659.4169853-4-demonsingur@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 3f42b142ea11 ("serial: max310x: fix IO data corruption in batched operations")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:20 -04:00
Marek Vasut
b96b017919 regmap: Add bulk read/write callbacks into regmap_config
[ Upstream commit d77e745613680c54708470402e2b623dcd769681 ]

Currently the regmap_config structure only allows the user to implement
single element register read/write using .reg_read/.reg_write callbacks.
The regmap_bus already implements bulk counterparts of both, and is being
misused as a workaround for the missing bulk read/write callbacks in
regmap_config by a couple of drivers. To stop this misuse, add the bulk
read/write callbacks to regmap_config and call them from the regmap core
code.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Maxime Ripard <maxime@cerno.tech>
Cc: Robert Foss <robert.foss@linaro.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
To: dri-devel@lists.freedesktop.org
Link: https://lore.kernel.org/r/20220430025145.640305-1-marex@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 3f42b142ea11 ("serial: max310x: fix IO data corruption in batched operations")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:20 -04:00
Ansuel Smith
758c6799da regmap: allow to define reg_update_bits for no bus configuration
[ Upstream commit 02d6fdecb9c38de19065f6bed8d5214556fd061d ]

Some device requires a special handling for reg_update_bits and can't use
the normal regmap read write logic. An example is when locking is
handled by the device and rmw operations requires to do atomic operations.
Allow to declare a dedicated function in regmap_config for
reg_update_bits in no bus configuration.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Link: https://lore.kernel.org/r/20211104150040.1260-1-ansuelsmth@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 3f42b142ea11 ("serial: max310x: fix IO data corruption in batched operations")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:19 -04:00
Andy Shevchenko
9a7bbea266 serial: max310x: Unprepare and disable clock in error path
[ Upstream commit 61acabaae5ba58b3c32e6e90d24c2c0827fd27a8 ]

In one error case the clock may be left prepared and enabled.
Unprepare and disable clock in that case to balance state of
the hardware.

Fixes: d4d6f03c4fb3 ("serial: max310x: Try to get crystal clock rate from property")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210625153733.12911-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:19 -04:00
Oleg Nesterov
664a6a904a getrusage: use sig->stats_lock rather than lock_task_sighand()
[ Upstream commit f7ec1cd5cc7ef3ad964b677ba82b8b77f1c93009 ]

lock_task_sighand() can trigger a hard lockup. If NR_CPUS threads call
getrusage() at the same time and the process has NR_THREADS, spin_lock_irq
will spin with irqs disabled O(NR_CPUS * NR_THREADS) time.

Change getrusage() to use sig->stats_lock, it was specifically designed
for this type of use. This way it runs lockless in the likely case.

TODO:
	- Change do_task_stat() to use sig->stats_lock too, then we can
	  remove spin_lock_irq(siglock) in wait_task_zombie().

	- Turn sig->stats_lock into seqcount_rwlock_t, this way the
	  readers in the slow mode won't exclude each other. See
	  https://lore.kernel.org/all/20230913154907.GA26210@redhat.com/

	- stats_lock has to disable irqs because ->siglock can be taken
	  in irq context, it would be very nice to change __exit_signal()
	  to avoid the siglock->stats_lock dependency.

Link: https://lkml.kernel.org/r/20240122155053.GA26214@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reported-by: Dylan Hatch <dylanbhatch@google.com>
Tested-by: Dylan Hatch <dylanbhatch@google.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:19 -04:00
Oleg Nesterov
2b34f60383 getrusage: use __for_each_thread()
[ Upstream commit 13b7bc60b5353371460a203df6c38ccd38ad7a3a ]

do/while_each_thread should be avoided when possible.

Plus this change allows to avoid lock_task_sighand(), we can use rcu
and/or sig->stats_lock instead.

Link: https://lkml.kernel.org/r/20230909172629.GA20454@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Stable-dep-of: f7ec1cd5cc7e ("getrusage: use sig->stats_lock rather than lock_task_sighand()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:19 -04:00
Oleg Nesterov
c50a059431 getrusage: move thread_group_cputime_adjusted() outside of lock_task_sighand()
[ Upstream commit daa694e4137571b4ebec330f9a9b4d54aa8b8089 ]

Patch series "getrusage: use sig->stats_lock", v2.

This patch (of 2):

thread_group_cputime() does its own locking, we can safely shift
thread_group_cputime_adjusted() which does another for_each_thread loop
outside of ->siglock protected section.

This is also preparation for the next patch which changes getrusage() to
use stats_lock instead of siglock, thread_group_cputime() takes the same
lock.  With the current implementation recursive read_seqbegin_or_lock()
is fine, thread_group_cputime() can't enter the slow mode if the caller
holds stats_lock, yet this looks more safe and better performance-wise.

Link: https://lkml.kernel.org/r/20240122155023.GA26169@redhat.com
Link: https://lkml.kernel.org/r/20240122155050.GA26205@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reported-by: Dylan Hatch <dylanbhatch@google.com>
Tested-by: Dylan Hatch <dylanbhatch@google.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:19 -04:00
Oleg Nesterov
ef8a8b36a1 getrusage: add the "signal_struct *sig" local variable
[ Upstream commit c7ac8231ace9b07306d0299969e42073b189c70a ]

No functional changes, cleanup/preparation.

Link: https://lkml.kernel.org/r/20230909172554.GA20441@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Stable-dep-of: daa694e41375 ("getrusage: move thread_group_cputime_adjusted() outside of lock_task_sighand()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:19 -04:00
Arnd Bergmann
f184f21978 y2038: rusage: use __kernel_old_timeval
[ Upstream commit bdd565f817a74b9e30edec108f7cb1dbc762b8a6 ]

There are two 'struct timeval' fields in 'struct rusage'.

Unfortunately the definition of timeval is now ambiguous when used in
user space with a libc that has a 64-bit time_t, and this also changes
the 'rusage' definition in user space in a way that is incompatible with
the system call interface.

While there is no good solution to avoid all ambiguity here, change
the definition in the kernel headers to be compatible with the kernel
ABI, using __kernel_old_timeval as an unambiguous base type.

In previous discussions, there was also a plan to add a replacement
for rusage based on 64-bit timestamps and nanosecond resolution,
i.e. 'struct __kernel_timespec'. I have patches for that as well,
if anyone thinks we should do that.

Reviewed-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Stable-dep-of: daa694e41375 ("getrusage: move thread_group_cputime_adjusted() outside of lock_task_sighand()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:18 -04:00
Shradha Gupta
c7441c77c9 hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed
[ Upstream commit 9cae43da9867412f8bd09aee5c8a8dc5e8dc3dc2 ]

If hv_netvsc driver is unloaded and reloaded, the NET_DEVICE_REGISTER
handler cannot perform VF register successfully as the register call
is received before netvsc_probe is finished. This is because we
register register_netdevice_notifier() very early( even before
vmbus_driver_register()).
To fix this, we try to register each such matching VF( if it is visible
as a netdevice) at the end of netvsc_probe.

Cc: stable@vger.kernel.org
Fixes: 85520856466e ("hv_netvsc: Fix race of register_netdevice_notifier and VF register")
Suggested-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:18 -04:00
Juhee Kang
f2ab3eaa64 hv_netvsc: use netif_is_bond_master() instead of open code
[ Upstream commit c60882a4566a0a62dc3a40c85131103aad83dcb3 ]

Use netif_is_bond_master() function instead of open code, which is
((event_dev->priv_flags & IFF_BONDING) && (event_dev->flags & IFF_MASTER)).
This patch doesn't change logic.

Signed-off-by: Juhee Kang <claudiajkang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 9cae43da9867 ("hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:18 -04:00
Dexuan Cui
9b5ef7a528 hv_netvsc: Make netvsc/VF binding check both MAC and serial number
[ Upstream commit 64ff412ad41fe3a5bf759ff4844dc1382176485c ]

Currently the netvsc/VF binding logic only checks the PCI serial number.

The Microsoft Azure Network Adapter (MANA) supports multiple net_device
interfaces (each such interface is called a "vPort", and has its unique
MAC address) which are backed by the same VF PCI device, so the binding
logic should check both the MAC address and the PCI serial number.

The change should not break any other existing VF drivers, because
Hyper-V NIC SR-IOV implementation requires the netvsc network
interface and the VF network interface have the same MAC address.

Co-developed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Co-developed-by: Shachar Raindel <shacharr@microsoft.com>
Signed-off-by: Shachar Raindel <shacharr@microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 9cae43da9867 ("hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:18 -04:00
Werner Sembach
5402ec577f Input: i8042 - fix strange behavior of touchpad on Clevo NS70PU
[ Upstream commit a60e6c3918d20848906ffcdfcf72ca6a8cfbcf2e ]

When closing the laptop lid with an external screen connected, the mouse
pointer has a constant movement to the lower right corner. Opening the
lid again stops this movement, but after that the touchpad does no longer
register clicks.

The touchpad is connected both via i2c-hid and PS/2, the predecessor of
this device (NS70MU) has the same layout in this regard and also strange
behaviour caused by the psmouse and the i2c-hid driver fighting over
touchpad control. This fix is reusing the same workaround by just
disabling the PS/2 aux port, that is only used by the touchpad, to give the
i2c-hid driver the lone control over the touchpad.

v2: Rebased on current master

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20231205163602.16106-1-wse@tuxedocomputers.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:18 -04:00
Hugo Villeneuve
bf6bb3612e serial: max310x: prevent infinite while() loop in port startup
[ Upstream commit b35f8dbbce818b02c730dc85133dc7754266e084 ]

If there is a problem after resetting a port, the do/while() loop that
checks the default value of DIVLSB register may run forever and spam the
I2C bus.

Add a delay before each read of DIVLSB, and a maximum number of tries to
prevent that situation from happening.

Also fail probe if port reset is unsuccessful.

Fixes: 10d8b34a42 ("serial: max310x: Driver rework")
Cc: stable@vger.kernel.org
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://lore.kernel.org/r/20240116213001.3691629-5-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:18 -04:00
Cosmin Tanislav
7e30e5c143 serial: max310x: use a separate regmap for each port
[ Upstream commit 6ef281daf020592c219fa91780abc381c6c20db5 ]

The driver currently does manual register manipulation in
multiple places to talk to a specific UART port.

In order to talk to a specific UART port over SPI, the bits U1
and U0 of the register address can be set, as explained in the
Command byte configuration section of the datasheet.

Make this more elegant by creating regmaps for each UART port
and setting the read_flag_mask and write_flag_mask
accordingly.

All communcations regarding global registers are done on UART
port 0, so replace the global regmap entirely with the port 0
regmap.

Also, remove the 0x1f masks from reg_writeable(), reg_volatile()
and reg_precious() methods, since setting the U1 and U0 bits of
the register address happens inside the regmap core now.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Link: https://lore.kernel.org/r/20220605144659.4169853-3-demonsingur@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: b35f8dbbce81 ("serial: max310x: prevent infinite while() loop in port startup")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:17 -04:00
Cosmin Tanislav
3fb7c9bcd0 serial: max310x: use regmap methods for SPI batch operations
[ Upstream commit 285e76fc049c4d32c772eea9460a7ef28a193802 ]

The SPI batch read/write operations can be implemented as simple
regmap raw read and write, which will also try to do a gather
write just as it is done here.

Use the regmap raw read and write methods.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Link: https://lore.kernel.org/r/20220605144659.4169853-2-demonsingur@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: b35f8dbbce81 ("serial: max310x: prevent infinite while() loop in port startup")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:17 -04:00
Andy Shevchenko
2c9c830d74 serial: max310x: Make use of device properties
[ Upstream commit c808fab604ca62cff19ee6b261211483830807aa ]

Device property API allows to gather device resources from different sources,
such as ACPI. Convert the drivers to unleash the power of device property API.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20201007084635.594991-1-andy.shevchenko@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: b35f8dbbce81 ("serial: max310x: prevent infinite while() loop in port startup")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:17 -04:00
Hugo Villeneuve
b765176ae1 serial: max310x: fail probe if clock crystal is unstable
[ Upstream commit 8afa6c6decea37e7cb473d2c60473f37f46cea35 ]

A stable clock is really required in order to use this UART, so log an
error message and bail out if the chip reports that the clock is not
stable.

Fixes: 4cf9a888fd ("serial: max310x: Check the clock readiness")
Cc: stable@vger.kernel.org
Suggested-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Link: https://www.spinics.net/lists/linux-serial/msg35773.html
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://lore.kernel.org/r/20240116213001.3691629-4-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:17 -04:00
Andy Shevchenko
816700131e serial: max310x: Try to get crystal clock rate from property
[ Upstream commit d4d6f03c4fb3a91dadfe147b47edd40e4d7e4d36 ]

In some configurations, mainly ACPI-based, the clock frequency of the device
is supplied by very well established 'clock-frequency' property. Hence, try
to get it from the property at last if no other providers are available.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210517172930.83353-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 8afa6c6decea ("serial: max310x: fail probe if clock crystal is unstable")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:17 -04:00
Andy Shevchenko
c76dcad53b serial: max310x: Use devm_clk_get_optional() to get the input clock
[ Upstream commit 974e454d6f96da0c0ab1b4115b92587dd9406f6a ]

Simplify the code which fetches the input clock by using
devm_clk_get_optional(). If no input clock is present
devm_clk_get_optional() will return NULL instead of an error
which matches the behavior of the old code.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20201007084635.594991-2-andy.shevchenko@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 8afa6c6decea ("serial: max310x: fail probe if clock crystal is unstable")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:16 -04:00
Johannes Berg
b569d91e51 um: allow not setting extra rpaths in the linux binary
[ Upstream commit 386093c68ba3e8bcfe7f46deba901e0e80713c29 ]

There doesn't seem to be any reason for the rpath being set in
the binaries, at on systems that I tested on. On the other hand,
setting rpath is actually harming binaries in some cases, e.g.
if using nix-based compilation environments where /lib & /lib64
are not part of the actual environment.

Add a new Kconfig option (under EXPERT, for less user confusion)
that allows disabling the rpath additions.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Stable-dep-of: 846cfbeed09b ("um: Fix adding '-no-pie' for clang")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:16 -04:00
Nico Pache
47c68edecc selftests: mm: fix map_hugetlb failure on 64K page size systems
[ Upstream commit 91b80cc5b39f00399e8e2d17527cad2c7fa535e2 ]

On systems with 64k page size and 512M huge page sizes, the allocation and
test succeeds but errors out at the munmap.  As the comment states, munmap
will failure if its not HUGEPAGE aligned.  This is due to the length of
the mapping being 1/2 the size of the hugepage causing the munmap to not
be hugepage aligned.  Fix this by making the mapping length the full
hugepage if the hugepage is larger than the length of the mapping.

Link: https://lkml.kernel.org/r/20240119131429.172448-1-npache@redhat.com
Signed-off-by: Nico Pache <npache@redhat.com>
Cc: Donet Tom <donettom@linux.vnet.ibm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:16 -04:00
Jason Xing
f9055fa2b2 netrom: Fix data-races around sysctl_net_busy_read
[ Upstream commit d380ce70058a4ccddc3e5f5c2063165dc07672c6 ]

We need to protect the reader reading the sysctl value because the
value can be changed concurrently.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:16 -04:00
Jason Xing
07bbccd1ad netrom: Fix a data-race around sysctl_netrom_link_fails_count
[ Upstream commit bc76645ebdd01be9b9994dac39685a3d0f6f7985 ]

We need to protect the reader reading the sysctl value because the
value can be changed concurrently.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:16 -04:00
Jason Xing
c4309e5f8e netrom: Fix a data-race around sysctl_netrom_routing_control
[ Upstream commit b5dffcb8f71bdd02a4e5799985b51b12f4eeaf76 ]

We need to protect the reader reading the sysctl value because the
value can be changed concurrently.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:16 -04:00
Jason Xing
cbba77abb4 netrom: Fix a data-race around sysctl_netrom_transport_no_activity_timeout
[ Upstream commit f99b494b40431f0ca416859f2345746199398e2b ]

We need to protect the reader reading the sysctl value because the
value can be changed concurrently.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:16 -04:00
Jason Xing
89aa78a343 netrom: Fix a data-race around sysctl_netrom_transport_requested_window_size
[ Upstream commit a2e706841488f474c06e9b33f71afc947fb3bf56 ]

We need to protect the reader reading the sysctl value because the
value can be changed concurrently.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:16 -04:00
Jason Xing
1f60795dca netrom: Fix a data-race around sysctl_netrom_transport_busy_delay
[ Upstream commit 43547d8699439a67b78d6bb39015113f7aa360fd ]

We need to protect the reader reading the sysctl value because the
value can be changed concurrently.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:15 -04:00
Jason Xing
80578681ea netrom: Fix a data-race around sysctl_netrom_transport_acknowledge_delay
[ Upstream commit 806f462ba9029d41aadf8ec93f2f99c5305deada ]

We need to protect the reader reading the sysctl value because the
value can be changed concurrently.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:15 -04:00
Jason Xing
f716a68234 netrom: Fix a data-race around sysctl_netrom_transport_maximum_tries
[ Upstream commit e799299aafed417cc1f32adccb2a0e5268b3f6d5 ]

We need to protect the reader reading the sysctl value because the
value can be changed concurrently.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:15 -04:00
Jason Xing
eadec8da44 netrom: Fix a data-race around sysctl_netrom_transport_timeout
[ Upstream commit 60a7a152abd494ed4f69098cf0f322e6bb140612 ]

We need to protect the reader reading the sysctl value because the
value can be changed concurrently.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:15 -04:00
Jason Xing
eda02a0bed netrom: Fix data-races around sysctl_netrom_network_ttl_initialiser
[ Upstream commit 119cae5ea3f9e35cdada8e572cc067f072fa825a ]

We need to protect the reader reading the sysctl value because the
value can be changed concurrently.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:15 -04:00
Jason Xing
1e84b108f2 netrom: Fix a data-race around sysctl_netrom_obsolescence_count_initialiser
[ Upstream commit cfd9f4a740f772298308b2e6070d2c744fb5cf79 ]

We need to protect the reader reading the sysctl value
because the value can be changed concurrently.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:15 -04:00
Jason Xing
7f61523255 netrom: Fix a data-race around sysctl_netrom_default_path_quality
[ Upstream commit 958d6145a6d9ba9e075c921aead8753fb91c9101 ]

We need to protect the reader reading sysctl_netrom_default_path_quality
because the value can be changed concurrently.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:15 -04:00
Lena Wang
4bafcc43ba netfilter: nf_conntrack_h323: Add protection for bmp length out of range
[ Upstream commit 767146637efc528b5e3d31297df115e85a2fd362 ]

UBSAN load reports an exception of BRK#5515 SHIFT_ISSUE:Bitwise shifts
that are out of bounds for their data type.

vmlinux   get_bitmap(b=75) + 712
<net/netfilter/nf_conntrack_h323_asn1.c:0>
vmlinux   decode_seq(bs=0xFFFFFFD008037000, f=0xFFFFFFD008037018, level=134443100) + 1956
<net/netfilter/nf_conntrack_h323_asn1.c:592>
vmlinux   decode_choice(base=0xFFFFFFD0080370F0, level=23843636) + 1216
<net/netfilter/nf_conntrack_h323_asn1.c:814>
vmlinux   decode_seq(f=0xFFFFFFD0080371A8, level=134443500) + 812
<net/netfilter/nf_conntrack_h323_asn1.c:576>
vmlinux   decode_choice(base=0xFFFFFFD008037280, level=0) + 1216
<net/netfilter/nf_conntrack_h323_asn1.c:814>
vmlinux   DecodeRasMessage() + 304
<net/netfilter/nf_conntrack_h323_asn1.c:833>
vmlinux   ras_help() + 684
<net/netfilter/nf_conntrack_h323_main.c:1728>
vmlinux   nf_confirm() + 188
<net/netfilter/nf_conntrack_proto.c:137>

Due to abnormal data in skb->data, the extension bitmap length
exceeds 32 when decoding ras message then uses the length to make
a shift operation. It will change into negative after several loop.
UBSAN load could detect a negative shift as an undefined behaviour
and reports exception.
So we add the protection to avoid the length exceeding 32. Or else
it will return out of range error and stop decoding.

Fixes: 5e35941d99 ("[NETFILTER]: Add H.323 conntrack/NAT helper")
Signed-off-by: Lena Wang <lena.wang@mediatek.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:15 -04:00
Florian Westphal
6ec3032022 netfilter: nft_ct: fix l3num expectations with inet pseudo family
[ Upstream commit 99993789966a6eb4f1295193dc543686899892d3 ]

Following is rejected but should be allowed:

table inet t {
        ct expectation exp1 {
                [..]
                l3proto ip

Valid combos are:
table ip t, l3proto ip
table ip6 t, l3proto ip6
table inet t, l3proto ip OR l3proto ip6

Disallow inet pseudeo family, the l3num must be a on-wire protocol known
to conntrack.

Retain NFPROTO_INET case to make it clear its rejected
intentionally rather as oversight.

Fixes: 8059918a1377 ("netfilter: nft_ct: sanitize layer 3 and 4 protocol number in custom expectations")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:14 -04:00
Edward Adam Davis
997efea2bf net/rds: fix WARNING in rds_conn_connect_if_down
[ Upstream commit c055fc00c07be1f0df7375ab0036cebd1106ed38 ]

If connection isn't established yet, get_mr() will fail, trigger connection after
get_mr().

Fixes: 584a8279a4 ("RDS: RDMA: return appropriate error on rdma map failures")
Reported-and-tested-by: syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:14 -04:00