Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
4caaf29
arm64/scs: Fix handling of advance_loc4
peppergrayxyz Mar 10, 2026
b590854
HID: wacom: fix out-of-bounds read in wacom_intuos_bt_irq
dlelcldkekslele Mar 3, 2026
e6b1e81
atm: lec: fix use-after-free in sock_def_readable()
deepanshu406 Mar 9, 2026
3dc4733
btrfs: don't take device_list_mutex when querying zone info
morbidrsa Mar 3, 2026
e00f0eb
tg3: replace placeholder MAC address with device property
Mar 14, 2026
10180cf
objtool: Fix Clang jump table detection
jpoimboe Mar 9, 2026
ef60978
HID: multitouch: Check to ensure report responses match the request
lag-linaro Feb 27, 2026
016dd75
i2c: tegra: Don't mark devices with pins as IRQ safe
cyndis Mar 3, 2026
55c5bed
btrfs: reject root items with drop_progress and zero drop_level
Gality369 Mar 12, 2026
a51a182
spi: geni-qcom: Check DMA interrupts early in ISR
ptalari27 Mar 13, 2026
fa664b4
dt-bindings: auxdisplay: ht16k33: Use unevaluatedProperties to fix co…
nxpfrankli Mar 2, 2026
fb1211c
wifi: ath11k: skip status ring entry processing
May 3, 2024
c9f45fd
wifi: ath11k: Use dma_alloc_noncoherent for rx_tid buffer allocation
Jan 19, 2025
8aac493
wifi: ath11k: Pass the correct value of each TID during a stop AMPDU …
Mar 19, 2026
ae976df
crypto: caam - fix DMA corruption on long hmac keys
horiag Mar 17, 2026
1141137
crypto: caam - fix overflow on long hmac keys
horiag Mar 17, 2026
c760525
crypto: af-alg - fix NULL pointer dereference in scatterwalk
nszetei Mar 25, 2026
0615796
net: fec: fix the PTP periodic output sysfs interface
Mar 24, 2026
799081a
net: qrtr: replace qrtr_tx_flow radix_tree with xarray to fix memory …
mrpre Mar 24, 2026
4c38890
net: ipv6: ndisc: fix ndisc_ra_useropt to initialize nduseropt_padX f…
echelonh Mar 24, 2026
f237cb4
net/ipv6: ioam6: prevent schema length wraparound in trace fill
neosys007 Mar 25, 2026
120cabb
tg3: Fix race for querying speed/duplex
Mar 25, 2026
6f29a2a
ipv6: icmp: clear skb2->cb[] in ip6_err_gen_icmpv6_unreach()
edumazet Mar 26, 2026
f2e9e15
ip6_tunnel: clear skb2->cb[] in ip4ip6_err()
edumazet Mar 26, 2026
cc48eb9
bridge: br_nd_send: linearize skb before parsing ND options
Mar 26, 2026
4cb9683
net/sched: sch_hfsc: fix divide-by-zero in rtsc_min()
n132 Mar 26, 2026
a3e1aa7
ASoC: ep93xx: Fix unchecked clk_prepare_enable() and add rollback on …
JihedChaibi Mar 24, 2026
73613a7
ipv6: prevent possible UaF in addrconf_permanent_addr()
Mar 27, 2026
c337071
net: sched: cls_api: fix tc_chain_fill_node to initialize tcm_info to…
echelonh Mar 28, 2026
fe92e6a
NFC: pn533: bound the UART receive buffer
neosys007 Mar 26, 2026
c45f1f6
net: xilinx: axienet: Correct BD length masks to match AXIDMA IP spec
Mar 27, 2026
73dfa99
bpf: Fix regsafe() for pointers to packet
Mar 31, 2026
a0cbea3
net: ipv6: flowlabel: defer exclusive option free until RCU teardown
ARC-CPS Mar 30, 2026
418611d
netfilter: flowtable: strictly check for maximum number of actions
ummakynes Mar 25, 2026
686d4d1
netfilter: nfnetlink_log: account for netlink header size
Mar 26, 2026
f689d7d
netfilter: x_tables: ensure names are nul-terminated
Mar 31, 2026
dc968d2
netfilter: ipset: use nla_strcmp for IPSET_ATTR_NAME attr
Mar 30, 2026
9bdfe23
netfilter: nf_conntrack_helper: pass helper to expect cleanup
Mar 29, 2026
04ecac5
netfilter: ctnetlink: zero expect NAT fields when CTA_EXPECT_NAT absent
Mar 31, 2026
3548ddf
netfilter: nf_conntrack_expect: honor expectation helper field
ummakynes Mar 25, 2026
10312de
netfilter: nf_conntrack_expect: use expect->helper
ummakynes Mar 25, 2026
8167038
netfilter: nf_conntrack_expect: store netns and zone in expectation
ummakynes Mar 25, 2026
c2587f8
netfilter: ctnetlink: ignore explicit helper on new expectations
ummakynes Mar 30, 2026
33d496b
netfilter: x_tables: restrict xt_check_match/xt_check_target extensio…
ummakynes Mar 31, 2026
61d84fd
netfilter: nf_tables: reject immediate NF_QUEUE verdict
ummakynes Mar 31, 2026
ea61d6b
Bluetooth: hci_sync: call destroy in hci_cmd_sync_run if immediate
pv Mar 25, 2026
d939f4c
Bluetooth: SCO: fix race conditions in sco_sock_connect()
zzzccc427 Mar 26, 2026
07986ac
Bluetooth: MGMT: validate LTK enc_size on load
Niebelungen-D Mar 28, 2026
68008b9
Bluetooth: hci_event: fix potential UAF in hci_le_remote_conn_param_r…
pv Mar 29, 2026
8d5f85a
Bluetooth: MGMT: validate mesh send advertising payload length
Niebelungen-D Apr 1, 2026
10686b8
rds: ib: reject FRMR registration before IB connection is established
winmin Mar 30, 2026
ff335cb
bpf: sockmap: Fix use-after-free of sk->sk_socket in sk_psock_verdict…
q2ven Apr 1, 2026
c575d55
net/sched: sch_netem: fix out-of-bounds access in packet corruption
sparkfade Mar 31, 2026
aacf477
net: macb: fix clk handling on PCI glue driver removal
pchelkin91 Mar 30, 2026
4126101
net: macb: properly unregister fixed rate clocks
pchelkin91 Mar 30, 2026
3caf76d
net/mlx5: lag: Check for LAG device before creating debugfs
shayshyi Mar 30, 2026
c05d737
net/mlx5: Avoid "No data available" when FW version queries fail
Mar 30, 2026
0ad3004
net/x25: Fix potential double free of skb
sch-m Mar 31, 2026
b769b6b
net/x25: Fix overflow when accumulating packets
sch-m Mar 31, 2026
56d2a15
net/sched: cls_fw: fix NULL pointer dereference on shared blocks
n132 Mar 31, 2026
931972a
net/sched: cls_flow: fix NULL pointer dereference on shared blocks
n132 Mar 31, 2026
04fae54
net: hsr: fix VLAN add unwind on slave errors
MocLG Apr 1, 2026
4dcf430
ipv6: avoid overflows in ip6_datagram_send_ctl()
edumazet Apr 1, 2026
d418287
bpf: reject direct access to nullable PTR_TO_BUF pointers
Apr 2, 2026
9bbb71b
iio: imu: bno055: fix BNO055_SCAN_CH_COUNT off by one
dlech Feb 14, 2026
a0d7796
accel/qaic: Handle DBC deactivation if the owner went away
Feb 5, 2026
dd73fcf
hwmon: (pxe1610) Check return value of page-select write in probe
Mar 29, 2026
fd97b08
dt-bindings: gpio: fix microchip #interrupt-cells
jamiegibbons Mar 26, 2026
aa5255d
hwmon: (tps53679) Fix device ID comparison and printing in tps53676_i…
Mar 30, 2026
1e40978
hwmon: (occ) Fix missing newline in occ_show_extended()
Mar 26, 2026
b9405d2
mips: ralink: update CPU clock index
DragonBluep Feb 24, 2026
c6aab5b
riscv: kgdb: fix several debug register assignment bugs
Mar 23, 2026
cd6a9a3
drm/ioc32: stop speculation on the drm_compat_ioctl path
gregkh Mar 24, 2026
93e2aa3
wifi: wilc1000: fix u8 overflow in SSID scan buffer size calculation
Mar 24, 2026
25ee3cd
wifi: iwlwifi: mvm: fix potential out-of-bounds read in iwl_mvm_nd_ma…
Feb 7, 2026
182c961
USB: serial: option: add MeiG Smart SRM825WN
ernestask Mar 24, 2026
6ae80b2
ALSA: caiaq: fix stack out-of-bounds read in init_card
berkgoksel Mar 29, 2026
cb42219
ALSA: ctxfi: Fix missing SPDIFI1 index handling
tiwai Mar 29, 2026
e1f4003
Bluetooth: SMP: derive legacy responder STK authentication from MITM …
1seal Mar 31, 2026
2548d97
Bluetooth: SMP: force responder MITM requirements before building the…
1seal Mar 31, 2026
4def1ac
MIPS: Fix the GCC version check for `__multi3' workaround
maciej-w-rozycki Mar 30, 2026
91b7baf
hwmon: (occ) Fix division by zero in occ_show_power_1()
Mar 26, 2026
d39e27e
mips: mm: Allocate tlb_vpn array atomically
sephalon Mar 10, 2026
2a51222
iio: adc: ti-adc161s626: fix buffer read on big-endian
dlech Mar 14, 2026
5e7d571
drm/ast: dp501: Fix initialization of SCU2C
tdz Mar 27, 2026
d96c781
drm/i915/dp: Use crtc_state->enhanced_framing properly on ivb/hsw CPU…
vsyrjala Mar 25, 2026
d756f3b
USB: serial: io_edgeport: add support for Blackbox IC135A
Feb 22, 2026
0c5c3be
USB: serial: option: add support for Rolling Wireless RW135R-GL
Mar 16, 2026
fd43a1b
USB: core: add NO_LPM quirk for Razer Kiyo Pro webcam
jphein Mar 31, 2026
db966b7
iio: adc: ti-adc161s626: use DMA-safe memory for spi_read()
dlech Mar 14, 2026
79435e9
Input: synaptics-rmi4 - fix a locking bug in an error path
bvanassche Feb 23, 2026
c7b2e38
Input: i8042 - add TUXEDO InfinityBook Max 16 Gen10 AMD to i8042 quir…
tuxedoxt Feb 23, 2026
ee10a6e
Input: xpad - add support for BETOP BTP-KP50B/C controller's wireless…
Headcrabed Apr 4, 2026
ee5029e
Input: xpad - add support for Razer Wolverine V3 Pro
ZlordHUN Apr 4, 2026
16e57dd
iio: accel: fix ADXL355 temperature signature value
andy9a9 Mar 13, 2026
c8bad23
iio: dac: ad5770r: fix error return in ad5770r_read_raw()
amiclaus Mar 12, 2026
98fa406
iio: light: vcnl4035: fix scan buffer on big-endian
dlech Mar 14, 2026
15bddfb
iio: imu: bmi160: Remove potential undefined behavior in bmi160_confi…
jpoimboe Mar 10, 2026
c512e4c
iio: imu: st_lsm6dsx: Set FIFO ODR for accelerometer and gyroscope only
Feb 25, 2026
84a1861
iio: gyro: mpu3050: Fix incorrect free_irq() variable
Feb 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ then:
required:
- refresh-rate-hz

additionalProperties: false
unevaluatedProperties: false

examples:
- |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ properties:
const: 2

"#interrupt-cells":
const: 1
const: 2

ngpios:
description:
Expand Down Expand Up @@ -84,7 +84,7 @@ examples:
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
#interrupt-cells = <2>;
interrupts = <53>, <53>, <53>, <53>,
<53>, <53>, <53>, <53>,
<53>, <53>, <53>, <53>,
Expand Down
8 changes: 8 additions & 0 deletions arch/arm64/kernel/patch-scs.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,14 @@ static int noinstr scs_handle_fde_frame(const struct eh_frame *frame,
size -= 2;
break;

case DW_CFA_advance_loc4:
loc += *opcode++ * code_alignment_factor;
loc += (*opcode++ << 8) * code_alignment_factor;
loc += (*opcode++ << 16) * code_alignment_factor;
loc += (*opcode++ << 24) * code_alignment_factor;
size -= 4;
break;

case DW_CFA_def_cfa:
case DW_CFA_offset_extended:
size = skip_xleb128(&opcode, size);
Expand Down
6 changes: 3 additions & 3 deletions arch/mips/lib/multi3.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
#include "libgcc.h"

/*
* GCC 7 & older can suboptimally generate __multi3 calls for mips64r6, so for
* GCC 9 & older can suboptimally generate __multi3 calls for mips64r6, so for
* that specific case only we implement that intrinsic here.
*
* See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82981
*/
#if defined(CONFIG_64BIT) && defined(CONFIG_CPU_MIPSR6) && (__GNUC__ < 8)
#if defined(CONFIG_64BIT) && defined(CONFIG_CPU_MIPSR6) && (__GNUC__ < 10)

/* multiply 64-bit values, low 64-bits returned */
static inline long long notrace dmulu(long long a, long long b)
Expand Down Expand Up @@ -51,4 +51,4 @@ ti_type notrace __multi3(ti_type a, ti_type b)
}
EXPORT_SYMBOL(__multi3);

#endif /* 64BIT && CPU_MIPSR6 && GCC7 */
#endif /* 64BIT && CPU_MIPSR6 && GCC9 */
2 changes: 1 addition & 1 deletion arch/mips/mm/tlb-r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ static void __ref r4k_tlb_uniquify(void)

tlb_vpn_size = tlbsize * sizeof(*tlb_vpns);
tlb_vpns = (use_slab ?
kmalloc(tlb_vpn_size, GFP_KERNEL) :
kmalloc(tlb_vpn_size, GFP_ATOMIC) :
memblock_alloc_raw(tlb_vpn_size, sizeof(*tlb_vpns)));
if (WARN_ON(!tlb_vpns))
return; /* Pray local_flush_tlb_all() is good enough. */
Expand Down
8 changes: 4 additions & 4 deletions arch/mips/ralink/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ static const char *clk_cpu(int *idx)
{
switch (ralink_soc) {
case RT2880_SOC:
*idx = 0;
*idx = 1;
return "ralink,rt2880-sysc";
case RT3883_SOC:
*idx = 0;
*idx = 1;
return "ralink,rt3883-sysc";
case RT305X_SOC_RT3050:
*idx = 0;
*idx = 1;
return "ralink,rt3050-sysc";
case RT305X_SOC_RT3052:
*idx = 0;
*idx = 1;
return "ralink,rt3052-sysc";
case RT305X_SOC_RT3350:
*idx = 1;
Expand Down
7 changes: 4 additions & 3 deletions arch/riscv/kernel/kgdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ struct dbg_reg_def_t dbg_reg_def[DBG_MAX_REG_NUM] = {
{DBG_REG_T1, GDB_SIZEOF_REG, offsetof(struct pt_regs, t1)},
{DBG_REG_T2, GDB_SIZEOF_REG, offsetof(struct pt_regs, t2)},
{DBG_REG_FP, GDB_SIZEOF_REG, offsetof(struct pt_regs, s0)},
{DBG_REG_S1, GDB_SIZEOF_REG, offsetof(struct pt_regs, a1)},
{DBG_REG_S1, GDB_SIZEOF_REG, offsetof(struct pt_regs, s1)},
{DBG_REG_A0, GDB_SIZEOF_REG, offsetof(struct pt_regs, a0)},
{DBG_REG_A1, GDB_SIZEOF_REG, offsetof(struct pt_regs, a1)},
{DBG_REG_A2, GDB_SIZEOF_REG, offsetof(struct pt_regs, a2)},
Expand Down Expand Up @@ -244,8 +244,9 @@ sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task)
gdb_regs[DBG_REG_S6_OFF] = task->thread.s[6];
gdb_regs[DBG_REG_S7_OFF] = task->thread.s[7];
gdb_regs[DBG_REG_S8_OFF] = task->thread.s[8];
gdb_regs[DBG_REG_S9_OFF] = task->thread.s[10];
gdb_regs[DBG_REG_S10_OFF] = task->thread.s[11];
gdb_regs[DBG_REG_S9_OFF] = task->thread.s[9];
gdb_regs[DBG_REG_S10_OFF] = task->thread.s[10];
gdb_regs[DBG_REG_S11_OFF] = task->thread.s[11];
gdb_regs[DBG_REG_EPC_OFF] = task->thread.ra;
}

Expand Down
4 changes: 3 additions & 1 deletion crypto/af_alg.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,10 @@ static int af_alg_alloc_tsgl(struct sock *sk)
sg_init_table(sgl->sg, MAX_SGL_ENTS + 1);
sgl->cur = 0;

if (sg)
if (sg) {
sg_unmark_end(sg + MAX_SGL_ENTS - 1);
sg_chain(sg, MAX_SGL_ENTS + 1, sgl->sg);
}

list_add_tail(&sgl->list, &ctx->tsgl_list);
}
Expand Down
47 changes: 45 additions & 2 deletions drivers/accel/qaic/qaic_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ static int decode_deactivate(struct qaic_device *qdev, void *trans, u32 *msg_len
*/
return -ENODEV;

if (status) {
if (usr && status) {
/*
* Releasing resources failed on the device side, which puts
* us in a bind since they may still be in use, so enable the
Expand Down Expand Up @@ -1104,6 +1104,9 @@ static void *msg_xfer(struct qaic_device *qdev, struct wrapper_list *wrappers, u
mutex_lock(&qdev->cntl_mutex);
if (!list_empty(&elem.list))
list_del(&elem.list);
/* resp_worker() processed the response but the wait was interrupted */
else if (ret == -ERESTARTSYS)
ret = 0;
if (!ret && !elem.buf)
ret = -ETIMEDOUT;
else if (ret > 0 && !elem.buf)
Expand Down Expand Up @@ -1414,9 +1417,49 @@ static void resp_worker(struct work_struct *work)
}
mutex_unlock(&qdev->cntl_mutex);

if (!found)
if (!found) {
/*
* The user might have gone away at this point without waiting
* for QAIC_TRANS_DEACTIVATE_FROM_DEV transaction coming from
* the device. If this is not handled correctly, the host will
* not know that the DBC[n] has been freed on the device.
* Due to this failure in synchronization between the device and
* the host, if another user requests to activate a network, and
* the device assigns DBC[n] again, save_dbc_buf() will hang,
* waiting for dbc[n]->in_use to be set to false, which will not
* happen unless the qaic_dev_reset_clean_local_state() gets
* called by resetting the device (or re-inserting the module).
*
* As a solution, we look for QAIC_TRANS_DEACTIVATE_FROM_DEV
* transactions in the message before disposing of it, then
* handle releasing the DBC resources.
*
* Since the user has gone away, if the device could not
* deactivate the network (status != 0), there is no way to
* enable and reassign the DBC to the user. We can put trust in
* the device that it will release all the active DBCs in
* response to the QAIC_TRANS_TERMINATE_TO_DEV transaction,
* otherwise, the user can issue an soc_reset to the device.
*/
u32 msg_count = le32_to_cpu(msg->hdr.count);
u32 msg_len = le32_to_cpu(msg->hdr.len);
u32 len = 0;
int j;

for (j = 0; j < msg_count && len < msg_len; ++j) {
struct wire_trans_hdr *trans_hdr;

trans_hdr = (struct wire_trans_hdr *)(msg->data + len);
if (le32_to_cpu(trans_hdr->type) == QAIC_TRANS_DEACTIVATE_FROM_DEV) {
if (decode_deactivate(qdev, trans_hdr, &len, NULL))
len += le32_to_cpu(trans_hdr->len);
} else {
len += le32_to_cpu(trans_hdr->len);
}
}
Comment on lines +1446 to +1459
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fallback parsing of an unmatched device response uses msg_len = le32_to_cpu(msg->hdr.len) as the loop bound for indexing into msg->data. Since hdr.len is the total message length (including the header), this can read past the end of the encoded transactions (and into uninitialised bytes in the receive buffer). It also doesn't validate that trans_hdr->len is >= sizeof(*trans_hdr) / non-zero, so a malformed message could cause an infinite loop (len not advancing) or out-of-bounds access. Consider validating hdr.len against the maximum/received size and using a data length of (hdr.len - sizeof(msg->hdr)), plus per-transaction bounds checks before dereferencing trans_hdr or advancing len.

Suggested change
u32 len = 0;
int j;
for (j = 0; j < msg_count && len < msg_len; ++j) {
struct wire_trans_hdr *trans_hdr;
trans_hdr = (struct wire_trans_hdr *)(msg->data + len);
if (le32_to_cpu(trans_hdr->type) == QAIC_TRANS_DEACTIVATE_FROM_DEV) {
if (decode_deactivate(qdev, trans_hdr, &len, NULL))
len += le32_to_cpu(trans_hdr->len);
} else {
len += le32_to_cpu(trans_hdr->len);
}
}
u32 msg_data_len;
u32 len = 0;
int j;
if (msg_len < sizeof(msg->hdr) || msg_len > QAIC_MANAGE_EXT_MSG_LENGTH)
goto drop_resp_msg;
msg_data_len = msg_len - sizeof(msg->hdr);
for (j = 0; j < msg_count && len < msg_data_len; ++j) {
struct wire_trans_hdr *trans_hdr;
u32 trans_len;
if (msg_data_len - len < sizeof(*trans_hdr))
break;
trans_hdr = (struct wire_trans_hdr *)(msg->data + len);
trans_len = le32_to_cpu(trans_hdr->len);
if (trans_len < sizeof(*trans_hdr) || trans_len > msg_data_len - len)
break;
if (le32_to_cpu(trans_hdr->type) == QAIC_TRANS_DEACTIVATE_FROM_DEV) {
if (decode_deactivate(qdev, trans_hdr, &len, NULL))
len += trans_len;
} else {
len += trans_len;
}
}
drop_resp_msg:

Copilot uses AI. Check for mistakes.
/* request must have timed out, drop packet */
kfree(msg);
}

kfree(resp);
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/crypto/caam/caamalg_qi2.c
Original file line number Diff line number Diff line change
Expand Up @@ -3325,9 +3325,10 @@ static int ahash_setkey(struct crypto_ahash *ahash, const u8 *key,
if (aligned_len < keylen)
return -EOVERFLOW;

hashed_key = kmemdup(key, aligned_len, GFP_KERNEL);
hashed_key = kmalloc(aligned_len, GFP_KERNEL);
if (!hashed_key)
return -ENOMEM;
memcpy(hashed_key, key, keylen);
ret = hash_digest_key(ctx, &keylen, hashed_key, digestsize);
if (ret)
goto bad_free_key;
Expand Down
3 changes: 2 additions & 1 deletion drivers/crypto/caam/caamhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,10 @@ static int ahash_setkey(struct crypto_ahash *ahash,
if (aligned_len < keylen)
return -EOVERFLOW;

hashed_key = kmemdup(key, keylen, GFP_KERNEL);
hashed_key = kmalloc(aligned_len, GFP_KERNEL);
if (!hashed_key)
return -ENOMEM;
memcpy(hashed_key, key, keylen);
ret = hash_digest_key(ctx, &keylen, hashed_key, digestsize);
if (ret)
goto bad_free_key;
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/ast/ast_dp501.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ static void ast_init_analog(struct drm_device *dev)
/* Finally, clear bits [17:16] of SCU2c */
data = ast_read32(ast, 0x1202c);
data &= 0xfffcffff;
ast_write32(ast, 0, data);
ast_write32(ast, 0x1202c, data);

/* Disable DVO */
ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa3, 0xcf, 0x00);
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/drm_ioc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* IN THE SOFTWARE.
*/
#include <linux/compat.h>
#include <linux/nospec.h>
#include <linux/ratelimit.h>
#include <linux/export.h>

Expand Down Expand Up @@ -983,6 +984,7 @@ long drm_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
if (nr >= ARRAY_SIZE(drm_compat_ioctls))
return drm_ioctl(filp, cmd, arg);

nr = array_index_nospec(nr, ARRAY_SIZE(drm_compat_ioctls));
fn = drm_compat_ioctls[nr].fn;
if (!fn)
return drm_ioctl(filp, cmd, arg);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/display/g4x_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static void intel_dp_prepare(struct intel_encoder *encoder,
intel_dp->DP |= DP_SYNC_VS_HIGH;
intel_dp->DP |= DP_LINK_TRAIN_OFF_CPT;

if (drm_dp_enhanced_frame_cap(intel_dp->dpcd))
if (pipe_config->enhanced_framing)
intel_dp->DP |= DP_ENHANCED_FRAMING;

intel_dp->DP |= DP_PIPE_SEL_IVB(crtc->pipe);
Expand Down
7 changes: 7 additions & 0 deletions drivers/hid/hid-multitouch.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,12 +472,19 @@ static void mt_get_feature(struct hid_device *hdev, struct hid_report *report)
dev_warn(&hdev->dev, "failed to fetch feature %d\n",
report->id);
} else {
/* The report ID in the request and the response should match */
if (report->id != buf[0]) {
hid_err(hdev, "Returned feature report did not match the request\n");
goto free;
}

ret = hid_report_raw_event(hdev, HID_FEATURE_REPORT, buf,
size, 0);
if (ret)
dev_warn(&hdev->dev, "failed to report feature\n");
}

free:
kfree(buf);
}

Expand Down
10 changes: 10 additions & 0 deletions drivers/hid/wacom_wac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1256,10 +1256,20 @@ static int wacom_intuos_bt_irq(struct wacom_wac *wacom, size_t len)

switch (data[0]) {
case 0x04:
if (len < 32) {
dev_warn(wacom->pen_input->dev.parent,
"Report 0x04 too short: %zu bytes\n", len);
break;
}
wacom_intuos_bt_process_data(wacom, data + i);
i += 10;
fallthrough;
case 0x03:
if (i == 1 && len < 22) {
dev_warn(wacom->pen_input->dev.parent,
"Report 0x03 too short: %zu bytes\n", len);
break;
}
wacom_intuos_bt_process_data(wacom, data + i);
i += 10;
wacom_intuos_bt_process_data(wacom, data + i);
Expand Down
19 changes: 9 additions & 10 deletions drivers/hwmon/occ/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,12 @@ static ssize_t occ_show_freq_2(struct device *dev,
return sysfs_emit(buf, "%u\n", val);
}

static u64 occ_get_powr_avg(u64 accum, u32 samples)
{
return (samples == 0) ? 0 :
mul_u64_u32_div(accum, 1000000UL, samples);
}

static ssize_t occ_show_power_1(struct device *dev,
struct device_attribute *attr, char *buf)
{
Expand All @@ -441,9 +447,8 @@ static ssize_t occ_show_power_1(struct device *dev,
val = get_unaligned_be16(&power->sensor_id);
break;
case 1:
val = get_unaligned_be32(&power->accumulator) /
get_unaligned_be32(&power->update_tag);
val *= 1000000ULL;
val = occ_get_powr_avg(get_unaligned_be32(&power->accumulator),
get_unaligned_be32(&power->update_tag));
break;
case 2:
val = (u64)get_unaligned_be32(&power->update_tag) *
Expand All @@ -459,12 +464,6 @@ static ssize_t occ_show_power_1(struct device *dev,
return sysfs_emit(buf, "%llu\n", val);
}

static u64 occ_get_powr_avg(u64 accum, u32 samples)
{
return (samples == 0) ? 0 :
mul_u64_u32_div(accum, 1000000UL, samples);
}

static ssize_t occ_show_power_2(struct device *dev,
struct device_attribute *attr, char *buf)
{
Expand Down Expand Up @@ -725,7 +724,7 @@ static ssize_t occ_show_extended(struct device *dev,
switch (sattr->nr) {
case 0:
if (extn->flags & EXTN_FLAG_SENSOR_ID) {
rc = sysfs_emit(buf, "%u",
rc = sysfs_emit(buf, "%u\n",
get_unaligned_be32(&extn->sensor_id));
} else {
rc = sysfs_emit(buf, "%4phN\n", extn->name);
Expand Down
5 changes: 4 additions & 1 deletion drivers/hwmon/pmbus/pxe1610.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ static int pxe1610_probe(struct i2c_client *client)
* By default this device doesn't boot to page 0, so set page 0
* to access all pmbus registers.
*/
i2c_smbus_write_byte_data(client, PMBUS_PAGE, 0);
ret = i2c_smbus_write_byte_data(client, PMBUS_PAGE, 0);
if (ret < 0)
return dev_err_probe(&client->dev, ret,
"Failed to set page 0\n");

/* Read Manufacturer id */
ret = i2c_smbus_read_block_data(client, PMBUS_MFR_ID, buf);
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/pmbus/tps53679.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ static int tps53676_identify(struct i2c_client *client,
ret = i2c_smbus_read_block_data(client, PMBUS_IC_DEVICE_ID, buf);
if (ret < 0)
return ret;
if (strncmp("TI\x53\x67\x60", buf, 5)) {
dev_err(&client->dev, "Unexpected device ID: %s\n", buf);
if (ret != 6 || memcmp(buf, "TI\x53\x67\x60\x00", 6)) {
dev_err(&client->dev, "Unexpected device ID: %*ph\n", ret, buf);
return -ENODEV;
}

Expand Down
2 changes: 2 additions & 0 deletions drivers/i2c/busses/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,8 @@ config I2C_TEGRA
tristate "NVIDIA Tegra internal I2C controller"
depends on ARCH_TEGRA || (COMPILE_TEST && (ARC || ARM || ARM64 || M68K || RISCV || SUPERH || SPARC))
# COMPILE_TEST needs architectures with readsX()/writesX() primitives
depends on PINCTRL
# ARCH_TEGRA implies PINCTRL, but the COMPILE_TEST side doesn't.
help
If you say yes to this option, support will be included for the
I2C controller embedded in NVIDIA Tegra SOCs
Expand Down
5 changes: 4 additions & 1 deletion drivers/i2c/busses/i2c-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -1788,8 +1788,11 @@ static int tegra_i2c_probe(struct platform_device *pdev)
*
* VI I2C device shouldn't be marked as IRQ-safe because VI I2C won't
* be used for atomic transfers. ACPI device is not IRQ safe also.
*
* Devices with pinctrl states cannot be marked IRQ-safe as the pinctrl
* state transitions during runtime PM require mutexes.
*/
if (!IS_VI(i2c_dev) && !has_acpi_companion(i2c_dev->dev))
if (!IS_VI(i2c_dev) && !has_acpi_companion(i2c_dev->dev) && !i2c_dev->dev->pins)
pm_runtime_irq_safe(i2c_dev->dev);

pm_runtime_enable(i2c_dev->dev);
Expand Down
2 changes: 1 addition & 1 deletion drivers/iio/accel/adxl355_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ static const struct iio_chan_spec adxl355_channels[] = {
BIT(IIO_CHAN_INFO_OFFSET),
.scan_index = 3,
.scan_type = {
.sign = 's',
.sign = 'u',
.realbits = 12,
.storagebits = 16,
.endianness = IIO_BE,
Expand Down
Loading
Loading