49169 Commits

Author SHA1 Message Date
Dark-Matter7232
309020e381 qcacmn: Remove threaded setting before disabling napi
Follow-up to [1].

[1]: b4782f4107

Change-Id: I6385fd0a0f2c269309cbe1d1463d3b5549c45ca9
Suggested-by: EmanuelCN <emanuelghub@gmail.com>
Signed-off-by: Dark-Matter7232 <me@const.eu.org>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-11-20 01:28:10 -03:00
Dark-Matter7232
479b3ff753 qcacld-3.0: Enable threaded napi
Change-Id: Iad838615d82eebd050c9a28b167f4bf3163ec0d2
Signed-off-by: Dark-Matter7232 <me@const.eu.org>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-11-20 01:27:11 -03:00
Julian Liu
fbbad2e3b9 qcacld-3.0: Free a bunch of pkts at once
It is too bad to do a tight loop every adding pkt. When the hotspot is turned on, I notice that the
htt_htc_misc_pkt_list_trim() function consumes at least 5% of CPU time. By caching the head of pkt
queue and freeing multiple pkts at once to reduce CPU consumption.

Change-Id: I0d4b9a266b8def08a85fb41805f9368dd49649eb
Signed-off-by: Julian Liu <wlootlxt123@gmail.com>
Signed-off-by: Alex Winkowski <dereference23@outlook.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-11-20 01:26:49 -03:00
Richard Raya
2cd059fb56 This is the 4.14.354 OpenELA-Extended LTS stable release
-----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCAA3FiEERFwmR4yFob14UDOYC8702P6YulgFAmcgko0ZHHZlZ2FyZC5u
 b3NzdW1Ab3JhY2xlLmNvbQAKCRALzvTY/pi6WL/GD/0em+uP/O8QiPYqeGrEECpW
 bgRsBiN3XnyEsghAjplWX12G/zjxA0PY0u2zh9K9sdPw60n8nVZ1OxvPHINwuSC9
 kE9N60SCpJ88ju9OtU+4xz/nxtEmlel8fWy5elagB5wqbWbvsjT52ceZXqSxqhy7
 pQdIDHSiUUwx9JL6vDuJSL+Z/Y216qvBETZLnDSo90raFp/MDa5JmQsh81lLeUt8
 wGKwC/Olnbd21QTStNK34aQGyX5b+3YeACFVPud66Zs9airz9EE6Yq78gwL29L2k
 4jxzihXxSkkfa66eR63ap53+/mEqOZX72m2qEMVOvAcAwU0XsNDTdkXN7z8YQ5T3
 E1rJwr4Ox0hmM+hHBA20w9xRDXZoZmdrcjsU1aNKuK2zTJ0h9DBIvMM2XY5n5sWK
 I4F8E15KyKmu4nXBETreXZixqVLZMgjNFncRLf8XBIL1kxXm65LYCHypp3AgdVgo
 Ccdq5PbC6LAyNPrIOaftIaS9VlU15cqcalu7A+gSoWq55LGWAa3G9vX0ZtYQB9QX
 0R18fbzyjqG6Wa5J5KRDJ+HyS4IvdnEWS8hMR3jfosjMNgJhfDlDeev8NARBiDpX
 d26xogNA7xOOvtdpuwEbnxD5kR0zUdnC73pC4wxdMptYSK6ULKNPmTkA0dKE9qvl
 TDgw4DML8vXQqJ4P+w3Njw==
 =gX2R
 -----END PGP SIGNATURE-----

Merge tag 'v4.14.354-openela' of https://github.com/openela/kernel-lts

This is the 4.14.354 OpenELA-Extended LTS stable release

* tag 'v4.14.354-openela' of https://github.com/openela/kernel-lts: (90 commits)
  LTS: Update to 4.14.354
  drm/fb-helper: set x/yres_virtual in drm_fb_helper_check_var
  ipc: remove memcg accounting for sops objects in do_semtimedop()
  scsi: aacraid: Fix double-free on probe failure
  usb: core: sysfs: Unmerge @usb3_hardware_lpm_attr_group in remove_power_attributes()
  usb: dwc3: st: fix probed platform device ref count on probe error path
  usb: dwc3: core: Prevent USB core invalid event buffer address access
  usb: dwc3: omap: add missing depopulate in probe error path
  USB: serial: option: add MeiG Smart SRM825L
  cdc-acm: Add DISABLE_ECHO quirk for GE HealthCare UI Controller
  net: busy-poll: use ktime_get_ns() instead of local_clock()
  gtp: fix a potential NULL pointer dereference
  net: prevent mss overflow in skb_segment()
  ida: Fix crash in ida_free when the bitmap is empty
  net:rds: Fix possible deadlock in rds_message_put
  fbmem: Check virtual screen sizes in fb_set_var()
  fbcon: Prevent that screen size is smaller than font size
  printk: Export is_console_locked
  memcg: enable accounting of ipc resources
  cgroup/cpuset: Prevent UAF in proc_cpuset_show()
  ...

Change-Id: I7da4d8d188dec9d2833216e5d6580dbd72b99240
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-10-29 20:17:04 -03:00
Richard Raya
d0f2df1a95 Merge tag 'LA.UM.9.1.r1-16400-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api
"LA.UM.9.1.r1-16400-SMxxx0.QSSI14.0"

* tag 'LA.UM.9.1.r1-16400-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api: (39 commits)
  fw-api: CL 27148704 - update fw common interface files
  fw-api: CL 27145397 - update fw common interface files
  fw-api: CL 27121105 - update fw common interface files
  fw-api: Add marina E3 hal header files to fw-api project
  fw-api: CL 27039913 - update fw common interface files
  fw-api: CL 27020660 - update fw common interface files
  fw-api: CL 27007360 - update fw common interface files
  fw-api: CL 26997210 - update fw common interface files
  fw-api: CL 26979953 - update fw common interface files
  fw-api: CL 26967399 - update fw common interface files
  fw-api: CL 26957438 - update fw common interface files
  fw-api: CL 26944074 - update fw common interface files
  fw-api: CL 26941589 - update fw common interface files
  fw-api: CL 26938915 - update fw common interface files
  fw-api: CL 26931520 - update fw common interface files
  fw-api: CL 26931515 - update fw common interface files
  fw-api: Add hardware header files for QCC2072 Cologne
  fw-api: CL 26908485 - update fw common interface files
  fw-api: CL 26901300 - update fw common interface files
  fw-api: CL 26870782 - update fw common interface files
  ...

Change-Id: I1b5754614a26ed36dd79e0c52c80d59ec8008d70
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-10-26 03:11:50 -03:00
Chengfeng Ye
f22c4b1e57 staging: ks7010: disable bh on tx_dev_lock
[ Upstream commit 058cbee52ccd7be77e373d31a4f14670cfd32018 ]

As &priv->tx_dev.tx_dev_lock is also acquired by xmit callback which
could be call from timer under softirq context, use spin_lock_bh()
on it to prevent potential deadlock.

hostif_sme_work()
--> hostif_sme_set_pmksa()
--> hostif_mib_set_request()
--> ks_wlan_hw_tx()
--> spin_lock(&priv->tx_dev.tx_dev_lock)

ks_wlan_start_xmit()
--> hostif_data_request()
--> ks_wlan_hw_tx()
--> spin_lock(&priv->tx_dev.tx_dev_lock)

Signed-off-by: Chengfeng Ye <dg573847474@gmail.com>
Link: https://lore.kernel.org/r/20230926161323.41928-1-dg573847474@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 936a24249747e0d995fc2d66524b043a3d158705)
[Vegard: fix conflict in context due to missing commit
 7acf4002e348913c86015337ea0810acbb5443e0 ("staging: ks7010: remove
 useless DPRINTK traces").]
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-10-24 10:07:37 +00:00
Richard Raya
7669da0862 qcacld-3.0: Reduce wakelocks timeouts to 500ms
Change-Id: I66cc9200531855e60055e5b7c6d890b880bc819d
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-10-20 15:26:31 -03:00
Richard Raya
ca10f72d19 qcacld-3.0: Remove unused variable
Change-Id: I05e37cdc9f35fc13f6728fc27a609ff6b689d3a2
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-10-11 19:20:08 -03:00
Surya Prakash Sivaraj
13c226bf32 qcacld-3.0: Remove use-after-free of frame in tx mgmt send
The tx completion handler for the frame frees the buffer.
Therefore, usage of frame after tx completion causes undesired
effect.

Remove the dereference of tx frame buffer contents in
lim_tx_mgmt_frame() after the tx completion.

Change-Id: I32211e1bce4f96ba920a2212ef65aa39831666ab
CRs-Fixed: 3772014
(cherry picked from commit 2b66fcb567197854c43d8323de564b2949dfb8f5)
2024-10-11 00:55:47 -03:00
Richard Raya
be1ff8e638 msm-4.14: Revert some unsafe optimizations
Change-Id: I2c268f87ab8d9154758384c7a7639046c3784eb8
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-09-29 17:32:34 -03:00
Richard Raya
1af43dc9da msm-4.14: Run dos2unix treewide
find . -type f -print0 | xargs -0 -n 1 -P 12 dos2unix

Change-Id: I0a93052f5b83de7ee3d66ab372280f5401b8d00b
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:37:38 -03:00
Richard Raya
1b2f5d541c Merge tag 'LA.UM.9.1.r1-16300-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn
"LA.UM.9.1.r1-16300-SMxxx0.QSSI14.0"

* tag 'LA.UM.9.1.r1-16300-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn:
  qcacmn: Fix out of bound read issue in ESP ie parse
  qcacmn: Update no. of DWORDs for htt_tx_msdu_desc_ext2_t

Change-Id: Iabb0988ddc42f003355c8f5a308276110d437764
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-07-23 18:00:16 -03:00
Richard Raya
3c195dc242 Merge tag 'LA.UM.9.1.r1-16300-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api
"LA.UM.9.1.r1-16300-SMxxx0.QSSI14.0"

* tag 'LA.UM.9.1.r1-16300-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api: (85 commits)
  fw-api: CL 26614150 - update fw common interface files
  fw-api: CL 26587627 - update fw common interface files
  fw-api: CL 26534623 - update fw common interface files
  fw-api: CL 26517090 - update fw common interface files
  fw-api: CL 26515400 - update fw common interface files
  fw-api: CL 26515067 - update fw common interface files
  fw-api: CL 26511260 - update fw common interface files
  fw-api: CL 26496317 - update fw common interface files
  fw-api: CL 26403375 - update fw common interface files
  fw-api: CL 26392958 - update fw common interface files
  fw-api: CL 26384461 - update fw common interface files
  fw-api: CL 26368984 - update fw common interface files
  fw-api: CL 26367617 - update fw common interface files
  fw-api: CL 26367611 - update fw common interface files
  fw-api: CL 26351133 - update fw common interface files
  fw-api: CL 26304529 - update fw common interface files
  fw-api: CL 26304560 - update fw common interface files
  fw-api: CL 26301574 - update fw common interface files
  fw-api: CL 26280447 - update fw common interface files
  fw-api: CL 26269344 - update fw common interface files
  ...

Change-Id: Id606d3a5c9e60666dff95dea249b2231ea8e8d88
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-07-23 17:59:51 -03:00
Richard Raya
fad3b5236d This is the 4.14.349 OpenELA-Extended LTS stable release
-----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCAA3FiEERFwmR4yFob14UDOYC8702P6YulgFAmaYMNYZHHZlZ2FyZC5u
 b3NzdW1Ab3JhY2xlLmNvbQAKCRALzvTY/pi6WI+2EACbJP/GYZL4iZezt3yp9J6y
 ObeobshL3ODENH9J4Rpjo7EJNdRbiJmqK07C6g3gxfEBqYhMDxYCBbhwTTvvHmu7
 ezr1rmQmUlyzf2qW905a+rTawUrKztZpvZ0ycRXgfQHjX8w64salq/G5X9kJ1CZQ
 0TYwhDXXYRc1yuhJkVH0+ZUP+FvSBYXY42QZQ8tRzviBKgHUqyQ2JiLN7yGXStSp
 PEOCeXuEsQxkzbFU1rG7J9KXfUYndih+fiGSvuUUZF6WTHNobfkh+nrGzsdadtUp
 UW9nEdHjjEhTpTr125uOGc3H2Y1rWVPrcZ9kvJBhzf4WKNBFu2v7Bc5i2/Yz/jKU
 5cz7bjqpSnFOAmNe1f+pOO2oIsBk/xhAbMrPHS1eTJfUJmVL21HgDS3nXfV3yYcR
 0cHH10HGf7DEx2PRh3DM53XzaiumOXY3e/eFt+syYFWtsPY0XKHjsfwLeoujCVgh
 Sb6yiV1HTNg2hkGck+CQKTvHKZhSs1uE+vGSHiSTpryrsXYCTRJySSXEdiU0QpeL
 c9xzRE0PrUaUKNucdimGr6EqvXL11M1I59Z3ygk8vyLGI13vSmkRZ9Sl7m0tbirA
 0K1Ws2PkwuYQEOut8Esp6DJ2n38Uz3j0lnb2lreC0KbfXMvPWQfP81M1Lc+Pkpn6
 Zgbbs68F6jYs0KV/iRty2A==
 =RvUO
 -----END PGP SIGNATURE-----

Merge tag 'v4.14.349-openela' of https://github.com/openela/kernel-lts

This is the 4.14.349 OpenELA-Extended LTS stable release

* tag 'v4.14.349-openela' of https://github.com/openela/kernel-lts: (160 commits)
  LTS: Update to 4.14.349
  x86/kvm: Disable all PV features on crash
  x86/kvm: Disable kvmclock on all CPUs on shutdown
  x86/kvm: Teardown PV features on boot CPU as well
  crypto: algif_aead - fix uninitialized ctx->init
  nfs: fix undefined behavior in nfs_block_bits()
  ext4: fix mb_cache_entry's e_refcnt leak in ext4_xattr_block_cache_find()
  sparc: move struct termio to asm/termios.h
  kdb: Use format-specifiers rather than memset() for padding in kdb_read()
  kdb: Merge identical case statements in kdb_read()
  kdb: Fix console handling when editing and tab-completing commands
  kdb: Use format-strings rather than '\0' injection in kdb_read()
  kdb: Fix buffer overflow during tab-complete
  sparc64: Fix number of online CPUs
  intel_th: pci: Add Meteor Lake-S CPU support
  net/9p: fix uninit-value in p9_client_rpc()
  crypto: qat - Fix ADF_DEV_RESET_SYNC memory leak
  KVM: arm64: Allow AArch32 PSTATE.M to be restored as System mode
  netfilter: nft_dynset: relax superfluous check on set updates
  netfilter: nft_dynset: report EOPNOTSUPP on missing set feature
  ...

Change-Id: Idb0053e6b2186ef17f31e15fdb601ae451c81283
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-07-18 01:54:59 -03:00
Sagi Grimberg
45e0b12972 params: lift param_set_uint_minmax to common code
[ Upstream commit 2a14c9ae15a38148484a128b84bff7e9ffd90d68 ]

It is a useful helper hence move it to common code so others can enjoy
it.

Suggested-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Stable-dep-of: 3ebc46ca8675 ("tcp: Fix shift-out-of-bounds in dctcp_update_alpha().")
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 459de98d7a6b3d504b5e8664f32f59a306dd425c)
[Harshit: Also lift param_set_uint_minmax from staging lustre driver,
 it is removed in 4.19.y so this upstream commit didnot try cleaning
 it up there]
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-07-15 17:44:31 +00:00
Arnd Bergmann
89f965ae0a greybus: arche-ctrl: move device table to its right location
[ Upstream commit 6a0b8c0da8d8d418cde6894a104cf74e6098ddfa ]

The arche-ctrl has two platform drivers and three of_device_id tables,
but one table is only used for the the module loader, while the other
two seem to be associated with their drivers.

This leads to a W=1 warning when the driver is built-in:

drivers/staging/greybus/arche-platform.c:623:34: error: 'arche_combined_id' defined but not used [-Werror=unused-const-variable=]
  623 | static const struct of_device_id arche_combined_id[] = {

Drop the extra table and register both tables that are actually
used as the ones for the module loader instead.

Fixes: 7b62b61c752a ("greybus: arche-ctrl: Don't expose driver internals to arche-platform driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240403080702.3509288-18-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 22e65ed6799f2bfd059d633890d6c7ebe46abc9b)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-07-08 08:15:14 +00:00
Rui Miguel Silva
8d680792ea greybus: lights: check return of get_channel_from_mode
[ Upstream commit a1ba19a1ae7cd1e324685ded4ab563e78fe68648 ]

If channel for the given node is not found we return null from
get_channel_from_mode. Make sure we validate the return pointer
before using it in two of the missing places.

This was originally reported in [0]:
Found by Linux Verification Center (linuxtesting.org) with SVACE.

[0] https://lore.kernel.org/all/20240301190425.120605-1-m.lobanov@rosalinux.ru

Fixes: 2870b52bae4c ("greybus: lights: add lights implementation")
Reported-by: Mikhail Lobanov <m.lobanov@rosalinux.ru>
Suggested-by: Mikhail Lobanov <m.lobanov@rosalinux.ru>
Suggested-by: Alex Elder <elder@ieee.org>
Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
Link: https://lore.kernel.org/r/20240325221549.2185265-1-rmfrfs@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 8f4a76d477f0cc3c54d512f07f6f88c8e1c1e07b)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-07-08 08:15:11 +00:00
Dan Carpenter
8bb6ee62c3 speakup: Fix sizeof() vs ARRAY_SIZE() bug
commit 008ab3c53bc4f0b2f20013c8f6c204a3203d0b8b upstream.

The "buf" pointer is an array of u16 values.  This code should be
using ARRAY_SIZE() (which is 256) instead of sizeof() (which is 512),
otherwise it can the still got out of bounds.

Fixes: c8d2f34ea96e ("speakup: Avoid crash on very long word")
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Link: https://lore.kernel.org/r/d16f67d2-fd0a-4d45-adac-75ddd11001aa@moroto.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 42f0a3f67158ed6b2908d2b9ffbf7e96d23fd358)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-07-08 08:14:18 +00:00
Richard Raya
53372401cc qcacld-3.0: Enable monitor mode
Change-Id: If250f66b747d27de9e74324bf7c7e685b1463191
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-07-03 02:41:54 -03:00
Bapiraju Alla
b2bd341423 qcacld-3.0: Update channel self Rx time to the user space
Currently, channel rx time is not being updated to user space as
part of link stats. Instead channel tx_time is being overwritten
with the same value. Due to this user space is not getting channel
rx_time in the link stats.

Update channel rx time in the channel link stats.

Update representation of tx_time and rx_time in the ll_stats debugfs
output to align with other stats.

Change-Id: I850adb11169eb24c81f1e31a4ff498f4e20ab9c6
CRs-Fixed: 2765485
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-06-15 15:31:08 -03:00
Bapiraju Alla
55f9b78cb5 qcacld-3.0: Update channel Tx and Rx time to user space
Add support to update per channel Tx and Rx time to the userspace.

Change-Id: I87758fe5fe9b7d05992ca06f4e3310c43c70eb00
CRs-Fixed: 2757209
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-06-15 15:31:07 -03:00
Bapiraju Alla
0537f4c17f qcacmn: Update channel tx_time and rx_time to user space
Add support for vendor attributes to update channel tx_time
and rx_time to the user space.

Change-Id: Ifdb50d8f7bcdcf8a560d174cd34efcb1991768a9
CRs-Fixed: 2757211
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-06-15 15:31:07 -03:00
Bapiraju Alla
6b2ba824f2 qcacld-3.0: Add support for tx_time and rx_time in wifi_channel_stats
Currently wifi_channel_stats has cca_busy_time statistic which is
measured after excluding own tx_time but not own rx_time. By definition,
CCA busy time means amount of time for which channel is detected as busy
after excluding it's own tx and rx time.

Add support for tx and rx time in the channel statistics. This will enable
provision to calculate CCA busy time with including/excluding channel
tx and rx time.

Change-Id: I8e295ed4cd7b2ceca44b64140977603a4d8e8764
CRs-Fixed: 2732018
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-06-15 15:31:07 -03:00
Bapiraju Alla
dbd74e07f0 qcacmn: Add service bit support for tx and rx time in channel stats
Add service bit support for channel tx and rx time in channel stats.
This service bit helps in not interpreting the default values for
tx_time and rx_time when new driver version is used with old firmware
where this tx_time and rx_time support is not present.

Change-Id: Icc7668f5842677ac6ef48176568301753e217ea7
CRs-Fixed: 2751500
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-06-15 15:31:07 -03:00
Richard Raya
3143685e95 Merge branch 'linux-4.14.y' of https://github.com/openela/kernel-lts
* 'linux-4.14.y' of https://github.com/openela/kernel-lts: (278 commits)
  LTS: Update to 4.14.348
  docs: kernel_include.py: Cope with docutils 0.21
  serial: kgdboc: Fix NMI-safety problems from keyboard reset code
  btrfs: add missing mutex_unlock in btrfs_relocate_sys_chunks()
  dm: limit the number of targets and parameter size area
  Revert "selftests: mm: fix map_hugetlb failure on 64K page size systems"
  LTS: Update to 4.14.347
  rds: Fix build regression.
  RDS: IB: Use DEFINE_PER_CPU_SHARED_ALIGNED for rds_ib_stats
  af_unix: Suppress false-positive lockdep splat for spin_lock() in __unix_gc().
  net: fix out-of-bounds access in ops_init
  drm/vmwgfx: Fix invalid reads in fence signaled events
  dyndbg: fix old BUG_ON in >control parser
  tipc: fix UAF in error path
  usb: gadget: f_fs: Fix a race condition when processing setup packets.
  usb: gadget: composite: fix OS descriptors w_value logic
  firewire: nosy: ensure user_length is taken into account when fetching packet contents
  af_unix: Fix garbage collector racing against connect()
  af_unix: Do not use atomic ops for unix_sk(sk)->inflight.
  ipv6: fib6_rules: avoid possible NULL dereference in fib6_rule_action()
  ...

Change-Id: If329d39dd4e95e14045bb7c58494c197d1352d60
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-06-04 16:33:29 -03:00
Samuel Thibault
68e8ffca8b speakup: Avoid crash on very long word
commit c8d2f34ea96ea3bce6ba2535f867f0d4ee3b22e1 upstream.

In case a console is set up really large and contains a really long word
(> 256 characters), we have to stop before the length of the word buffer.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Fixes: c6e3fd22cd538 ("Staging: add speakup to the staging directory")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240323164843.1426997-1-samuel.thibault@ens-lyon.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 756c5cb7c09e537b87b5d3acafcb101b2ccf394f)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-05-31 12:30:40 +00:00
Nikita Zhandarovich
40aa14ae1d comedi: vmk80xx: fix incomplete endpoint checking
commit d1718530e3f640b7d5f0050e725216eab57a85d8 upstream.

While vmk80xx does have endpoint checking implemented, some things
can fall through the cracks. Depending on the hardware model,
URBs can have either bulk or interrupt type, and current version
of vmk80xx_find_usb_endpoints() function does not take that fully
into account. While this warning does not seem to be too harmful,
at the very least it will crash systems with 'panic_on_warn' set on
them.

Fix the issue found by Syzkaller [1] by somewhat simplifying the
endpoint checking process with usb_find_common_endpoints() and
ensuring that only expected endpoint types are present.

This patch has not been tested on real hardware.

[1] Syzkaller report:
usb 1-1: BOGUS urb xfer, pipe 1 != type 3
WARNING: CPU: 0 PID: 781 at drivers/usb/core/urb.c:504 usb_submit_urb+0xc4e/0x18c0 drivers/usb/core/urb.c:503
...
Call Trace:
 <TASK>
 usb_start_wait_urb+0x113/0x520 drivers/usb/core/message.c:59
 vmk80xx_reset_device drivers/comedi/drivers/vmk80xx.c:227 [inline]
 vmk80xx_auto_attach+0xa1c/0x1a40 drivers/comedi/drivers/vmk80xx.c:818
 comedi_auto_config+0x238/0x380 drivers/comedi/drivers.c:1067
 usb_probe_interface+0x5cd/0xb00 drivers/usb/core/driver.c:399
...

Similar issue also found by Syzkaller:
Link: https://syzkaller.appspot.com/bug?extid=5205eb2f17de3e01946e

Reported-and-tested-by: syzbot+5f29dc6a889fc42bd896@syzkaller.appspotmail.com
Cc: stable <stable@kernel.org>
Fixes: 49253d542cc0 ("staging: comedi: vmk80xx: factor out usb endpoint detection")
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Link: https://lore.kernel.org/r/20240408171633.31649-1-n.zhandarovich@fintech.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 3a63ae0348d990e137cca04eced5b08379969ea9)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-05-31 12:30:39 +00:00
Dan Carpenter
5314097a03 staging: vc04_services: fix information leak in create_component()
[ Upstream commit f37e76abd614b68987abc8e5c22d986013349771 ]

The m.u.component_create.pid field is for debugging and in the mainline
kernel it's not used anything.  However, it still needs to be set to
something to prevent disclosing uninitialized stack data.  Set it to
zero.

Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.")
Cc: stable <stable@kernel.org>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/2d972847-9ebd-481b-b6f9-af390f5aabd3@moroto.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 4693868e40b1367d1def54e5ea750da2d288da67)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-05-30 09:00:43 +00:00
Arnd Bergmann
5e236ea4cd staging: vc04_services: changen strncpy() to strscpy_pad()
[ Upstream commit ef25725b7f8aaffd7756974d3246ec44fae0a5cf ]

gcc-14 warns about this strncpy() that results in a non-terminated
string for an overflow:

In file included from include/linux/string.h:369,
                 from drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:20:
In function 'strncpy',
    inlined from 'create_component' at drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:940:2:
include/linux/fortify-string.h:108:33: error: '__builtin_strncpy' specified bound 128 equals destination size [-Werror=stringop-truncation]

Change it to strscpy_pad(), which produces a properly terminated and
zero-padded string.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240313163712.224585-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: f37e76abd614 ("staging: vc04_services: fix information leak in create_component()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 3a54069c1398266c7523f24db52391f7d54be13f)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-05-30 09:00:43 +00:00
Dave Stevenson
1fbb48548b staging: mmal-vchiq: Fix client_component for 64 bit kernel
[ Upstream commit 22e64b486adc4785542f8002c3af4c895490f841 ]

The MMAL client_component field is used with the event
mechanism to allow the client to identify the component for
which the event is generated.
The field is only 32bits in size, therefore we can't use a
pointer to the component in a 64 bit kernel.

Component handles are already held in an array per VCHI
instance, so use the array index as the client_component handle
to avoid having to create a new IDR for this purpose.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-5-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: f37e76abd614 ("staging: vc04_services: fix information leak in create_component()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 60cb8c4ae9874e8b7906302306e85e3138cb19fc)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-05-30 09:00:43 +00:00
Dave Stevenson
cde080763f staging: mmal-vchiq: Allocate and free components as required
[ Upstream commit 8c589e1794a31e9a381916b0280260ab601e4d6e ]

The existing code assumed that there would only ever be 4 components,
and never freed the entries once used.
Allow arbitrary creation and destruction of components.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200623164235.29566-3-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: f37e76abd614 ("staging: vc04_services: fix information leak in create_component()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 48823cc0c75c3290d82b339f2135e54d6c20eaaa)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-05-30 09:00:43 +00:00
Dave Stevenson
4a254ec690 staging: mmal-vchiq: Avoid use of bool in structures
[ Upstream commit 640e77466e69d9c28de227bc76881f5501f532ca ]

Fixes up a checkpatch error "Avoid using bool structure members
because of possible alignment issues".

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: f37e76abd614 ("staging: vc04_services: fix information leak in create_component()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 11895fd09f5d37abbc60ac88f4897587997cfbf5)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-05-30 09:00:43 +00:00
Ian Abbott
8e23affd6f comedi: comedi_test: Prevent timers rescheduling during deletion
commit f53641a6e849034a44bf80f50245a75d7a376025 upstream.

The comedi_test devices have a couple of timers (ai_timer and ao_timer)
that can be started to simulate hardware interrupts.  Their expiry
functions normally reschedule the timer.  The driver code calls either
del_timer_sync() or del_timer() to delete the timers from the queue, but
does not currently prevent the timers from rescheduling themselves so
synchronized deletion may be ineffective.

Add a couple of boolean members (one for each timer: ai_timer_enable and
ao_timer_enable) to the device private data structure to indicate
whether the timers are allowed to reschedule themselves.  Set the member
to true when adding the timer to the queue, and to false when deleting
the timer from the queue in the waveform_ai_cancel() and
waveform_ao_cancel() functions.

The del_timer_sync() function is also called from the waveform_detach()
function, but the timer enable members will already be set to false when
that function is called, so no change is needed there.

Fixes: 403fe7f34e33 ("staging: comedi: comedi_test: fix timer race conditions")
Cc: stable@vger.kernel.org # 4.4+
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20240214100747.16203-1-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 4b6e87971dbea7d9231f670281723003f90429b2)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-05-30 09:00:39 +00:00
Samuel Thibault
4f84ef5651 speakup: Fix 8bit characters from direct synth
[ Upstream commit b6c8dafc9d86eb77e502bb018ec4105e8d2fbf78 ]

When userland echoes 8bit characters to /dev/synth with e.g.

echo -e '\xe9' > /dev/synth

synth_write would get characters beyond 0x7f, and thus negative when
char is signed.  When given to synth_buffer_add which takes a u16, this
would sign-extend and produce a U+ffxy character rather than U+xy.
Users thus get garbled text instead of accents in their output.

Let's fix this by making sure that we read unsigned characters.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Fixes: 89fc2ae80bb1 ("speakup: extend synth buffer to 16bit unicode characters")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240204155736.2oh4ot7tiaa2wpbh@begin
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 37f4f4f1ac2661c1cc7766a324d34b24f65e75e8)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-05-30 09:00:38 +00:00
John Galt
e9c33dabd0 msm-4.14: Selectively extend over inline optimization
Change-Id: I770a6de39a25b71cb9609343b93e8b26cf056017
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-05-10 15:48:34 -03:00
Richard Raya
59c72f3544 Merge branch 'linux-4.14.y' of https://github.com/openela/kernel-lts
* 'linux-4.14.y' of https://github.com/openela/kernel-lts: (186 commits)
  LTS: Update to 4.14.344
  binder: signal epoll threads of self-work
  ANDROID: binder: Add thread->process_todo flag.
  scsi: bnx2fc: Fix skb double free in bnx2fc_rcv()
  scsi: bnx2fc: Remove set but not used variable 'oxid'
  net: check dev->gso_max_size in gso_features_check()
  driver: staging: count ashmem_range into SLAB_RECLAIMBLE
  net: warn if gso_type isn't set for a GSO SKB
  staging: android: ashmem: Remove use of unlikely()
  ALSA: hda/realtek: Enable headset on Lenovo M90 Gen5
  ALSA: hda/realtek: Enable headset onLenovo M70/M90
  ALSA: hda/realtek: Add quirk for Lenovo TianYi510Pro-14IOB
  ALSA: hda/realtek - ALC897 headset MIC no sound
  ALSA: hda/realtek - Add headset Mic support for Lenovo ALC897 platform
  ALSA: hda/realtek: Fix the mic type detection issue for ASUS G551JW
  ALSA: hda/realtek - The front Mic on a HP machine doesn't work
  ALSA: hda/realtek - Enable the headset of Acer N50-600 with ALC662
  ALSA: hda/realtek - Enable headset mic of Acer X2660G with ALC662
  ALSA: hda/realtek - Add Headset Mic supported for HP cPC
  ALSA: hda/realtek - More constifications
  ...

Change-Id: I3d093c0e457ab7e7e7b98b46eb44e82b6f4636f9
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-05-08 19:24:35 -03:00
Zhaoyang Huang
2dd12d177f driver: staging: count ashmem_range into SLAB_RECLAIMBLE
[ Upstream commit 3989f5a5f81c97732f9e3b3ae2d1d7923f6e7653 ]

Add SLAB_RECLAIM_ACCOUNT to ashmem_range cache since it has registered
shrinker, which make memAvailable more presiced.

Acked-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
Link: https://lore.kernel.org/r/1608277668-3740-1-git-send-email-huangzhaoyang@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 24ab059d2ebd ("net: check dev->gso_max_size in gso_features_check()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
2024-05-06 14:36:43 +00:00
Alistair Strachan
97ad753fc2 staging: android: ashmem: Remove use of unlikely()
[ Upstream commit 59848d6aded59a644bd3199033a9dc5a66d528f5 ]

There is no speed difference, and it makes the code harder to read.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Todd Kjos <tkjos@android.com>
Cc: Martijn Coenen <maco@android.com>
Cc: devel@driverdev.osuosl.org
Cc: linux-kernel@vger.kernel.org
Cc: kernel-team@android.com
Cc: Joel Fernandes <joel@joelfernandes.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Alistair Strachan <astrachan@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 24ab059d2ebd ("net: check dev->gso_max_size in gso_features_check()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
2024-05-06 14:36:43 +00:00
Marco Felsch
f62619a3cf usb: typec: tcpci: clear the fault status bit
[ Upstream commit 23e60c8daf5ec2ab1b731310761b668745fcf6ed ]

According the "USB Type-C Port Controller Interface Specification v2.0"
the TCPC sets the fault status register bit-7
(AllRegistersResetToDefault) once the registers have been reset to
their default values.

This triggers an alert(-irq) on PTN5110 devices albeit we do mask the
fault-irq, which may cause a kernel hang. Fix this generically by writing
a one to the corresponding bit-7.

Cc: stable@vger.kernel.org
Fixes: 74e656d6b055 ("staging: typec: Type-C Port Controller Interface driver (tcpci)")
Reported-by: "Angus Ainslie (Purism)" <angus@akkea.ca>
Closes: https://lore.kernel.org/all/20190508002749.14816-2-angus@akkea.ca/
Reported-by: Christian Bach <christian.bach@scs.ch>
Closes: https://lore.kernel.org/regressions/ZR0P278MB07737E5F1D48632897D51AC3EB329@ZR0P278MB0773.CHEP278.PROD.OUTLOOK.COM/t/
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230816172502.1155079-1-festevam@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
[Harshit: Added conflict resolution notes, the conflict is due to
missing commit: 8f9439022648 ("staging: typec: handle vendor defined
part and modify drp toggling flow") in 4.14.y]
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
2024-05-06 14:36:39 +00:00
Li Jun
19fac3944e usb: typec: add fwnode to tcpc
[ Upstream commit 5e85a04c8c0d271d7561a770b85741f186398868 ]

Add fwnode handle to get the fwnode so we can get typec configs
it contains.

Suggested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 23e60c8daf5e ("usb: typec: tcpci: clear the fault status bit")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
2024-05-06 14:36:39 +00:00
Gabriel L. Somlo
34c3c637ca staging: typec: fix endianness mismatch identified by sparse
[ Upstream commit 81948cbcf12cb16a6f5fad9c86233a596e2f47ab ]

Eliminate the following sparse warnings:

tcpci.c:291:38: warning: incorrect type in argument 1 (different base types)
tcpci.c:291:38:    expected unsigned short [unsigned] [usertype] header
tcpci.c:291:38:    got restricted __le16 const [usertype] header
tcpci.c:296:16: warning: incorrect type in assignment (different base types)
tcpci.c:296:16:    expected unsigned int [unsigned] header
tcpci.c:296:16:    got restricted __le16
tcpci.c:394:28: warning: incorrect type in assignment (different base types)
tcpci.c:394:28:    expected restricted __le16 [usertype] header
tcpci.c:394:28:    got unsigned int [unsigned] [addressable] reg

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 23e60c8daf5e ("usb: typec: tcpci: clear the fault status bit")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
2024-05-06 14:36:39 +00:00
Guenter Roeck
8e8afe4f14 staging: typec: tcpm: Document data structures
[ Upstream commit 98076fa64a05dd2bda3a9f38e171bade15ab507d ]

Document struct tcpc_config and struct tcpc_dev.
Drop unused TCPC_USB_SWITCH_RESTORE.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 23e60c8daf5e ("usb: typec: tcpci: clear the fault status bit")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
2024-05-06 14:36:39 +00:00
Richard Raya
d5b9f06c4e Merge branch 'linux-4.14.y' of https://github.com/openela/kernel-lts
* 'linux-4.14.y' of https://github.com/openela/kernel-lts: (176 commits)
  LTS: Update to 4.14.343
  crypto: af_alg - Work around empty control messages without MSG_MORE
  crypto: af_alg - Fix regression on empty requests
  spi: spi-mt65xx: Fix NULL pointer access in interrupt handler
  net/bnx2x: Prevent access to a freed page in page_pool
  hsr: Handle failures in module init
  rds: introduce acquire/release ordering in acquire/release_in_xmit()
  hsr: Fix uninit-value access in hsr_get_node()
  net: hsr: fix placement of logical operator in a multi-line statement
  usb: gadget: net2272: Use irqflags in the call to net2272_probe_fin
  staging: greybus: fix get_channel_from_mode() failure path
  serial: 8250_exar: Don't remove GPIO device on suspend
  rtc: mt6397: select IRQ_DOMAIN instead of depending on it
  rtc: mediatek: enhance the description for MediaTek PMIC based RTC
  tty: serial: samsung: fix tx_empty() to return TIOCSER_TEMT
  serial: max310x: fix syntax error in IRQ error message
  clk: qcom: gdsc: Add support to update GDSC transition delay
  NFS: Fix an off by one in root_nfs_cat()
  net: sunrpc: Fix an off by one in rpc_sockaddr2uaddr()
  scsi: bfa: Fix function pointer type mismatch for hcb_qe->cbfn
  ...

Change-Id: Ib9b7d4f4fbb66b54b4fc2d35e945418da4c02331
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-04-18 09:46:38 -03:00
Dan Carpenter
5bc6fb9dd8 staging: greybus: fix get_channel_from_mode() failure path
[ Upstream commit 34164202a5827f60a203ca9acaf2d9f7d432aac8 ]

The get_channel_from_mode() function is supposed to return the channel
which matches the mode.  But it has a bug where if it doesn't find a
matching channel then it returns the last channel.  It should return
NULL instead.

Also remove an unnecessary NULL check on "channel".

Fixes: 2870b52bae4c ("greybus: lights: add lights implementation")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/379c0cb4-39e0-4293-8a18-c7b1298e5420@moroto.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 40bbb7e4e83a53b5ae2c4b79c675618159571d83)
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
2024-04-16 10:30:35 +00:00
Richard Raya
a9e2d194be Merge branch 'linux-4.14.y' of https://github.com/openela/kernel-lts
* 'linux-4.14.y' of https://github.com/openela/kernel-lts: (350 commits)
  LTS: Update to 4.14.340
  fs/aio: Restrict kiocb_set_cancel_fn() to I/O submitted via libaio
  KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table()
  PCI/MSI: Prevent MSI hardware interrupt number truncation
  s390: use the correct count for __iowrite64_copy()
  packet: move from strlcpy with unused retval to strscpy
  ipv6: sr: fix possible use-after-free and null-ptr-deref
  nouveau: fix function cast warnings
  scsi: jazz_esp: Only build if SCSI core is builtin
  RDMA/srpt: fix function pointer cast warnings
  RDMA/srpt: Support specifying the srpt_service_guid parameter
  IB/hfi1: Fix a memleak in init_credit_return
  usb: gadget: ncm: Avoid dropping datagrams of properly parsed NTBs
  l2tp: pass correct message length to ip6_append_data
  gtp: fix use-after-free and null-ptr-deref in gtp_genl_dump_pdp()
  dm-crypt: don't modify the data when using authenticated encryption
  mm: memcontrol: switch to rcu protection in drain_all_stock()
  s390/qeth: Fix potential loss of L3-IP@ in case of network issues
  virtio-blk: Ensure no requests in virtqueues before deleting vqs.
  firewire: core: send bus reset promptly on gap count error
  ...

Change-Id: Ieafdd459ee41343bf15ed781b3e45adc2be29cc1
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-03-26 00:15:05 -03:00
Richard Raya
00b8c3ab9a Merge tag 'LA.UM.9.1.r1-15900.01-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn into HEAD
"LA.UM.9.1.r1-15900.01-SMxxx0.QSSI14.0"

* tag 'LA.UM.9.1.r1-15900.01-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn:
  qcacmn: Fix out of bound read issue in ESP ie parse
  qcacmn: Add sanity check to fix OOB issue
  qcacmn: Fix OOB issue

Change-Id: I7e29f6624ba8c1999528a4e62773aef2e34d855f
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-03-25 23:06:37 -03:00
Richard Raya
01082e5cb5 Merge tag 'LA.UM.9.1.r1-15900.01-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api into HEAD
"LA.UM.9.1.r1-15900.01-SMxxx0.QSSI14.0"

* tag 'LA.UM.9.1.r1-15900.01-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api: (55 commits)
  fw-api: CL 25639871 - update fw common interface files
  fw-api: CL 25638846 - update fw common interface files
  fw-api: CL 25637760 - update fw common interface files
  fw-api: CL 25636238 - update fw common interface files
  fw-api: CL 25618622 - update fw common interface files
  fw-api: CL 25612024 - update fw common interface files
  fw-api: CL 25601210 - update fw common interface files
  fw-api: CL 25598308 - update fw common interface files
  fw-api: CL 25585821 - update fw common interface files
  fw-api: CL 25582070 - update fw common interface files
  fw-api: CL 25582068 - update fw common interface files
  fw-api: CL 25560130 - update fw common interface files
  fw-api: CL 25538998 - update fw common interface files
  fw-api: CL 25538692 - update fw common interface files
  fw-api: CL 25526295 - update fw common interface files
  fw-api: CL 25522189 - update fw common interface files
  fw-api: CL 25493022 - update fw common interface files
  fw-api: CL 25473754 - update fw common interface files
  fw-api: CL 25397057 - update fw common interface files
  fw-api: CL 25394812 - update fw common interface files
  ...

Change-Id: I87e8adb921ac3406b8f9b8d8ebecbe995250b44e
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-03-25 23:06:22 -03:00
Richard Raya
6c15b91f33 Merge tag 'LA.UM.9.1.r1-15900.01-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0 into HEAD
"LA.UM.9.1.r1-15900.01-SMxxx0.QSSI14.0"

* tag 'LA.UM.9.1.r1-15900.01-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0:
  Release 5.2.022.12B
  qcacld-3.0: Ignore CSA request for invalid channel
  Release 5.2.022.12A
  qcacld-3.0: Fix OOB in wma_scan_roam.c
  Release 5.2.022.12
  qcacld-3.0: Don't start vdev trans if vdev ops is pending
  Release 5.2.022.11Z
  qcacld-3.0: Move SAP to STA channel during SAP start

Change-Id: I8578437302c696b0b1fa403f317b80a20269ecf4
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-03-25 23:06:09 -03:00
David Schiller
d375940a2f staging: iio: ad5933: fix type mismatch regression
commit 6db053cd949fcd6254cea9f2cd5d39f7bd64379c upstream.

Commit 4c3577db3e4f ("Staging: iio: impedance-analyzer: Fix sparse
warning") fixed a compiler warning, but introduced a bug that resulted
in one of the two 16 bit IIO channels always being zero (when both are
enabled).

This is because int is 32 bits wide on most architectures and in the
case of a little-endian machine the two most significant bytes would
occupy the buffer for the second channel as 'val' is being passed as a
void pointer to 'iio_push_to_buffers()'.

Fix by defining 'val' as u16. Tested working on ARM64.

Fixes: 4c3577db3e4f ("Staging: iio: impedance-analyzer: Fix sparse warning")
Signed-off-by: David Schiller <david.schiller@jku.at>
Link: https://lore.kernel.org/r/20240122134916.2137957-1-david.schiller@jku.at
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 4a0efde7875822485ebfd991874d454d2347e1a0)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-03-08 08:21:39 +00:00
Richard Raya
9cdc78c354 Merge branch 'android-4.14-stable' of https://android.googlesource.com/kernel/common
* 'android-4.14-stable' of https://android.googlesource.com/kernel/common: (2966 commits)
  Linux 4.14.331
  net: sched: fix race condition in qdisc_graft()
  scsi: virtio_scsi: limit number of hw queues by nr_cpu_ids
  ext4: remove gdb backup copy for meta bg in setup_new_flex_group_blocks
  ext4: correct return value of ext4_convert_meta_bg
  ext4: correct offset of gdb backup in non meta_bg group to update_backups
  ext4: apply umask if ACL support is disabled
  media: venus: hfi: fix the check to handle session buffer requirement
  media: sharp: fix sharp encoding
  i2c: i801: fix potential race in i801_block_transaction_byte_by_byte
  net: dsa: lan9303: consequently nested-lock physical MDIO
  ALSA: info: Fix potential deadlock at disconnection
  parisc/pgtable: Do not drop upper 5 address bits of physical address
  parisc: Prevent booting 64-bit kernels on PA1.x machines
  mcb: fix error handling for different scenarios when parsing
  jbd2: fix potential data lost in recovering journal raced with synchronizing fs bdev
  genirq/generic_chip: Make irq_remove_generic_chip() irqdomain aware
  mmc: meson-gx: Remove setting of CMD_CFG_ERROR
  PM: hibernate: Clean up sync_read handling in snapshot_write_next()
  PM: hibernate: Use __get_safe_page() rather than touching the list
  ...

Change-Id: I755d2aa7c525ace28adc4aee433572b3110ea39b
2023-12-07 20:15:44 -03:00