5.10.188-rc1 review
Subsystems (10)
Greg Kroah-Hartman
maintainerPATCH 429/509 scsi: qla2xxx: Wait for io return on terminate rport
In reply to Greg Kroah-HartmanFrom: Quinn Tran <[email protected]>
commit fc0cba0c7be8261a1625098bd1d695077ec621c9 upstream.
System crash due to use after free.
Current code allows terminate_rport_io to exit before making sure all IOs has returned. For FCP-2 device, IO's can hang on in HW because driver has not tear down the session in FW at first sign of cable pull. When dev_loss_tmo timer pops, terminate_rport_io is called and upper layer is about to free various resources. Terminate_rport_io trigger qla to do the final cleanup, but the cleanup might not be fast enough where it leave qla still holding on to the same resource.
Wait for IO's to return to upper layer before resources are freed.
--- drivers/scsi/qla2xxx/qla_attr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/scsi/qla2xxx/qla_attr.c +13 -0
@@ -2698,6 +2698,7 @@ static void qla2x00_terminate_rport_io(struct fc_rport *rport) {fc_port_t *fcport = *(fc_port_t **)rport->dd_data; +scsi_qla_host_t *vha;if (!fcport)return ;
@@ -2707,9 +2708,12 @@ qla2x00_terminate_rport_io(struct fc_rpoif (test_bit (ABORT_ISP_ACTIVE , &fcport->vha->dpc_flags))return ; + vha = fcport->vha;if (unlikely (pci_channel_offline (fcport->vha->hw->pdev))) {qla2x00_abort_all_cmds (fcport->vha,DID_NO_CONNECT <<16 ); +qla2x00_eh_wait_for_pending_commands (fcport->vha, fcport->d_id.b24, +0 ,WAIT_TARGET );return ; }/*
@@ -2724,6 +2728,15 @@ qla2x00_terminate_rport_io(struct fc_rpoelse qla2x00_port_logout (fcport->vha, fcport); } + +/* check for any straggling io left behind */ +if (qla2x00_eh_wait_for_pending_commands (fcport->vha, fcport->d_id.b24,0 ,WAIT_TARGET )) { +ql_log (ql_log_warn, vha,0x300b , +"IO not return. Resetting. \n" ); +set_bit (ISP_ABORT_NEEDED , &vha->dpc_flags); +qla2xxx_wake_dpc (vha); +qla2x00_wait_for_chip_reset (vha); + } } static int
Greg Kroah-Hartman
maintainerPATCH 430/509 scsi: qla2xxx: Array index may go out of bound
In reply to Greg Kroah-HartmanFrom: Nilesh Javali <[email protected]>
commit d721b591b95cf3f290f8a7cbe90aa2ee0368388d upstream.
Klocwork reports array 'vha->host_str' of size 16 may use index value(s) 16..19. Use snprintf() instead of sprintf().
--- drivers/scsi/qla2xxx/qla_os.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_os.c +2 -1
@@ -4877,7 +4877,8 @@ struct scsi_qla_host *qla2x00_create_hos }INIT_DELAYED_WORK (&vha->scan.scan_work, qla_scan_work_fn); -sprintf (vha->host_str,"%s_%lu" ,QLA2XXX_DRIVER_NAME , vha->host_no); +snprintf (vha->host_str,sizeof (vha->host_str),"%s_%lu" , +QLA2XXX_DRIVER_NAME , vha->host_no); ql_dbg(ql_dbg_init, vha, 0x0041, "Allocated the host=%p hw=%p vha=%p dev_name=%s", vha->host, vha->hw, vha,
Greg Kroah-Hartman
maintainerPATCH 431/509 scsi: qla2xxx: Fix buffer overrun
In reply to Greg Kroah-HartmanFrom: Quinn Tran <[email protected]>
commit b68710a8094fdffe8dd4f7a82c82649f479bb453 upstream.
Klocwork warning: Buffer Overflow - Array Index Out of Bounds
Driver uses fc_els_flogi to calculate size of buffer. The actual buffer is nested inside of fc_els_flogi which is smaller.
Replace structure name to allow proper size calculation.
--- drivers/scsi/qla2xxx/qla_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_init.c +1 -1
@@ -5107,7 +5107,7 @@ static void qla_get_login_template(scsi___be32 *q;memset (ha->init_cb,0 , ha->init_cb_size); - sz =min_t (int,sizeof (struct fc_els_flogi ), ha->init_cb_size); + sz =min_t (int,sizeof (struct fc_els_csp ), ha->init_cb_size); rval =qla24xx_get_port_login_templ (vha, ha->init_cb_dma, ha->init_cb, sz);if (rval !=QLA_SUCCESS ) {
Greg Kroah-Hartman
maintainerPATCH 432/509 scsi: qla2xxx: Fix potential NULL pointer dereference
In reply to Greg Kroah-HartmanFrom: Bikash Hazarika <[email protected]>
commit 464ea494a40c6e3e0e8f91dd325408aaf21515ba upstream.
Klocwork tool reported 'cur_dsd' may be dereferenced. Add fix to validate pointer before dereferencing the pointer.
--- drivers/scsi/qla2xxx/qla_iocb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_iocb.c +2 -1
@@ -601,7 +601,8 @@ qla24xx_build_scsi_type_6_iocbs(srb_t *sput_unaligned_le32 (COMMAND_TYPE_6 , &cmd_pkt->entry_type);/* No data transfer */ -if (!scsi_bufflen (cmd) || cmd->sc_data_direction ==DMA_NONE ) { +if (!scsi_bufflen (cmd) || cmd->sc_data_direction ==DMA_NONE || + tot_dsds ==0 ) { cmd_pkt->byte_count =cpu_to_le32 (0 );return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 433/509 scsi: qla2xxx: Check valid rport returned by fc_bsg_to_rport()
In reply to Greg Kroah-HartmanFrom: Nilesh Javali <[email protected]>
commit af73f23a27206ffb3c477cac75b5fcf03410556e upstream.
Klocwork reported warning of rport maybe NULL and will be dereferenced. rport returned by call to fc_bsg_to_rport() could be NULL and dereferenced.
Check valid rport returned by fc_bsg_to_rport().
--- drivers/scsi/qla2xxx/qla_bsg.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/scsi/qla2xxx/qla_bsg.c +4 -0
@@ -268,6 +268,10 @@ qla2x00_process_els(struct bsg_job *bsg_if (bsg_request->msgcode ==FC_BSG_RPT_ELS ) { rport =fc_bsg_to_rport (bsg_job); +if (!rport) { + rval = -ENOMEM ; + goto done; + } fcport = *(fc_port_t **) rport->dd_data; host =rport_to_shost (rport); vha =shost_priv (host);
Greg Kroah-Hartman
maintainerPATCH 434/509 scsi: qla2xxx: Correct the index of array
In reply to Greg Kroah-HartmanFrom: Bikash Hazarika <[email protected]>
commit b1b9d3825df4c757d653d0b1df66f084835db9c3 upstream.
Klocwork reported array 'port_dstate_str' of size 10 may use index value(s) 10..15.
Add a fix to correct the index of array.
--- drivers/scsi/qla2xxx/qla_inline.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_inline.h +4 -1
@@ -109,11 +109,13 @@ qla2x00_set_fcport_disc_state(fc_port_t {int old_val;uint8_t shiftbits, mask; +uint8_t port_dstate_str_sz;/* This will have to change when the max no. of states > 16 */ shiftbits =4 ; mask = (1 << shiftbits) -1 ; + port_dstate_str_sz =sizeof (port_dstate_str) /sizeof (char *); fcport->disc_state = state;while (1 ) { old_val =atomic_read (&fcport->shadow_disc_state);
@@ -121,7 +123,8 @@ qla2x00_set_fcport_disc_state(fc_port_t old_val, (old_val << shiftbits) | state)) {ql_dbg (ql_dbg_disc, fcport->vha,0x2134 ,"FCPort %8phC disc_state transition: %s to %s - portid=%06x.\n" , - fcport->port_name, port_dstate_str[old_val & mask], + fcport->port_name, (old_val & mask) < port_dstate_str_sz ? + port_dstate_str[old_val & mask] :"Unknown" , port_dstate_str[state], fcport->d_id.b24);return ; }
Greg Kroah-Hartman
maintainerPATCH 435/509 scsi: qla2xxx: Pointer may be dereferenced
In reply to Greg Kroah-HartmanFrom: Shreyas Deodhar <[email protected]>
commit 00eca15319d9ce8c31cdf22f32a3467775423df4 upstream.
Klocwork tool reported pointer 'rport' returned from call to function fc_bsg_to_rport() may be NULL and will be dereferenced.
Add a fix to validate rport before dereferencing.
--- drivers/scsi/qla2xxx/qla_bsg.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/scsi/qla2xxx/qla_bsg.c +2 -0
@@ -2545,6 +2545,8 @@ qla24xx_bsg_request(struct bsg_job *bsg_if (bsg_request->msgcode ==FC_BSG_RPT_ELS ) { rport =fc_bsg_to_rport (bsg_job); +if (!rport) +return ret; host =rport_to_shost (rport); vha =shost_priv (host); }else {
Greg Kroah-Hartman
maintainerPATCH 436/509 scsi: qla2xxx: Remove unused nvme_ls_waitq wait queue
In reply to Greg Kroah-HartmanFrom: Manish Rangankar <[email protected]>
commit 20fce500b232b970e40312a9c97e7f3b6d7a709c upstream.
System crash when qla2x00_start_sp(sp) returns error code EGAIN and wake_up gets called for uninitialized wait queue sp->nvme_ls_waitq.
qla2xxx [0000:37:00.1]-2121:5: Returning existing qpair of ffff8ae2c0513400 for idx=0
qla2xxx [0000:37:00.1]-700e:5: qla2x00_start_sp failed = 11
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
PGD 0 P4D 0
Oops: 0000 [#1] SMP NOPTI
Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 09/03/2021
Workqueue: nvme-wq nvme_fc_connect_ctrl_work [nvme_fc]
RIP: 0010:__wake_up_common+0x4c/0x190
RSP: 0018:ffff95f3e0cb7cd0 EFLAGS: 00010086
RAX: 0000000000000000 RBX: ffff8b08d3b26328 RCX: 0000000000000000
RDX: 0000000000000001 RSI: 0000000000000003 RDI: ffff8b08d3b26320
RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffffffffffe8
R10: 0000000000000000 R11: ffff95f3e0cb7a60 R12: ffff95f3e0cb7d20
R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8b2fdf6c0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000002f1e410002 CR4: 00000000007706e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
__wake_up_common_lock+0x7c/0xc0
qla_nvme_ls_req+0x355/0x4c0 [qla2xxx]
? __nvme_fc_send_ls_req+0x260/0x380 [nvme_fc]
? nvme_fc_send_ls_req.constprop.42+0x1a/0x45 [nvme_fc]
? nvme_fc_connect_ctrl_work.cold.63+0x1e3/0xa7d [nvme_fc]Remove unused nvme_ls_waitq wait queue. nvme_ls_waitq logic was removed previously in the commits tagged Fixed: below.
--- drivers/scsi/qla2xxx/qla_def.h | 1 - drivers/scsi/qla2xxx/qla_nvme.c | 3 --- 2 files changed, 4 deletions(-)
drivers/scsi/qla2xxx/qla_def.h +0 -1
@@ -639,7 +639,6 @@ typedef struct srb {struct iocb_resource iores;struct kref cmd_kref;/* need to migrate ref_count over to this */ void *priv; -wait_queue_head_t nvme_ls_waitq;struct fc_port *fcport;struct scsi_qla_host *vha; unsigned int start_timer:1;
drivers/scsi/qla2xxx/qla_nvme.c +0 -3
@@ -331,7 +331,6 @@ static int qla_nvme_ls_req(struct nvme_fif (rval !=QLA_SUCCESS ) {ql_log (ql_log_warn, vha,0x700e ,"qla2x00_start_sp failed = %d\n" , rval); -wake_up (&sp->nvme_ls_waitq); sp->priv =NULL ; priv->sp =NULL ;qla2x00_rel_sp (sp);
@@ -590,7 +589,6 @@ static int qla_nvme_post_cmd(struct nvmeif (!sp)return -EBUSY ; -init_waitqueue_head (&sp->nvme_ls_waitq);kref_init (&sp->cmd_kref);spin_lock_init (&priv->cmd_lock); sp->priv = priv;
@@ -608,7 +606,6 @@ static int qla_nvme_post_cmd(struct nvmeif (rval !=QLA_SUCCESS ) {ql_log (ql_log_warn, vha,0x212d ,"qla2x00_start_nvme_mq failed = %d\n" , rval); -wake_up (&sp->nvme_ls_waitq); sp->priv =NULL ; priv->sp =NULL ;qla2xxx_rel_qpair_sp (sp->qpair, sp);
Greg Kroah-Hartman
maintainerPATCH 437/509 net/sched: sch_qfq: reintroduce lmax bound check for MTU
In reply to Greg Kroah-HartmanFrom: Pedro Tammela <[email protected]>
commit 158810b261d02fc7dd92ca9c392d8f8a211a2401 upstream.
25369891fcef deletes a check for the case where no 'lmax' is specified which 3037933448f6 previously fixed as 'lmax' could be set to the device's MTU without any bound checking for QFQ_LMAX_MIN and QFQ_LMAX_MAX. Therefore, reintroduce the check.
--- net/sched/sch_qfq.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
net/sched/sch_qfq.c +9 -2
@@ -428,10 +428,17 @@ static int qfq_change_class(struct Qdiscelse weight =1 ; -if (tb[TCA_QFQ_LMAX ]) +if (tb[TCA_QFQ_LMAX ]) { lmax =nla_get_u32 (tb[TCA_QFQ_LMAX ]); -else + }else { +/* MTU size is user controlled */ lmax =psched_mtu (qdisc_dev (sch)); +if (lmax <QFQ_MIN_LMAX || lmax >QFQ_MAX_LMAX ) { +NL_SET_ERR_MSG_MOD (extack, +"MTU size out of bounds for qfq" ); +return -EINVAL ; + } + } inv_w =ONE_FP / weight; weight =ONE_FP / inv_w;
Greg Kroah-Hartman
maintainerPATCH 438/509 RDMA/cma: Ensure rdma_addr_cancel() happens before issuing more requests
In reply to Greg Kroah-HartmanFrom: Jason Gunthorpe <[email protected]>
commit 305d568b72f17f674155a2a8275f865f207b3808 upstream.
The FSM can run in a circle allowing rdma_resolve_ip() to be called twice on the same id_priv. While this cannot happen without going through the work, it violates the invariant that the same address resolution background request cannot be active twice.
CPU 1 CPU 2
rdma_resolve_addr():
RDMA_CM_IDLE -> RDMA_CM_ADDR_QUERY
rdma_resolve_ip(addr_handler) #1
process_one_req(): for #1
addr_handler():
RDMA_CM_ADDR_QUERY -> RDMA_CM_ADDR_BOUND
mutex_unlock(&id_priv->handler_mutex);
[.. handler still running ..]rdma_resolve_addr():
RDMA_CM_ADDR_BOUND -> RDMA_CM_ADDR_QUERY
rdma_resolve_ip(addr_handler)
!! two requests are now on the req_list
rdma_destroy_id():
destroy_id_handler_unlock():
_destroy_id():
cma_cancel_operation():
rdma_addr_cancel()
// process_one_req() self removes it
spin_lock_bh(&lock);
cancel_delayed_work(&req->work);
if (!list_empty(&req->list)) == true
! rdma_addr_cancel() returns after process_on_req #1 is done kfree(id_priv)
process_one_req(): for #2
addr_handler():
mutex_lock(&id_priv->handler_mutex);
!! Use after free on id_privrdma_addr_cancel() expects there to be one req on the list and only cancels the first one. The self-removal behavior of the work only happens after the handler has returned. This yields a situations where the req_list can have two reqs for the same "handle" but rdma_addr_cancel() only cancels the first one.
The second req remains active beyond rdma_destroy_id() and will use-after-free id_priv once it inevitably triggers.
Fix this by remembering if the id_priv has called rdma_resolve_ip() and always cancel before calling it again. This ensures the req_list never gets more than one item in it and doesn't cost anything in the normal flow that never uses this strange error path.
--- drivers/infiniband/core/cma.c | 23 +++++++++++++++++++++++ drivers/infiniband/core/cma_priv.h | 1 + 2 files changed, 24 insertions(+)
drivers/infiniband/core/cma.c +23 -0
@@ -1792,6 +1792,14 @@ static void cma_cancel_operation(struct {switch (state) {case RDMA_CM_ADDR_QUERY : +/* +* We can avoid doing the rdma_addr_cancel() based on state, +* only RDMA_CM_ADDR_QUERY has a work that could still execute. +* Notice that the addr_handler work could still be exiting +* outside this state, however due to the interaction with the +* handler_mutex the work is guaranteed not to touch id_priv +* during exit. +*/ rdma_addr_cancel (&id_priv->id.route.addr.dev_addr);break ;case RDMA_CM_ROUTE_QUERY :
@@ -3401,6 +3409,21 @@ int rdma_resolve_addr(struct rdma_cm_idif (dst_addr->sa_family ==AF_IB ) { ret =cma_resolve_ib_addr (id_priv); }else { +/* +* The FSM can return back to RDMA_CM_ADDR_BOUND after +* rdma_resolve_ip() is called, eg through the error +* path in addr_handler(). If this happens the existing +* request must be canceled before issuing a new one. +* Since canceling a request is a bit slow and this +* oddball path is rare, keep track once a request has +* been issued. The track turns out to be a permanent +* state since this is the only cancel as it is +* immediately before rdma_resolve_ip(). +*/ +if (id_priv->used_resolve_ip) +rdma_addr_cancel (&id->route.addr.dev_addr); +else + id_priv->used_resolve_ip =1 ; ret = rdma_resolve_ip(cma_src_addr(id_priv), dst_addr, &id->route.addr.dev_addr, timeout_ms, addr_handler,
drivers/infiniband/core/cma_priv.h +1 -0
@@ -89,6 +89,7 @@ struct rdma_id_private {u8 reuseaddr;u8 afonly;u8 timeout; +u8 used_resolve_ip;enum ib_gid_type gid_type;/*
Greg Kroah-Hartman
maintainerPATCH 439/509 drm/atomic: Fix potential use-after-free in nonblocking commits
In reply to Greg Kroah-HartmanFrom: Daniel Vetter <[email protected]>
commit 4e076c73e4f6e90816b30fcd4a0d7ab365087255 upstream.
This requires a bit of background. Properly done a modeset driver's unload/remove sequence should be
drm_dev_unplug(); drm_atomic_helper_shutdown(); drm_dev_put();
The trouble is that the drm_dev_unplugged() checks are by design racy, they do not synchronize against all outstanding ioctl. This is because those ioctl could block forever (both for modeset and for driver specific ioctls), leading to deadlocks in hotunplug. Instead the code sections that touch the hardware need to be annotated with drm_dev_enter/exit, to avoid accessing hardware resources after the unload/remove has finished.
To avoid use-after-free issues all the involved userspace visible objects are supposed to hold a reference on the underlying drm_device, like drm_file does.
The issue now is that we missed one, the atomic modeset ioctl can be run in a nonblocking fashion, and in that case it cannot rely on the implied drm_device reference provided by the ioctl calling context. This can result in a use-after-free if an nonblocking atomic commit is carefully raced against a driver unload.
Fix this by unconditionally grabbing a drm_device reference for any drm_atomic_state structures. Strictly speaking this isn't required for blocking commits and TEST_ONLY calls, but it's the simpler approach.
Thanks to shanzhulig for the initial idea of grabbing an unconditional reference, I just added comments, a condensed commit message and fixed a minor potential issue in where exactly we drop the final reference.
--- drivers/gpu/drm/drm_atomic.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_atomic.c +10 -1
@@ -98,6 +98,12 @@ drm_atomic_state_init(struct drm_deviceif (!state->planes) goto fail; +/* +* Because drm_atomic_state can be committed asynchronously we need our +* own reference and cannot rely on the on implied by drm_file in the +* ioctl call. +*/ +drm_dev_get (dev); state->dev = dev;DRM_DEBUG_ATOMIC ("Allocated atomic state %p\n" , state);
@@ -257,7 +263,8 @@ EXPORT_SYMBOL(drm_atomic_state_clear);void __drm_atomic_state_free (struct kref *ref) {struct drm_atomic_state *state =container_of (ref,typeof (*state), ref); -struct drm_mode_config *config = &state->dev->mode_config; +struct drm_device *dev = state->dev; +struct drm_mode_config *config = &dev->mode_config;drm_atomic_state_clear (state);
@@ -269,6 +276,8 @@ void __drm_atomic_state_free(struct krefdrm_atomic_state_default_release (state);kfree (state); } + +drm_dev_put (dev); }EXPORT_SYMBOL (__drm_atomic_state_free);
Greg Kroah-Hartman
maintainerPATCH 440/509 ALSA: hda/realtek - remove 3k pull low procedure
In reply to Greg Kroah-HartmanFrom: Kailang Yang <[email protected]>
commit 69ea4c9d02b7947cdd612335a61cc1a02e544ccd upstream.
This was the ALC283 depop procedure.
Maybe this procedure wasn't suitable with new codec.
So, let us remove it. But HP 15z-fc000 must do 3k pull low. If it reboot with plugged headset,
it will have errors show don't find codec error messages. Run 3k pull low will solve issues.
So, let AMD chipset will run this for workarround.
--- sound/pci/hda/patch_realtek.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
sound/pci/hda/patch_realtek.c +5 -2
@@ -121,6 +121,7 @@ struct alc_spec { unsigned int ultra_low_power:1; unsigned int has_hs_key:1; unsigned int no_internal_mic_pin:1; + unsigned int en_3kpull_low:1;/* for PLL fix */ hda_nid_t pll_nid;
@@ -3617,6 +3618,7 @@ static void alc256_shutup(struct hda_codif (!hp_pin) hp_pin =0x21 ; +alc_update_coefex_idx (codec,0x57 ,0x04 ,0x0007 ,0x1 );/* Low power */ hp_pin_sense =snd_hda_jack_detect (codec, hp_pin);if (hp_pin_sense)
@@ -3633,8 +3635,7 @@ static void alc256_shutup(struct hda_cod/* If disable 3k pulldown control for alc257, the Mic detection will not work correctly * when booting with headset plugged. So skip setting it for the codec alc257 */ -if (codec->core.vendor_id !=0x10ec0236 && - codec->core.vendor_id !=0x10ec0257 ) +if (spec->en_3kpull_low)alc_update_coef_idx (codec,0x46 ,0 ,3 <<12 );if (!spec->no_shutup_pins)
@@ -10065,6 +10066,8 @@ static int patch_alc269(struct hda_codec spec->shutup = alc256_shutup; spec->init_hook = alc256_init; spec->gen.mixer_nid =0 ;/* ALC256 does not have any loopback mixer path */ +if (codec->bus->pci->vendor ==PCI_VENDOR_ID_AMD ) + spec->en_3kpull_low = true;break ;case 0x10ec0257 : spec->codec_variant =ALC269_TYPE_ALC257 ;
Greg Kroah-Hartman
maintainerPATCH 441/509 ALSA: hda/realtek: Enable Mute LED on HP Laptop 15s-eq2xxx
In reply to Greg Kroah-HartmanFrom: Luka Guzenko <[email protected]>
commit 0659400f18c0e6c0c69d74fe5d09e7f6fbbd52a2 upstream.
The HP Laptop 15s-eq2xxx uses ALC236 codec and controls the mute LED using COEF 0x07 index 1. No existing quirk covers this configuration. Adds a new quirk and enables it for the device.
--- sound/pci/hda/patch_realtek.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
sound/pci/hda/patch_realtek.c +21 -0
@@ -4559,6 +4559,21 @@ static void alc236_fixup_hp_mute_led_coe } } +static void alc236_fixup_hp_mute_led_coefbit2 (struct hda_codec *codec, +const struct hda_fixup *fix,int action) +{ +struct alc_spec *spec = codec->spec; + +if (action ==HDA_FIXUP_ACT_PRE_PROBE ) { + spec->mute_led_polarity =0 ; + spec->mute_led_coef.idx =0x07 ; + spec->mute_led_coef.mask =1 ; + spec->mute_led_coef.on =1 ; + spec->mute_led_coef.off =0 ; +snd_hda_gen_add_mute_led_cdev (codec, coef_mute_led_set); + } +} +/* turn on/off mic-mute LED per capture hook by coef bit */ static int coef_micmute_led_set (struct led_classdev *led_cdev,enum led_brightness brightness)
@@ -6878,6 +6893,7 @@ enum {ALC285_FIXUP_HP_GPIO_LED ,ALC285_FIXUP_HP_MUTE_LED ,ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED , +ALC236_FIXUP_HP_MUTE_LED_COEFBIT2 ,ALC236_FIXUP_HP_GPIO_LED ,ALC236_FIXUP_HP_MUTE_LED , ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
@@ -8250,6 +8266,10 @@ static const struct hda_fixup alc269_fix .type = HDA_FIXUP_FUNC, .v.func = alc285_fixup_hp_spectre_x360_mute_led, }, + [ALC236_FIXUP_HP_MUTE_LED_COEFBIT2] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc236_fixup_hp_mute_led_coefbit2, + }, [ALC236_FIXUP_HP_GPIO_LED] = { .type = HDA_FIXUP_FUNC, .v.func = alc236_fixup_hp_gpio_led,
@@ -9004,6 +9024,7 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x103c ,0x886d ,"HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC" ,ALC285_FIXUP_HP_GPIO_AMP_INIT ),SND_PCI_QUIRK (0x103c ,0x8870 ,"HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC" ,ALC285_FIXUP_HP_GPIO_AMP_INIT ),SND_PCI_QUIRK (0x103c ,0x8873 ,"HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC" ,ALC285_FIXUP_HP_GPIO_AMP_INIT ), +SND_PCI_QUIRK (0x103c ,0x887a ,"HP Laptop 15s-eq2xxx" ,ALC236_FIXUP_HP_MUTE_LED_COEFBIT2 ),SND_PCI_QUIRK (0x103c ,0x888d ,"HP ZBook Power 15.6 inch G8 Mobile Workstation PC" ,ALC236_FIXUP_HP_GPIO_LED ),SND_PCI_QUIRK (0x103c ,0x8895 ,"HP EliteBook 855 G8 Notebook PC" ,ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED ), SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED),
Greg Kroah-Hartman
maintainerPATCH 442/509 keys: Fix linking a duplicate key to a keyrings assoc_array
In reply to Greg Kroah-HartmanFrom: Petr Pavlu <[email protected]>
commit d55901522f96082a43b9842d34867363c0cdbac5 upstream.
When making a DNS query inside the kernel using dns_query(), the request code can in rare cases end up creating a duplicate index key in the assoc_array of the destination keyring. It is eventually found by a BUG_ON() check in the assoc_array implementation and results in a crash.
Example report:
[2158499.700025] kernel BUG at ../lib/assoc_array.c:652! [2158499.700039] invalid opcode: 0000 [#1] SMP PTI [2158499.700065] CPU: 3 PID: 31985 Comm: kworker/3:1 Kdump: loaded Not tainted 5.3.18-150300.59.90-default #1 SLE15-SP3 [2158499.700096] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020 [2158499.700351] Workqueue: cifsiod cifs_resolve_server [cifs] [2158499.700380] RIP: 0010:assoc_array_insert+0x85f/0xa40 [2158499.700401] Code: ff 74 2b 48 8b 3b 49 8b 45 18 4c 89 e6 48 83 e7 fe e8 95 ec 74 00 3b 45 88 7d db 85 c0 79 d4 0f 0b 0f 0b 0f 0b e8 41 f2 be ff <0f> 0b 0f 0b 81 7d 88 ff ff ff 7f 4c 89 eb 4c 8b ad 58 ff ff ff 0f [2158499.700448] RSP: 0018:ffffc0bd6187faf0 EFLAGS: 00010282 [2158499.700470] RAX: ffff9f1ea7da2fe8 RBX: ffff9f1ea7da2fc1 RCX: 0000000000000005 [2158499.700492] RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000000 [2158499.700515] RBP: ffffc0bd6187fbb0 R08: ffff9f185faf1100 R09: 0000000000000000 [2158499.700538] R10: ffff9f1ea7da2cc0 R11: 000000005ed8cec8 R12: ffffc0bd6187fc28 [2158499.700561] R13: ffff9f15feb8d000 R14: ffff9f1ea7da2fc0 R15: ffff9f168dc0d740 [2158499.700585] FS: 0000000000000000(0000) GS:ffff9f185fac0000(0000) knlGS:0000000000000000 [2158499.700610] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [2158499.700630] CR2: 00007fdd94fca238 CR3: 0000000809d8c006 CR4: 00000000003706e0 [2158499.700702] Call Trace: [2158499.700741] ? key_alloc+0x447/0x4b0 [2158499.700768] ? __key_link_begin+0x43/0xa0 [2158499.700790] __key_link_begin+0x43/0xa0 [2158499.700814] request_key_and_link+0x2c7/0x730 [2158499.700847] ? dns_resolver_read+0x20/0x20 [dns_resolver] [2158499.700873] ? key_default_cmp+0x20/0x20 [2158499.700898] request_key_tag+0x43/0xa0 [2158499.700926] dns_query+0x114/0x2ca [dns_resolver] [2158499.701127] dns_resolve_server_name_to_ip+0x194/0x310 [cifs] [2158499.701164] ? scnprintf+0x49/0x90 [2158499.701190] ? __switch_to_asm+0x40/0x70 [2158499.701211] ? __switch_to_asm+0x34/0x70 [2158499.701405] reconn_set_ipaddr_from_hostname+0x81/0x2a0 [cifs] [2158499.701603] cifs_resolve_server+0x4b/0xd0 [cifs] [2158499.701632] process_one_work+0x1f8/0x3e0 [2158499.701658] worker_thread+0x2d/0x3f0 [2158499.701682] ? process_one_work+0x3e0/0x3e0 [2158499.701703] kthread+0x10d/0x130 [2158499.701723] ? kthread_park+0xb0/0xb0 [2158499.701746] ret_from_fork+0x1f/0x40
The situation occurs as follows:
* Some kernel facility invokes dns_query() to resolve a hostname, for example, "abcdef". The function registers its global DNS resolver cache as current->cred.thread_keyring and passes the query to request_key_net() -> request_key_tag() -> request_key_and_link().
* Function request_key_and_link() creates a keyring_search_context object. Its match_data.cmp method gets set via a call to type->match_preparse() (resolves to dns_resolver_match_preparse()) to dns_resolver_cmp().
* Function request_key_and_link() continues and invokes search_process_keyrings_rcu() which returns that a given key was not found. The control is then passed to request_key_and_link() -> construct_alloc_key().
* Concurrently to that, a second task similarly makes a DNS query for "abcdef." and its result gets inserted into the DNS resolver cache.
* Back on the first task, function construct_alloc_key() first runs __key_link_begin() to determine an assoc_array_edit operation to insert a new key. Index keys in the array are compared exactly as-is, using keyring_compare_object(). The operation finds that "abcdef" is not yet present in the destination keyring.
* Function construct_alloc_key() continues and checks if a given key is already present on some keyring by again calling search_process_keyrings_rcu(). This search is done using dns_resolver_cmp() and "abcdef" gets matched with now present key "abcdef.".
* The found key is linked on the destination keyring by calling __key_link() and using the previously calculated assoc_array_edit operation. This inserts the "abcdef." key in the array but creates a duplicity because the same index key is already present.
Fix the problem by postponing __key_link_begin() in construct_alloc_key() until an actual key which should be linked into the destination keyring is determined.
--- security/keys/request_key.c | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-)
security/keys/request_key.c +24 -11
@@ -401,17 +401,21 @@ static int construct_alloc_key(struct keset_bit (KEY_FLAG_USER_CONSTRUCT , &key->flags);if (dest_keyring) { - ret =__key_link_lock (dest_keyring, &ctx->index_key); + ret =__key_link_lock (dest_keyring, &key->index_key);if (ret <0 ) goto link_lock_failed; - ret =__key_link_begin (dest_keyring, &ctx->index_key, &edit); -if (ret <0 ) - goto link_prealloc_failed; } -/* attach the key to the destination keyring under lock, but we do need +/* +* Attach the key to the destination keyring under lock, but we do need * to do another check just in case someone beat us to it whilst we -* waited for locks */ +* waited for locks. +* +* The caller might specify a comparison function which looks for keys +* that do not exactly match but are still equivalent from the caller's +* perspective. The __key_link_begin() operation must be done only after +* an actual key is determined. +*/ mutex_lock (&key_construction_mutex);rcu_read_lock ();
@@ -420,12 +424,16 @@ static int construct_alloc_key(struct keif (!IS_ERR (key_ref)) goto key_already_present; -if (dest_keyring) +if (dest_keyring) { + ret =__key_link_begin (dest_keyring, &key->index_key, &edit); +if (ret <0 ) + goto link_alloc_failed;__key_link (dest_keyring, key, &edit); + }mutex_unlock (&key_construction_mutex);if (dest_keyring) -__key_link_end (dest_keyring, &ctx->index_key, edit); +__key_link_end (dest_keyring, &key->index_key, edit);mutex_unlock (&user->cons_lock); *_key = key;kleave (" = 0 [%d]" ,key_serial (key));
@@ -438,10 +446,13 @@ key_already_present:mutex_unlock (&key_construction_mutex); key =key_ref_to_ptr (key_ref);if (dest_keyring) { + ret =__key_link_begin (dest_keyring, &key->index_key, &edit); +if (ret <0 ) + goto link_alloc_failed_unlocked; ret =__key_link_check_live_key (dest_keyring, key);if (ret ==0 )__key_link (dest_keyring, key, &edit); -__key_link_end (dest_keyring, &ctx->index_key, edit); +__key_link_end (dest_keyring, &key->index_key, edit);if (ret <0 ) goto link_check_failed; }
@@ -456,8 +467,10 @@ link_check_failed:kleave (" = %d [linkcheck]" , ret);return ret; -link_prealloc_failed: -__key_link_end (dest_keyring, &ctx->index_key, edit); +link_alloc_failed: +mutex_unlock (&key_construction_mutex); +link_alloc_failed_unlocked: +__key_link_end (dest_keyring, &key->index_key, edit); link_lock_failed:mutex_unlock (&user->cons_lock);key_put (key);
Greg Kroah-Hartman
maintainerPATCH 443/509 perf probe: Add test for regression introduced by switch to die_get_decl_file()
In reply to Greg Kroah-HartmanFrom: Georg Müller <[email protected]>
commit 56cbeacf143530576905623ac72ae0964f3293a6 upstream.
This patch adds a test to validate that 'perf probe' works for binaries where DWARF info is split into multiple CUs
--- tools/perf/tests/shell/test_uprobe_from_different_cu.sh | 77 ++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100755 tools/perf/tests/shell/test_uprobe_from_different_cu.sh
tools/perf/tests/shell/test_uprobe_from_different_cu.sh new file +77 -0
@@ -0,0 +1,77 @@ +#!/bin/bash +# test perf probe of function from different CU +# SPDX-License-Identifier: GPL-2.0 + +set -e + +temp_dir=$(mktemp -d /tmp/perf-uprobe-different-cu-sh.XXXXXXXXXX) + +cleanup() +{ + trap - EXIT TERM INT + if [[ "${temp_dir}" =~ ^/tmp/perf-uprobe-different-cu-sh.*$ ]]; then + echo "--- Cleaning up ---" + perf probe -x ${temp_dir}/testfile -d foo + rm -f "${temp_dir}/"* + rmdir "${temp_dir}" + fi +} + +trap_cleanup() +{ + cleanup + exit 1 +} + +trap trap_cleanup EXIT TERM INT + +cat > ${temp_dir}/testfile-foo.h << EOF +struct t +{ + int *p; + int c; +}; + +extern int foo (int i, struct t *t); +EOF + +cat > ${temp_dir}/testfile-foo.c << EOF +#include "testfile-foo.h" + +int +foo (int i, struct t *t) +{ + int j, res = 0; + for (j = 0; j < i && j < t->c; j++) + res += t->p[j]; + + return res; +} +EOF + +cat > ${temp_dir}/testfile-main.c << EOF +#include "testfile-foo.h" + +static struct t g; + +int +main (int argc, char **argv) +{ + int i; + int j[argc]; + g.c = argc; + g.p = j; + for (i = 0; i < argc; i++) + j[i] = (int) argv[i][0]; + return foo (3, &g); +} +EOF + +gcc -g -Og -flto -c ${temp_dir}/testfile-foo.c -o ${temp_dir}/testfile-foo.o +gcc -g -Og -c ${temp_dir}/testfile-main.c -o ${temp_dir}/testfile-main.o +gcc -g -Og -o ${temp_dir}/testfile ${temp_dir}/testfile-foo.o ${temp_dir}/testfile-main.o + +perf probe -x ${temp_dir}/testfile --funcs foo +perf probe -x ${temp_dir}/testfile foo + +cleanup
Greg Kroah-Hartman
maintainerPATCH 444/509 btrfs: fix warning when putting transaction with qgroups enabled after abort
In reply to Greg Kroah-HartmanFrom: Filipe Manana <[email protected]>
commit aa84ce8a78a1a5c10cdf9c7a5fb0c999fbc2c8d6 upstream.
If we have a transaction abort with qgroups enabled we get a warning triggered when doing the final put on the transaction, like this:
[552.6789] ------------[ cut here ]------------ [552.6815] WARNING: CPU: 4 PID: 81745 at fs/btrfs/transaction.c:144 btrfs_put_transaction+0x123/0x130 [btrfs] [552.6817] Modules linked in: btrfs blake2b_generic xor (...) [552.6819] CPU: 4 PID: 81745 Comm: btrfs-transacti Tainted: G W 6.4.0-rc6-btrfs-next-134+ #1 [552.6819] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014 [552.6819] RIP: 0010:btrfs_put_transaction+0x123/0x130 [btrfs] [552.6821] Code: bd a0 01 00 (...) [552.6821] RSP: 0018:ffffa168c0527e28 EFLAGS: 00010286 [552.6821] RAX: ffff936042caed00 RBX: ffff93604a3eb448 RCX: 0000000000000000 [552.6821] RDX: ffff93606421b028 RSI: ffffffff92ff0878 RDI: ffff93606421b010 [552.6821] RBP: ffff93606421b000 R08: 0000000000000000 R09: ffffa168c0d07c20 [552.6821] R10: 0000000000000000 R11: ffff93608dc52950 R12: ffffa168c0527e70 [552.6821] R13: ffff93606421b000 R14: ffff93604a3eb420 R15: ffff93606421b028 [552.6821] FS: 0000000000000000(0000) GS:ffff93675fb00000(0000) knlGS:0000000000000000 [552.6821] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [552.6821] CR2: 0000558ad262b000 CR3: 000000014feda005 CR4: 0000000000370ee0 [552.6822] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [552.6822] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [552.6822] Call Trace: [552.6822] <TASK> [552.6822] ? __warn+0x80/0x130 [552.6822] ? btrfs_put_transaction+0x123/0x130 [btrfs] [552.6824] ? report_bug+0x1f4/0x200 [552.6824] ? handle_bug+0x42/0x70 [552.6824] ? exc_invalid_op+0x14/0x70 [552.6824] ? asm_exc_invalid_op+0x16/0x20 [552.6824] ? btrfs_put_transaction+0x123/0x130 [btrfs] [552.6826] btrfs_cleanup_transaction+0xe7/0x5e0 [btrfs] [552.6828] ? _raw_spin_unlock_irqrestore+0x23/0x40 [552.6828] ? try_to_wake_up+0x94/0x5e0 [552.6828] ? __pfx_process_timeout+0x10/0x10 [552.6828] transaction_kthread+0x103/0x1d0 [btrfs] [552.6830] ? __pfx_transaction_kthread+0x10/0x10 [btrfs] [552.6832] kthread+0xee/0x120 [552.6832] ? __pfx_kthread+0x10/0x10 [552.6832] ret_from_fork+0x29/0x50 [552.6832] </TASK> [552.6832] ---[ end trace 0000000000000000 ]---
This corresponds to this line of code:
void btrfs_put_transaction(struct btrfs_transaction *transaction)
{
(...)
WARN_ON(!RB_EMPTY_ROOT(
&transaction->delayed_refs.dirty_extent_root));
(...)
}The warning happens because btrfs_qgroup_destroy_extent_records(), called in the transaction abort path, we free all entries from the rbtree "dirty_extent_root" with rbtree_postorder_for_each_entry_safe(), but we don't actually empty the rbtree - it's still pointing to nodes that were freed.
So set the rbtree's root node to NULL to avoid this warning (assign RB_ROOT).
--- fs/btrfs/qgroup.c | 1 + 1 file changed, 1 insertion(+)
fs/btrfs/qgroup.c +1 -0
@@ -4376,4 +4376,5 @@ void btrfs_qgroup_destroy_extent_recordsulist_free (entry->old_roots);kfree (entry); } + *root =RB_ROOT ; }
Greg Kroah-Hartman
maintainerPATCH 445/509 fuse: revalidate: dont invalidate if interrupted
In reply to Greg Kroah-HartmanFrom: Miklos Szeredi <[email protected]>
commit a9d1c4c6df0e568207907c04aed9e7beb1294c42 upstream.
If the LOOKUP request triggered from fuse_dentry_revalidate() is interrupted, then the dentry will be invalidated, possibly resulting in submounts being unmounted.
--- fs/fuse/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fuse/dir.c +1 -1
@@ -249,7 +249,7 @@ static int fuse_dentry_revalidate(structspin_unlock (&fi->lock); }kfree (forget); -if (ret == -ENOMEM ) +if (ret == -ENOMEM || ret == -EINTR ) goto out;if (ret ||fuse_invalid_attr (&outarg.attr) ||fuse_stale_inode (inode, outarg.generation, &outarg.attr))
Greg Kroah-Hartman
maintainerPATCH 446/509 selftests: tc: set timeout to 15 minutes
In reply to Greg Kroah-HartmanFrom: Matthieu Baerts <[email protected]>
commit fda05798c22a354efde09a76bdfc276b2d591829 upstream.
When looking for something else in LKFT reports [1], I noticed that the TC selftest ended with a timeout error:
not ok 1 selftests: tc-testing: tdc.sh # TIMEOUT 45 seconds
The timeout had been introduced 3 years ago, see the Fixes commit below.
This timeout is only in place when executing the selftests via the kselftests runner scripts. I guess this is not what most TC devs are using and nobody noticed the issue before.
The new timeout is set to 15 minutes as suggested by Pedro [2]. It looks like it is plenty more time than what it takes in "normal" conditions.
--- tools/testing/selftests/tc-testing/settings | 1 + 1 file changed, 1 insertion(+) create mode 100644 tools/testing/selftests/tc-testing/settings
tools/testing/selftests/tc-testing/settings new file +1 -0
@@ -0,0 +1 @@ +timeout=900
Greg Kroah-Hartman
maintainerPATCH 447/509 selftests: tc: add ct action kconfig dep
In reply to Greg Kroah-HartmanFrom: Matthieu Baerts <[email protected]>
commit 719b4774a8cb1a501e2d22a5a4a3a0a870e427d5 upstream.
When looking for something else in LKFT reports [1], I noticed most of the tests were skipped because the "teardown stage" did not complete successfully.
Pedro found out this is due to the fact CONFIG_NF_FLOW_TABLE is required but not listed in the 'config' file. Adding it to the list fixes the issues on LKFT side. CONFIG_NET_ACT_CT is now set to 'm' in the final kconfig.
--- tools/testing/selftests/tc-testing/config | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/tc-testing/config +1 -0
@@ -5,6 +5,7 @@ CONFIG_NF_CONNTRACK=m CONFIG_NF_CONNTRACK_MARK=y CONFIG_NF_CONNTRACK_ZONES=y CONFIG_NF_CONNTRACK_LABELS=y +CONFIG_NF_FLOW_TABLE=m CONFIG_NF_NAT=m CONFIG_NET_SCHED=y
Greg Kroah-Hartman
maintainerPATCH 448/509 regmap: Drop initial version of maximum transfer length fixes
In reply to Greg Kroah-HartmanFrom: Mark Brown <[email protected]>
commit bc64734825c59e18a27ac266b07e14944c111fd8 upstream.
When problems were noticed with the register address not being taken into account when limiting raw transfers with I2C devices we fixed this in the core. Unfortunately it has subsequently been realised that a lot of buses were relying on the prior behaviour, partly due to unclear documentation not making it obvious what was intended in the core. This is all more involved to fix than is sensible for a fix commit so let's just drop the original fixes, a separate commit will fix the originally observed problem in an I2C specific way
--- drivers/base/regmap/regmap-spi-avmm.c | 2 +- drivers/base/regmap/regmap.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-)
drivers/base/regmap/regmap-spi-avmm.c +1 -1
@@ -666,7 +666,7 @@ static const struct regmap_bus regmap_sp .reg_format_endian_default = REGMAP_ENDIAN_NATIVE, .val_format_endian_default = REGMAP_ENDIAN_NATIVE, .max_raw_read = SPI_AVMM_VAL_SIZE * MAX_READ_CNT, - .max_raw_write = SPI_AVMM_REG_SIZE + SPI_AVMM_VAL_SIZE * MAX_WRITE_CNT, + .max_raw_write = SPI_AVMM_VAL_SIZE * MAX_WRITE_CNT, .free_context = spi_avmm_bridge_ctx_free, };
drivers/base/regmap/regmap.c +2 -4
@@ -1998,8 +1998,6 @@ int _regmap_raw_write(struct regmap *mapsize_t val_count = val_len / val_bytes;size_t chunk_count, chunk_bytes;size_t chunk_regs = val_count; -size_t max_data = map->max_raw_write - map->format.reg_bytes - - map->format.pad_bytes;int ret, i;if (!val_count)
@@ -2007,8 +2005,8 @@ int _regmap_raw_write(struct regmap *mapif (map->use_single_write) chunk_regs =1 ; -else if (map->max_raw_write && val_len > max_data) - chunk_regs = max_data / val_bytes; +else if (map->max_raw_write && val_len > map->max_raw_write) + chunk_regs = map->max_raw_write / val_bytes; chunk_count = val_count / chunk_regs; chunk_bytes = chunk_regs * val_bytes;
Greg Kroah-Hartman
maintainerPATCH 449/509 regmap: Account for register length in SMBus I/O limits
In reply to Greg Kroah-HartmanFrom: Mark Brown <[email protected]>
commit 0c9d2eb5e94792fe64019008a04d4df5e57625af upstream.
The SMBus I2C buses have limits on the size of transfers they can do but do not factor in the register length meaning we may try to do a transfer longer than our length limit, the core will not take care of this. Future changes will factor this out into the core but there are a number of users that assume current behaviour so let's just do something conservative here.
This does not take account padding bits but practically speaking these are very rarely if ever used on I2C buses given that they generally run slowly enough to mean there's no issue.
--- drivers/base/regmap/regmap-i2c.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/base/regmap/regmap-i2c.c +4 -4
@@ -242,8 +242,8 @@ static int regmap_i2c_smbus_i2c_read(voistatic const struct regmap_bus regmap_i2c_smbus_i2c_block = { .write = regmap_i2c_smbus_i2c_write, .read = regmap_i2c_smbus_i2c_read, - .max_raw_read =I2C_SMBUS_BLOCK_MAX , - .max_raw_write =I2C_SMBUS_BLOCK_MAX , + .max_raw_read =I2C_SMBUS_BLOCK_MAX -1 , + .max_raw_write =I2C_SMBUS_BLOCK_MAX -1 , }; static int regmap_i2c_smbus_i2c_write_reg16(void *context, const void *data,
@@ -299,8 +299,8 @@ static int regmap_i2c_smbus_i2c_read_regstatic const struct regmap_bus regmap_i2c_smbus_i2c_block_reg16 = { .write = regmap_i2c_smbus_i2c_write_reg16, .read = regmap_i2c_smbus_i2c_read_reg16, - .max_raw_read =I2C_SMBUS_BLOCK_MAX , - .max_raw_write =I2C_SMBUS_BLOCK_MAX , + .max_raw_read =I2C_SMBUS_BLOCK_MAX -2 , + .max_raw_write =I2C_SMBUS_BLOCK_MAX -2 , }; static const struct regmap_bus *regmap_get_i2c_bus(struct i2c_client *i2c,
Greg Kroah-Hartman
maintainerPATCH 450/509 can: bcm: Fix UAF in bcm_proc_show()
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
commit 55c3b96074f3f9b0aee19bf93cd71af7516582bb upstream.
BUG: KASAN: slab-use-after-free in bcm_proc_show+0x969/0xa80 Read of size 8 at addr ffff888155846230 by task cat/7862 CPU: 1 PID: 7862 Comm: cat Not tainted 6.5.0-rc1-00153-gc8746099c197 #230 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0xd5/0x150 print_report+0xc1/0x5e0 kasan_report+0xba/0xf0 bcm_proc_show+0x969/0xa80 seq_read_iter+0x4f6/0x1260 seq_read+0x165/0x210 proc_reg_read+0x227/0x300 vfs_read+0x1d5/0x8d0 ksys_read+0x11e/0x240 do_syscall_64+0x35/0xb0 entry_SYSCALL_64_after_hwframe+0x63/0xcd Allocated by task 7846: kasan_save_stack+0x1e/0x40 kasan_set_track+0x21/0x30 __kasan_kmalloc+0x9e/0xa0 bcm_sendmsg+0x264b/0x44e0 sock_sendmsg+0xda/0x180 ____sys_sendmsg+0x735/0x920 ___sys_sendmsg+0x11d/0x1b0 __sys_sendmsg+0xfa/0x1d0 do_syscall_64+0x35/0xb0 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 7846: kasan_save_stack+0x1e/0x40 kasan_set_track+0x21/0x30 kasan_save_free_info+0x27/0x40 ____kasan_slab_free+0x161/0x1c0 slab_free_freelist_hook+0x119/0x220 __kmem_cache_free+0xb4/0x2e0 rcu_core+0x809/0x1bd0
bcm_op is freed before procfs entry be removed in bcm_release(), this lead to bcm_proc_show() may read the freed bcm_op.
--- net/can/bcm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
net/can/bcm.c +6 -6
@@ -1521,6 +1521,12 @@ static int bcm_release(struct socket *solock_sock (sk); +#if IS_ENABLED (CONFIG_PROC_FS ) +/* remove procfs entry */ +if (net->can.bcmproc_dir && bo->bcm_proc_read) +remove_proc_entry (bo->procname, net->can.bcmproc_dir); +#endif /* CONFIG_PROC_FS */ +list_for_each_entry_safe (op, next, &bo->tx_ops, list)bcm_remove_op (op);
@@ -1556,12 +1562,6 @@ static int bcm_release(struct socket *solist_for_each_entry_safe (op, next, &bo->rx_ops, list)bcm_remove_op (op); -#if IS_ENABLED (CONFIG_PROC_FS ) -/* remove procfs entry */ -if (net->can.bcmproc_dir && bo->bcm_proc_read) -remove_proc_entry (bo->procname, net->can.bcmproc_dir); -#endif /* CONFIG_PROC_FS */ -/* remove device reference */ if (bo->bound) { bo->bound =0 ;
Greg Kroah-Hartman
maintainerPATCH 451/509 drm/client: Fix memory leak in drm_client_target_cloned
In reply to Greg Kroah-HartmanFrom: Jocelyn Falempe <[email protected]>
commit c2a88e8bdf5f6239948d75283d0ae7e0c7945b03 upstream.
dmt_mode is allocated and never freed in this function.
It was found with the ast driver, but most drivers using generic fbdev setup are probably affected.
This fixes the following kmemleak report:
backtrace:
[<00000000b391296d>] drm_mode_duplicate+0x45/0x220 [drm]
[<00000000e45bb5b3>] drm_client_target_cloned.constprop.0+0x27b/0x480 [drm]
[<00000000ed2d3a37>] drm_client_modeset_probe+0x6bd/0xf50 [drm]
[<0000000010e5cc9d>] __drm_fb_helper_initial_config_and_unlock+0xb4/0x2c0 [drm_kms_helper]
[<00000000909f82ca>] drm_fbdev_client_hotplug+0x2bc/0x4d0 [drm_kms_helper]
[<00000000063a69aa>] drm_client_register+0x169/0x240 [drm]
[<00000000a8c61525>] ast_pci_probe+0x142/0x190 [ast]
[<00000000987f19bb>] local_pci_probe+0xdc/0x180
[<000000004fca231b>] work_for_cpu_fn+0x4e/0xa0
[<0000000000b85301>] process_one_work+0x8b7/0x1540
[<000000003375b17c>] worker_thread+0x70a/0xed0
[<00000000b0d43cd9>] kthread+0x29f/0x340
[<000000008d770833>] ret_from_fork+0x1f/0x30unreferenced object 0xff11000333089a00 (size 128):
--- drivers/gpu/drm/drm_client_modeset.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/drm_client_modeset.c +5 -0
@@ -308,6 +308,9 @@ static bool drm_client_target_cloned(str can_clone = true; dmt_mode =drm_mode_find_dmt (dev,1024 ,768 ,60 , false); +if (!dmt_mode) + goto fail; +for (i =0 ; i < connector_count; i++) {if (!enabled[i])continue ;
@@ -323,11 +326,13 @@ static bool drm_client_target_cloned(strif (!modes[i]) can_clone = false; } +kfree (dmt_mode);if (can_clone) {DRM_DEBUG_KMS ("can clone using 1024x768\n" );return true; } +fail:DRM_INFO ("kms: can't enable cloning when we probably wanted to.\n" );return false; }
Greg Kroah-Hartman
maintainerPATCH 452/509 drm/client: Fix memory leak in drm_client_modeset_probe
In reply to Greg Kroah-HartmanFrom: Jocelyn Falempe <[email protected]>
commit 2329cc7a101af1a844fbf706c0724c0baea38365 upstream.
When a new mode is set to modeset->mode, the previous mode should be freed. This fixes the following kmemleak report:
drm_mode_duplicate+0x45/0x220 [drm] drm_client_modeset_probe+0x944/0xf50 [drm] __drm_fb_helper_initial_config_and_unlock+0xb4/0x2c0 [drm_kms_helper] drm_fbdev_client_hotplug+0x2bc/0x4d0 [drm_kms_helper] drm_client_register+0x169/0x240 [drm] ast_pci_probe+0x142/0x190 [ast] local_pci_probe+0xdc/0x180 work_for_cpu_fn+0x4e/0xa0 process_one_work+0x8b7/0x1540 worker_thread+0x70a/0xed0 kthread+0x29f/0x340 ret_from_fork+0x1f/0x30
--- drivers/gpu/drm/drm_client_modeset.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/drm_client_modeset.c +1 -0
@@ -864,6 +864,7 @@ int drm_client_modeset_probe(struct drm_break ; } +kfree (modeset->mode); modeset->mode =drm_mode_duplicate (dev, mode);drm_connector_get (connector); modeset->connectors[modeset->num_connectors++] = connector;
Greg Kroah-Hartman
maintainerPATCH 453/509 ASoC: fsl_sai: Disable bit clock with transmitter
In reply to Greg Kroah-HartmanFrom: Matus Gajdos <[email protected]>
commit 269f399dc19f0e5c51711c3ba3bd06e0ef6ef403 upstream.
Otherwise bit clock remains running writing invalid data to the DAC.
--- sound/soc/fsl/fsl_sai.c | 2 +- sound/soc/fsl/fsl_sai.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
sound/soc/fsl/fsl_sai.c +1 -1
@@ -552,7 +552,7 @@ static void fsl_sai_config_disable(strucu32 xcsr, count =100 ;regmap_update_bits (sai->regmap,FSL_SAI_xCSR (tx, ofs), -FSL_SAI_CSR_TERE ,0 ); +FSL_SAI_CSR_TERE |FSL_SAI_CSR_BCE ,0 );/* TERE will remain set till the end of current frame */ do {
sound/soc/fsl/fsl_sai.h +1 -0
@@ -87,6 +87,7 @@/* SAI Transmit/Receive Control Register */ #define FSL_SAI_CSR_TERE BIT(31)#define FSL_SAI_CSR_SE BIT(30) +#define FSL_SAI_CSR_BCE BIT(28)#define FSL_SAI_CSR_FR BIT(25)#define FSL_SAI_CSR_SR BIT(24)#define FSL_SAI_CSR_xF_SHIFT 16
Greg Kroah-Hartman
maintainerPATCH 454/509 ext4: correct inline offset when handling xattrs in inode body
In reply to Greg Kroah-HartmanFrom: Eric Whitney <[email protected]>
commit 6909cf5c4101214f4305a62d582a5b93c7e1eb9a upstream.
When run on a file system where the inline_data feature has been enabled, xfstests generic/269, generic/270, and generic/476 cause ext4 to emit error messages indicating that inline directory entries are corrupted. This occurs because the inline offset used to locate inline directory entries in the inode body is not updated when an xattr in that shared region is deleted and the region is shifted in memory to recover the space it occupied. If the deleted xattr precedes the system.data attribute, which points to the inline directory entries, that attribute will be moved further up in the region. The inline offset continues to point to whatever is located in system.data's former location, with unfortunate effects when used to access directory entries or (presumably) inline data in the inode body.
--- fs/ext4/xattr.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
fs/ext4/xattr.c +14 -0
@@ -1725,6 +1725,20 @@ static int ext4_xattr_set_entry(struct ememmove (here, (void *)here + size, (void *)last - (void *)here +sizeof (__u32));memset (last,0 , size); + +/* +* Update i_inline_off - moved ibody region might contain +* system.data attribute. Handling a failure here won't +* cause other complications for setting an xattr. +*/ +if (!is_block &&ext4_has_inline_data (inode)) { + ret =ext4_find_inline_data_nolock (inode); +if (ret) { +ext4_warning_inode (inode, +"unable to update i_inline_off" ); + goto out; + } + } }else if (s->not_found) {/* Insert new name. */ size_t size =EXT4_XATTR_LEN (name_len);
Greg Kroah-Hartman
maintainerPATCH 455/509 debugobjects: Recheck debug_objects_enabled before reporting
In reply to Greg Kroah-HartmanFrom: Tetsuo Handa <[email protected]>
[ Upstream commit 8b64d420fe2450f82848178506d3e3a0bd195539 ]
syzbot is reporting false a positive ODEBUG message immediately after ODEBUG was disabled due to OOM.
[ 1062.309646][T22911] ODEBUG: Out of memory. ODEBUG disabled [ 1062.886755][ T5171] ------------[ cut here ]------------ [ 1062.892770][ T5171] ODEBUG: assert_init not available (active state 0) object: ffffc900056afb20 object type: timer_list hint: process_timeout+0x0/0x40
CPU 0 [ T5171] CPU 1 [T22911]
-------------- --------------
debug_object_assert_init() {
if (!debug_objects_enabled)
return;
db = get_bucket(addr);
lookup_object_or_alloc() {
debug_objects_enabled = 0;
return NULL;
}
debug_objects_oom() {
pr_warn("Out of memory. ODEBUG disabled\n");
// all buckets get emptied here, and
}
lookup_object_or_alloc(addr, db, descr, false, true) {
// this bucket is already empty.
return ERR_PTR(-ENOENT);
}
// Emits false positive warning.
debug_print_object(&o, "assert_init");
}Recheck debug_object_enabled in debug_print_object() to avoid that.
--- lib/debugobjects.c | 9 +++++++++ 1 file changed, 9 insertions(+)
lib/debugobjects.c +9 -0
@@ -501,6 +501,15 @@ static void debug_print_object(struct debug_obj *obj, char *msg)const struct debug_obj_descr *descr = obj->descr;static int limit; +/* +* Don't report if lookup_object_or_alloc() by the current thread +* failed because lookup_object_or_alloc()/debug_objects_oom() by a +* concurrent thread turned off debug_objects_enabled and cleared +* the hash buckets. +*/ +if (!debug_objects_enabled) +return ; +if (limit <5 && descr != descr_test) {void *hint = descr->debug_hint ? descr->debug_hint (obj->object) :NULL ;
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 456/509 nbd: Add the maximum limit of allocated index in nbd_dev_add
In reply to Greg Kroah-HartmanFrom: Zhong Jinghua <[email protected]>
[ Upstream commit f12bc113ce904777fd6ca003b473b427782b3dde ]
If the index allocated by idr_alloc greater than MINORMASK >> part_shift, the device number will overflow, resulting in failure to create a block device.
Fix it by imiting the size of the max allocation.
--- drivers/block/nbd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/block/nbd.c +2 -1
@@ -1723,7 +1723,8 @@ static int nbd_dev_add(int index)if (err == -ENOSPC ) err = -EEXIST ; }else { - err =idr_alloc (&nbd_index_idr, nbd,0 ,0 ,GFP_KERNEL ); + err =idr_alloc (&nbd_index_idr, nbd,0 , + (MINORMASK >> part_shift) +1 ,GFP_KERNEL );if (err >=0 ) index = err; }
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 457/509 md: fix data corruption for raid456 when reshape restart while grow up
In reply to Greg Kroah-HartmanFrom: Yu Kuai <[email protected]>
[ Upstream commit 873f50ece41aad5c4f788a340960c53774b5526e ]
Currently, if reshape is interrupted, echo "reshape" to sync_action will restart reshape from scratch, for example:
echo frozen > sync_action
echo reshape > sync_action
This will corrupt data before reshape_position if the array is growing, fix the problem by continue reshape from reshape_position.
--- drivers/md/md.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/md/md.c +12 -2
@@ -4890,11 +4890,21 @@ action_store(struct mddev *mddev, const char *page, size_t len)return -EINVAL ; err =mddev_lock (mddev);if (!err) { -if (test_bit (MD_RECOVERY_RUNNING , &mddev->recovery)) +if (test_bit (MD_RECOVERY_RUNNING , &mddev->recovery)) { err = -EBUSY ; -else { + }else if (mddev->reshape_position == MaxSector || + mddev->pers->check_reshape ==NULL || + mddev->pers->check_reshape (mddev)) {clear_bit (MD_RECOVERY_FROZEN , &mddev->recovery); err = mddev->pers->start_reshape (mddev); + }else { +/* +* If reshape is still in progress, and +* md_check_recovery() can continue to reshape, +* don't restart reshape because data can be +* corrupted for raid456. +*/ +clear_bit (MD_RECOVERY_FROZEN , &mddev->recovery); }mddev_unlock (mddev); }
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 458/509 md/raid10: prevent soft lockup while flush writes
In reply to Greg Kroah-HartmanFrom: Yu Kuai <[email protected]>
[ Upstream commit 010444623e7f4da6b4a4dd603a7da7469981e293 ]
Currently, there is no limit for raid1/raid10 plugged bio. While flushing writes, raid1 has cond_resched() while raid10 doesn't, and too many writes can cause soft lockup.
Follow up soft lockup can be triggered easily with writeback test for raid10 with ramdisks:
watchdog: BUG: soft lockup - CPU#10 stuck for 27s! [md0_raid10:1293] Call Trace: <TASK> call_rcu+0x16/0x20 put_object+0x41/0x80 __delete_object+0x50/0x90 delete_object_full+0x2b/0x40 kmemleak_free+0x46/0xa0 slab_free_freelist_hook.constprop.0+0xed/0x1a0 kmem_cache_free+0xfd/0x300 mempool_free_slab+0x1f/0x30 mempool_free+0x3a/0x100 bio_free+0x59/0x80 bio_put+0xcf/0x2c0 free_r10bio+0xbf/0xf0 raid_end_bio_io+0x78/0xb0 one_write_done+0x8a/0xa0 raid10_end_write_request+0x1b4/0x430 bio_endio+0x175/0x320 brd_submit_bio+0x3b9/0x9b7 [brd] __submit_bio+0x69/0xe0 submit_bio_noacct_nocheck+0x1e6/0x5a0 submit_bio_noacct+0x38c/0x7e0 flush_pending_writes+0xf0/0x240 raid10d+0xac/0x1ed0
Fix the problem by adding cond_resched() to raid10 like what raid1 did.
Note that unlimited plugged bio still need to be optimized, for example, in the case of lots of dirty pages writeback, this will take lots of memory and io will spend a long time in plug, hence io latency is bad.
--- drivers/md/raid10.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/md/raid10.c +2 -0
@@ -902,6 +902,7 @@ static void flush_pending_writes(struct r10conf *conf)else submit_bio_noacct (bio); bio = next; +cond_resched (); }blk_finish_plug (&plug); }else
@@ -1095,6 +1096,7 @@ static void raid10_unplug(struct blk_plug_cb *cb, bool from_schedule)else submit_bio_noacct (bio); bio = next; +cond_resched (); }kfree (plug); }
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 459/509 posix-timers: Ensure timer ID search-loop limit is valid
In reply to Greg Kroah-HartmanFrom: Thomas Gleixner <[email protected]>
[ Upstream commit 8ce8849dd1e78dadcee0ec9acbd259d239b7069f ]
posix_timer_add() tries to allocate a posix timer ID by starting from the cached ID which was stored by the last successful allocation.
This is done in a loop searching the ID space for a free slot one by one. The loop has to terminate when the search wrapped around to the starting point.
But that's racy vs. establishing the starting point. That is read out lockless, which leads to the following problem:
CPU0 CPU1posix_timer_add()
start = sig->posix_timer_id;
lock(hash_lock);
... posix_timer_add()
if (++sig->posix_timer_id < 0)
start = sig->posix_timer_id;
sig->posix_timer_id = 0;So CPU1 can observe a negative start value, i.e. -1, and the loop break never happens because the condition can never be true:
if (sig->posix_timer_id == start)
break;
While this is unlikely to ever turn into an endless loop as the ID space is huge (INT_MAX), the racy read of the start value caught the attention of KCSAN and Dmitry unearthed that incorrectness.
Rewrite it so that all id operations are under the hash lock.
--- include/linux/sched/signal.h | 2 +- kernel/time/posix-timers.c | 31 ++++++++++++++++++------------- 2 files changed, 19 insertions(+), 14 deletions(-)
include/linux/sched/signal.h +1 -1
@@ -125,7 +125,7 @@ struct signal_struct {#ifdef CONFIG_POSIX_TIMERS /* POSIX.1b Interval Timers */ -int posix_timer_id; +unsigned int next_posix_timer_id;struct list_head posix_timers;/* ITIMER_REAL timer for the process */
kernel/time/posix-timers.c +18 -13
@@ -140,25 +140,30 @@ static struct k_itimer *posix_timer_by_id(timer_t id)static int posix_timer_add (struct k_itimer *timer) {struct signal_struct *sig = current->signal; -int first_free_id = sig->posix_timer_id;struct hlist_head *head; -int ret = -ENOENT ; +unsigned int cnt, id; -do { +/* +* FIXME: Replace this by a per signal struct xarray once there is +* a plan to handle the resulting CRIU regression gracefully. +*/ +for (cnt =0 ; cnt <=INT_MAX ; cnt++) {spin_lock (&hash_lock); - head = &posix_timers_hashtable[hash (sig, sig->posix_timer_id)]; -if (!__posix_timers_find (head, sig, sig->posix_timer_id)) { + id = sig->next_posix_timer_id; + +/* Write the next ID back. Clamp it to the positive space */ + sig->next_posix_timer_id = (id +1 ) &INT_MAX ; + + head = &posix_timers_hashtable[hash (sig, id)]; +if (!__posix_timers_find (head, sig, id)) {hlist_add_head_rcu (&timer->t_hash, head); - ret = sig->posix_timer_id; +spin_unlock (&hash_lock); +return id; } -if (++sig->posix_timer_id <0 ) - sig->posix_timer_id =0 ; -if ((sig->posix_timer_id == first_free_id) && (ret == -ENOENT )) -/* Loop over all possible ids completed */ - ret = -EAGAIN ;spin_unlock (&hash_lock); - }while (ret == -ENOENT ); -return ret; + } +/* POSIX return code when no timer ID could be allocated */ +return -EAGAIN ; }static inline void unlock_timer (struct k_itimer *timr,unsigned long flags)
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 460/509 btrfs: add xxhash to fast checksum implementations
In reply to Greg Kroah-HartmanFrom: David Sterba <[email protected]>
[ Upstream commit efcfcbc6a36195c42d98e0ee697baba36da94dc8 ]
The implementation of XXHASH is now CPU only but still fast enough to be considered for the synchronous checksumming, like non-generic crc32c.
A userspace benchmark comparing it to various implementations (patched hash-speedtest from btrfs-progs):
Block size: 4096
Iterations: 1000000
Implementation: builtin
Units: CPU cycles
NULL-NOP: cycles: 73384294, cycles/i 73
NULL-MEMCPY: cycles: 228033868, cycles/i 228, 61664.320 MiB/s
CRC32C-ref: cycles: 24758559416, cycles/i 24758, 567.950 MiB/s
CRC32C-NI: cycles: 1194350470, cycles/i 1194, 11773.433 MiB/s
CRC32C-ADLERSW: cycles: 6150186216, cycles/i 6150, 2286.372 MiB/s
CRC32C-ADLERHW: cycles: 626979180, cycles/i 626, 22427.453 MiB/s
CRC32C-PCL: cycles: 466746732, cycles/i 466, 30126.699 MiB/s
XXHASH: cycles: 860656400, cycles/i 860, 16338.188 MiB/sComparing purely software implementation (ref), current outdated
accelerated using crc32q instruction (NI), optimized implementations by
M. Adler (https://stackoverflow.com/questions/17645167/implementing-sse-4-2s-crc32c-in-software/17646775#17646775)
and the best one that was taken from kernel using the PCLMULQDQ
instruction (PCL).
--- fs/btrfs/disk-io.c | 3 +++ 1 file changed, 3 insertions(+)
fs/btrfs/disk-io.c +3 -0
@@ -2256,6 +2256,9 @@ static int btrfs_init_csum_hash(struct btrfs_fs_info *fs_info, u16 csum_type)if (!strstr (crypto_shash_driver_name (csum_shash),"generic" ))set_bit (BTRFS_FS_CSUM_IMPL_FAST , &fs_info->flags);break ; +case BTRFS_CSUM_TYPE_XXHASH : +set_bit (BTRFS_FS_CSUM_IMPL_FAST , &fs_info->flags); +break ;default :break ; }
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 461/509 ACPI: button: Add lid disable DMI quirk for Nextbook Ares 8A
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit 4fd5556608bfa9c2bf276fc115ef04288331aded ]
The LID0 device on the Nextbook Ares 8A tablet always reports lid closed causing userspace to suspend the device as soon as booting is complete.
Add a DMI quirk to disable the broken lid functionality.
--- drivers/acpi/button.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/acpi/button.c +9 -0
@@ -82,6 +82,15 @@ static const struct dmi_system_id dmi_lid_quirks[] = { }, .driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_DISABLED, }, + { +/* Nextbook Ares 8A tablet, _LID device always reports lid closed */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Insyde" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"CherryTrail" ), + DMI_MATCH(DMI_BIOS_VERSION, "M882"), + }, + .driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_DISABLED, + }, {/* * Medion Akoya E2215T, notification of the LID device only
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 462/509 ACPI: video: Add backlight=native DMI quirk for Apple iMac11,3
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit 48436f2e9834b46b47b038b605c8142a1c07bc85 ]
Linux defaults to picking the non-working ACPI video backlight interface on the Apple iMac11,3 .
Add a DMI quirk to pick the working native radeon_bl0 interface instead.
--- drivers/acpi/video_detect.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/acpi/video_detect.c +8 -0
@@ -332,6 +332,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "82BK"), }, }, + { + .callback = video_detect_force_native, +/* Apple iMac11,3 */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Apple Inc." ), + DMI_MATCH(DMI_PRODUCT_NAME, "iMac11,3"), + }, + }, {/* https://bugzilla.redhat.com/show_bug.cgi?id=1217249 */ .callback = video_detect_force_native,
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 463/509 ACPI: video: Add backlight=native DMI quirk for Lenovo ThinkPad X131e (3371 AMD version)
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit bd5d93df86a7ddf98a2a37e9c3751e3cb334a66c ]
Linux defaults to picking the non-working ACPI video backlight interface on the Lenovo ThinkPad X131e (3371 AMD version).
Add a DMI quirk to pick the working native radeon_bl0 interface instead.
--- drivers/acpi/video_detect.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/acpi/video_detect.c +8 -0
@@ -332,6 +332,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "82BK"), }, }, + { + .callback = video_detect_force_native, +/* Lenovo ThinkPad X131e (3371 AMD version) */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"LENOVO" ), + DMI_MATCH(DMI_PRODUCT_NAME, "3371"), + }, + }, { .callback = video_detect_force_native,/* Apple iMac11,3 */
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 464/509 arm64: set __exception_irq_entry with __irq_entry as a default
In reply to Greg Kroah-HartmanFrom: Youngmin Nam <[email protected]>
[ Upstream commit f6794950f0e5ba37e3bbedda4d6ab0aad7395dd3 ]
filter_irq_stacks() is supposed to cut entries which are related irq entries from its call stack.
And in_irqentry_text() which is called by filter_irq_stacks() uses __irqentry_text_start/end symbol to find irq entries in callstack.
But it doesn't work correctly as without "CONFIG_FUNCTION_GRAPH_TRACER", arm64 kernel doesn't include gic_handle_irq which is entry point of arm64 irq between __irqentry_text_start and __irqentry_text_end as we discussed in below link.
https://lore.kernel.org/all/CACT4Y+aReMGLYua2rCLHgFpS9io5cZC04Q8GLs-uNmrn1ezxYQ@mail.gmail.com/#t
This problem can makes unintentional deep call stack entries especially in KASAN enabled situation as below.
[ 2479.383395]I[0:launcher-loader: 1719] Stack depot reached limit capacity [ 2479.383538]I[0:launcher-loader: 1719] WARNING: CPU: 0 PID: 1719 at lib/stackdepot.c:129 __stack_depot_save+0x464/0x46c [ 2479.385693]I[0:launcher-loader: 1719] pstate: 624000c5 (nZCv daIF +PAN -UAO +TCO -DIT -SSBS BTYPE=--) [ 2479.385724]I[0:launcher-loader: 1719] pc : __stack_depot_save+0x464/0x46c [ 2479.385751]I[0:launcher-loader: 1719] lr : __stack_depot_save+0x460/0x46c [ 2479.385774]I[0:launcher-loader: 1719] sp : ffffffc0080073c0 [ 2479.385793]I[0:launcher-loader: 1719] x29: ffffffc0080073e0 x28: ffffffd00b78a000 x27: 0000000000000000 [ 2479.385839]I[0:launcher-loader: 1719] x26: 000000000004d1dd x25: ffffff891474f000 x24: 00000000ca64d1dd [ 2479.385882]I[0:launcher-loader: 1719] x23: 0000000000000200 x22: 0000000000000220 x21: 0000000000000040 [ 2479.385925]I[0:launcher-loader: 1719] x20: ffffffc008007440 x19: 0000000000000000 x18: 0000000000000000 [ 2479.385969]I[0:launcher-loader: 1719] x17: 2065726568207475 x16: 000000000000005e x15: 2d2d2d2d2d2d2d20 [ 2479.386013]I[0:launcher-loader: 1719] x14: 5d39313731203a72 x13: 00000000002f6b30 x12: 00000000002f6af8 [ 2479.386057]I[0:launcher-loader: 1719] x11: 00000000ffffffff x10: ffffffb90aacf000 x9 : e8a74a6c16008800 [ 2479.386101]I[0:launcher-loader: 1719] x8 : e8a74a6c16008800 x7 : 00000000002f6b30 x6 : 00000000002f6af8 [ 2479.386145]I[0:launcher-loader: 1719] x5 : ffffffc0080070c8 x4 : ffffffd00b192380 x3 : ffffffd0092b313c [ 2479.386189]I[0:launcher-loader: 1719] x2 : 0000000000000001 x1 : 0000000000000004 x0 : 0000000000000022 [ 2479.386231]I[0:launcher-loader: 1719] Call trace: [ 2479.386248]I[0:launcher-loader: 1719] __stack_depot_save+0x464/0x46c [ 2479.386273]I[0:launcher-loader: 1719] kasan_save_stack+0x58/0x70 [ 2479.386303]I[0:launcher-loader: 1719] save_stack_info+0x34/0x138 [ 2479.386331]I[0:launcher-loader: 1719] kasan_save_free_info+0x18/0x24 [ 2479.386358]I[0:launcher-loader: 1719] ____kasan_slab_free+0x16c/0x170 [ 2479.386385]I[0:launcher-loader: 1719] __kasan_slab_free+0x10/0x20 [ 2479.386410]I[0:launcher-loader: 1719] kmem_cache_free+0x238/0x53c [ 2479.386435]I[0:launcher-loader: 1719] mempool_free_slab+0x1c/0x28 [ 2479.386460]I[0:launcher-loader: 1719] mempool_free+0x7c/0x1a0 [ 2479.386484]I[0:launcher-loader: 1719] bvec_free+0x34/0x80 [ 2479.386514]I[0:launcher-loader: 1719] bio_free+0x60/0x98 [ 2479.386540]I[0:launcher-loader: 1719] bio_put+0x50/0x21c [ 2479.386567]I[0:launcher-loader: 1719] f2fs_write_end_io+0x4ac/0x4d0 [ 2479.386594]I[0:launcher-loader: 1719] bio_endio+0x2dc/0x300 [ 2479.386622]I[0:launcher-loader: 1719] __dm_io_complete+0x324/0x37c [ 2479.386650]I[0:launcher-loader: 1719] dm_io_dec_pending+0x60/0xa4 [ 2479.386676]I[0:launcher-loader: 1719] clone_endio+0xf8/0x2f0 [ 2479.386700]I[0:launcher-loader: 1719] bio_endio+0x2dc/0x300 [ 2479.386727]I[0:launcher-loader: 1719] blk_update_request+0x258/0x63c [ 2479.386754]I[0:launcher-loader: 1719] scsi_end_request+0x50/0x304 [ 2479.386782]I[0:launcher-loader: 1719] scsi_io_completion+0x88/0x160 [ 2479.386808]I[0:launcher-loader: 1719] scsi_finish_command+0x17c/0x194 [ 2479.386833]I[0:launcher-loader: 1719] scsi_complete+0xcc/0x158 [ 2479.386859]I[0:launcher-loader: 1719] blk_mq_complete_request+0x4c/0x5c [ 2479.386885]I[0:launcher-loader: 1719] scsi_done_internal+0xf4/0x1e0 [ 2479.386910]I[0:launcher-loader: 1719] scsi_done+0x14/0x20 [ 2479.386935]I[0:launcher-loader: 1719] ufshcd_compl_one_cqe+0x578/0x71c [ 2479.386963]I[0:launcher-loader: 1719] ufshcd_mcq_poll_cqe_nolock+0xc8/0x150 [ 2479.386991]I[0:launcher-loader: 1719] ufshcd_intr+0x868/0xc0c [ 2479.387017]I[0:launcher-loader: 1719] __handle_irq_event_percpu+0xd0/0x348 [ 2479.387044]I[0:launcher-loader: 1719] handle_irq_event_percpu+0x24/0x74 [ 2479.387068]I[0:launcher-loader: 1719] handle_irq_event+0x74/0xe0 [ 2479.387091]I[0:launcher-loader: 1719] handle_fasteoi_irq+0x174/0x240 [ 2479.387118]I[0:launcher-loader: 1719] handle_irq_desc+0x7c/0x2c0 [ 2479.387147]I[0:launcher-loader: 1719] generic_handle_domain_irq+0x1c/0x28 [ 2479.387174]I[0:launcher-loader: 1719] gic_handle_irq+0x64/0x158 [ 2479.387204]I[0:launcher-loader: 1719] call_on_irq_stack+0x2c/0x54 [ 2479.387231]I[0:launcher-loader: 1719] do_interrupt_handler+0x70/0xa0 [ 2479.387258]I[0:launcher-loader: 1719] el1_interrupt+0x34/0x68 [ 2479.387283]I[0:launcher-loader: 1719] el1h_64_irq_handler+0x18/0x24 [ 2479.387308]I[0:launcher-loader: 1719] el1h_64_irq+0x68/0x6c [ 2479.387332]I[0:launcher-loader: 1719] blk_attempt_bio_merge+0x8/0x170 [ 2479.387356]I[0:launcher-loader: 1719] blk_mq_attempt_bio_merge+0x78/0x98 [ 2479.387383]I[0:launcher-loader: 1719] blk_mq_submit_bio+0x324/0xa40 [ 2479.387409]I[0:launcher-loader: 1719] __submit_bio+0x104/0x138 [ 2479.387436]I[0:launcher-loader: 1719] submit_bio_noacct_nocheck+0x1d0/0x4a0 [ 2479.387462]I[0:launcher-loader: 1719] submit_bio_noacct+0x618/0x804 [ 2479.387487]I[0:launcher-loader: 1719] submit_bio+0x164/0x180 [ 2479.387511]I[0:launcher-loader: 1719] f2fs_submit_read_bio+0xe4/0x1c4 [ 2479.387537]I[0:launcher-loader: 1719] f2fs_mpage_readpages+0x888/0xa4c [ 2479.387563]I[0:launcher-loader: 1719] f2fs_readahead+0xd4/0x19c [ 2479.387587]I[0:launcher-loader: 1719] read_pages+0xb0/0x4ac [ 2479.387614]I[0:launcher-loader: 1719] page_cache_ra_unbounded+0x238/0x288 [ 2479.387642]I[0:launcher-loader: 1719] do_page_cache_ra+0x60/0x6c [ 2479.387669]I[0:launcher-loader: 1719] page_cache_ra_order+0x318/0x364 [ 2479.387695]I[0:launcher-loader: 1719] ondemand_readahead+0x30c/0x3d8 [ 2479.387722]I[0:launcher-loader: 1719] page_cache_sync_ra+0xb4/0xc8 [ 2479.387749]I[0:launcher-loader: 1719] filemap_read+0x268/0xd24 [ 2479.387777]I[0:launcher-loader: 1719] f2fs_file_read_iter+0x1a0/0x62c [ 2479.387806]I[0:launcher-loader: 1719] vfs_read+0x258/0x34c [ 2479.387831]I[0:launcher-loader: 1719] ksys_pread64+0x8c/0xd0 [ 2479.387857]I[0:launcher-loader: 1719] __arm64_sys_pread64+0x48/0x54 [ 2479.387881]I[0:launcher-loader: 1719] invoke_syscall+0x58/0x158 [ 2479.387909]I[0:launcher-loader: 1719] el0_svc_common+0xf0/0x134 [ 2479.387935]I[0:launcher-loader: 1719] do_el0_svc+0x44/0x114 [ 2479.387961]I[0:launcher-loader: 1719] el0_svc+0x2c/0x80 [ 2479.387985]I[0:launcher-loader: 1719] el0t_64_sync_handler+0x48/0x114 [ 2479.388010]I[0:launcher-loader: 1719] el0t_64_sync+0x190/0x194 [ 2479.388038]I[0:launcher-loader: 1719] Kernel panic - not syncing: kernel: panic_on_warn set ...
So let's set __exception_irq_entry with __irq_entry as a default. Applying this patch, we can see gic_hande_irq is included in Systemp.map as below.
* Beforeffffffc008010000 T __do_softirqffffffc008010000 T __irqentry_text_endffffffc008010000 T __irqentry_text_startffffffc008010000 T __softirqentry_text_startffffffc008010000 T _stextffffffc00801066c T __softirqentry_text_endffffffc008010670 T __entry_text_start
* Afterffffffc008010000 T __irqentry_text_startffffffc008010000 T _stextffffffc008010000 t gic_handle_irqffffffc00801013c t gic_handle_irqffffffc008010294 T __irqentry_text_endffffffc008010298 T __do_softirqffffffc008010298 T __softirqentry_text_startffffffc008010904 T __softirqentry_text_endffffffc008010908 T __entry_text_start
--- arch/arm64/include/asm/exception.h | 5 ----- 1 file changed, 5 deletions(-)
arch/arm64/include/asm/exception.h +0 -5
@@ -8,16 +8,11 @@#define __ASM_EXCEPTION_H#include <asm/esr.h> -#include <asm/kprobes.h> #include <asm/ptrace.h> #include <linux/interrupt.h> -#ifdef CONFIG_FUNCTION_GRAPH_TRACER #define __exception_irq_entry __irq_entry -#else -#define __exception_irq_entry __kprobes -#endif static inline u32 disr_to_esr (u64 disr) {
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 465/509 arm64: mm: fix VA-range sanity check
In reply to Greg Kroah-HartmanFrom: Mark Rutland <[email protected]>
[ Upstream commit ab9b4008092c86dc12497af155a0901cc1156999 ]
Both create_mapping_noalloc() and update_mapping_prot() sanity-check their 'virt' parameter, but the check itself doesn't make much sense. The condition used today appears to be a historical accident.
The sanity-check condition:
if ((virt >= PAGE_END) && (virt < VMALLOC_START)) {
[ ... warning here ... ]
return;
}... can only be true for the KASAN shadow region or the module region, and there's no reason to exclude these specifically for creating and updateing mappings.
When arm64 support was first upstreamed in commit:
c1cc1552616d0f35 ("arm64: MMU initialisation")
... the condition was:
if (virt < VMALLOC_START) {
[ ... warning here ... ]
return;
}At the time, VMALLOC_START was the lowest kernel address, and this was checking whether 'virt' would be translated via TTBR1.
Subsequently in commit:
14c127c957c1c607 ("arm64: mm: Flip kernel VA space")
... the condition was changed to:
if ((virt >= VA_START) && (virt < VMALLOC_START)) {
[ ... warning here ... ]
return;
}This appear to have been a thinko. The commit moved the linear map to the bottom of the kernel address space, with VMALLOC_START being at the halfway point. The old condition would warn for changes to the linear map below this, and at the time VA_START was the end of the linear map.
Subsequently we cleaned up the naming of VA_START in commit:
77ad4ce69321abbe ("arm64: memory: rename VA_START to PAGE_END")
... keeping the erroneous condition as:
if ((virt >= PAGE_END) && (virt < VMALLOC_START)) {
[ ... warning here ... ]
return;
}Correct the condition to check against the start of the TTBR1 address space, which is currently PAGE_OFFSET. This simplifies the logic, and more clearly matches the "outside kernel range" message in the warning.
--- arch/arm64/mm/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/mm/mmu.c +2 -2
@@ -421,7 +421,7 @@ static phys_addr_t pgd_pgtable_alloc(int shift)static void __init create_mapping_noalloc (phys_addr_t phys,unsigned long virt,phys_addr_t size,pgprot_t prot) { -if ((virt >=PAGE_END ) && (virt <VMALLOC_START )) { +if (virt <PAGE_OFFSET ) {pr_warn ("BUG: not creating mapping for %pa at 0x%016lx - outside kernel range\n" , &phys, virt);return ;
@@ -448,7 +448,7 @@ void __init create_pgd_mapping(struct mm_struct *mm, phys_addr_t phys,static void update_mapping_prot (phys_addr_t phys,unsigned long virt,phys_addr_t size,pgprot_t prot) { -if ((virt >=PAGE_END ) && (virt <VMALLOC_START )) { +if (virt <PAGE_OFFSET ) {pr_warn ("BUG: not updating mapping for %pa at 0x%016lx - outside kernel range\n" , &phys, virt);return ;
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 466/509 sched/fair: Dont balance task to its current running CPU
In reply to Greg Kroah-HartmanFrom: Yicong Yang <[email protected]>
[ Upstream commit 0dd37d6dd33a9c23351e6115ae8cdac7863bc7de ]
We've run into the case that the balancer tries to balance a migration disabled task and trigger the warning in set_task_cpu() like below:
------------[ cut here ]------------ WARNING: CPU: 7 PID: 0 at kernel/sched/core.c:3115 set_task_cpu+0x188/0x240 Modules linked in: hclgevf xt_CHECKSUM ipt_REJECT nf_reject_ipv4 <...snip> CPU: 7 PID: 0 Comm: swapper/7 Kdump: loaded Tainted: G O 6.1.0-rc4+ #1 Hardware name: Huawei TaiShan 2280 V2/BC82AMDC, BIOS 2280-V2 CS V5.B221.01 12/09/2021 pstate: 604000c9 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : set_task_cpu+0x188/0x240 lr : load_balance+0x5d0/0xc60 sp : ffff80000803bc70 x29: ffff80000803bc70 x28: ffff004089e190e8 x27: ffff004089e19040 x26: ffff007effcabc38 x25: 0000000000000000 x24: 0000000000000001 x23: ffff80000803be84 x22: 000000000000000c x21: ffffb093e79e2a78 x20: 000000000000000c x19: ffff004089e19040 x18: 0000000000000000 x17: 0000000000001fad x16: 0000000000000030 x15: 0000000000000000 x14: 0000000000000003 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000001 x10: 0000000000000400 x9 : ffffb093e4cee530 x8 : 00000000fffffffe x7 : 0000000000ce168a x6 : 000000000000013e x5 : 00000000ffffffe1 x4 : 0000000000000001 x3 : 0000000000000b2a x2 : 0000000000000b2a x1 : ffffb093e6d6c510 x0 : 0000000000000001 Call trace: set_task_cpu+0x188/0x240 load_balance+0x5d0/0xc60 rebalance_domains+0x26c/0x380 _nohz_idle_balance.isra.0+0x1e0/0x370 run_rebalance_domains+0x6c/0x80 __do_softirq+0x128/0x3d8 ____do_softirq+0x18/0x24 call_on_irq_stack+0x2c/0x38 do_softirq_own_stack+0x24/0x3c __irq_exit_rcu+0xcc/0xf4 irq_exit_rcu+0x18/0x24 el1_interrupt+0x4c/0xe4 el1h_64_irq_handler+0x18/0x2c el1h_64_irq+0x74/0x78 arch_cpu_idle+0x18/0x4c default_idle_call+0x58/0x194 do_idle+0x244/0x2b0 cpu_startup_entry+0x30/0x3c secondary_start_kernel+0x14c/0x190 __secondary_switched+0xb0/0xb4 ---[ end trace 0000000000000000 ]---
Further investigation shows that the warning is superfluous, the migration disabled task is just going to be migrated to its current running CPU. This is because that on load balance if the dst_cpu is not allowed by the task, we'll re-select a new_dst_cpu as a candidate. If no task can be balanced to dst_cpu we'll try to balance the task to the new_dst_cpu instead. In this case when the migration disabled task is not on CPU it only allows to run on its current CPU, load balance will select its current CPU as new_dst_cpu and later triggers the warning above.
The new_dst_cpu is chosen from the env->dst_grpmask. Currently it contains CPUs in sched_group_span() and if we have overlapped groups it's possible to run into this case. This patch makes env->dst_grpmask of group_balance_mask() which exclude any CPUs from the busiest group and solve the issue. For balancing in a domain with no overlapped groups the behaviour keeps same as before.
--- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/fair.c +1 -1
@@ -9883,7 +9883,7 @@ static int load_balance(int this_cpu, struct rq *this_rq, .sd = sd, .dst_cpu = this_cpu, .dst_rq = this_rq, - .dst_grpmask = sched_group_span(sd->groups), + .dst_grpmask = group_balance_mask(sd->groups), .idle = idle, .loop_break = sched_nr_migrate_break, .cpus = cpus,
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 467/509 wifi: ath11k: fix registration of 6Ghz-only phy without the full channel range
In reply to Greg Kroah-HartmanFrom: Maxime Bizon <[email protected]>
[ Upstream commit e2ceb1de2f83aafd8003f0b72dfd4b7441e97d14 ]
Because of what seems to be a typo, a 6Ghz-only phy for which the BDF does not allow the 7115Mhz channel will fail to register:
WARNING: CPU: 2 PID: 106 at net/wireless/core.c:907 wiphy_register+0x914/0x954 Modules linked in: ath11k_pci sbsa_gwdt CPU: 2 PID: 106 Comm: kworker/u8:5 Not tainted 6.3.0-rc7-next-20230418-00549-g1e096a17625a-dirty #9 Hardware name: Freebox V7R Board (DT) Workqueue: ath11k_qmi_driver_event ath11k_qmi_driver_event_work pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : wiphy_register+0x914/0x954 lr : ieee80211_register_hw+0x67c/0xc10 sp : ffffff800b123aa0 x29: ffffff800b123aa0 x28: 0000000000000000 x27: 0000000000000000 x26: 0000000000000000 x25: 0000000000000006 x24: ffffffc008d51418 x23: ffffffc008cb0838 x22: ffffff80176c2460 x21: 0000000000000168 x20: ffffff80176c0000 x19: ffffff80176c03e0 x18: 0000000000000014 x17: 00000000cbef338c x16: 00000000d2a26f21 x15: 00000000ad6bb85f x14: 0000000000000020 x13: 0000000000000020 x12: 00000000ffffffbd x11: 0000000000000208 x10: 00000000fffffdf7 x9 : ffffffc009394718 x8 : ffffff80176c0528 x7 : 000000007fffffff x6 : 0000000000000006 x5 : 0000000000000005 x4 : ffffff800b304284 x3 : ffffff800b304284 x2 : ffffff800b304d98 x1 : 0000000000000000 x0 : 0000000000000000 Call trace: wiphy_register+0x914/0x954 ieee80211_register_hw+0x67c/0xc10 ath11k_mac_register+0x7c4/0xe10 ath11k_core_qmi_firmware_ready+0x1f4/0x570 ath11k_qmi_driver_event_work+0x198/0x590 process_one_work+0x1b8/0x328 worker_thread+0x6c/0x414 kthread+0x100/0x104 ret_from_fork+0x10/0x20 ---[ end trace 0000000000000000 ]--- ath11k_pci 0002:01:00.0: ieee80211 registration failed: -22 ath11k_pci 0002:01:00.0: failed register the radio with mac80211: -22 ath11k_pci 0002:01:00.0: failed to create pdev core: -22
--- drivers/net/wireless/ath/ath11k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath11k/mac.c +1 -1
@@ -6044,7 +6044,7 @@ static int ath11k_mac_setup_channels_rates(struct ath11k *ar, }if (supported_bands &WMI_HOST_WLAN_5G_CAP ) { -if (reg_cap->high_5ghz_chan >=ATH11K_MAX_6G_FREQ ) { +if (reg_cap->high_5ghz_chan >=ATH11K_MIN_6G_FREQ ) { channels =kmemdup (ath11k_6ghz_channels,sizeof (ath11k_6ghz_channels),GFP_KERNEL );if (!channels) {
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 468/509 bpf: Address KCSAN report on bpf_lru_list
In reply to Greg Kroah-HartmanFrom: Martin KaFai Lau <[email protected]>
[ Upstream commit ee9fd0ac3017c4313be91a220a9ac4c99dde7ad4 ]
KCSAN reported a data-race when accessing node->ref. Although node->ref does not have to be accurate,
take this chance to use a more common READ_ONCE() and WRITE_ONCE() pattern instead of data_race().
There is an existing bpf_lru_node_is_ref() and bpf_lru_node_set_ref(). This patch also adds bpf_lru_node_clear_ref() to do the WRITE_ONCE(node->ref, 0) also.
==================================================================
BUG: KCSAN: data-race in __bpf_lru_list_rotate / __htab_lru_percpu_map_update_elem
write to 0xffff888137038deb of 1 bytes by task 11240 on cpu 1:
__bpf_lru_node_move kernel/bpf/bpf_lru_list.c:113 [inline] __bpf_lru_list_rotate_active kernel/bpf/bpf_lru_list.c:149 [inline] __bpf_lru_list_rotate+0x1bf/0x750 kernel/bpf/bpf_lru_list.c:240 bpf_lru_list_pop_free_to_local kernel/bpf/bpf_lru_list.c:329 [inline] bpf_common_lru_pop_free kernel/bpf/bpf_lru_list.c:447 [inline] bpf_lru_pop_free+0x638/0xe20 kernel/bpf/bpf_lru_list.c:499 prealloc_lru_pop kernel/bpf/hashtab.c:290 [inline] __htab_lru_percpu_map_update_elem+0xe7/0x820 kernel/bpf/hashtab.c:1316 bpf_percpu_hash_update+0x5e/0x90 kernel/bpf/hashtab.c:2313 bpf_map_update_value+0x2a9/0x370 kernel/bpf/syscall.c:200 generic_map_update_batch+0x3ae/0x4f0 kernel/bpf/syscall.c:1687 bpf_map_do_batch+0x2d9/0x3d0 kernel/bpf/syscall.c:4534 __sys_bpf+0x338/0x810 __do_sys_bpf kernel/bpf/syscall.c:5096 [inline] __se_sys_bpf kernel/bpf/syscall.c:5094 [inline] __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5094 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd
read to 0xffff888137038deb of 1 bytes by task 11241 on cpu 0:
bpf_lru_node_set_ref kernel/bpf/bpf_lru_list.h:70 [inline] __htab_lru_percpu_map_update_elem+0x2f1/0x820 kernel/bpf/hashtab.c:1332 bpf_percpu_hash_update+0x5e/0x90 kernel/bpf/hashtab.c:2313 bpf_map_update_value+0x2a9/0x370 kernel/bpf/syscall.c:200 generic_map_update_batch+0x3ae/0x4f0 kernel/bpf/syscall.c:1687 bpf_map_do_batch+0x2d9/0x3d0 kernel/bpf/syscall.c:4534 __sys_bpf+0x338/0x810 __do_sys_bpf kernel/bpf/syscall.c:5096 [inline] __se_sys_bpf kernel/bpf/syscall.c:5094 [inline] __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5094 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd
value changed: 0x01 -> 0x00
Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 11241 Comm: syz-executor.3 Not tainted 6.3.0-rc7-syzkaller-00136-g6a66fdd29ea1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023 ==================================================================
--- kernel/bpf/bpf_lru_list.c | 21 +++++++++++++-------- kernel/bpf/bpf_lru_list.h | 7 ++----- 2 files changed, 15 insertions(+), 13 deletions(-)
kernel/bpf/bpf_lru_list.c +13 -8
@@ -41,7 +41,12 @@ static struct list_head *local_pending_list(struct bpf_lru_locallist *loc_l)/* bpf_lru_node helpers */ static bool bpf_lru_node_is_ref (const struct bpf_lru_node *node) { -return node->ref; +return READ_ONCE (node->ref); +} + +static void bpf_lru_node_clear_ref (struct bpf_lru_node *node) +{ +WRITE_ONCE (node->ref,0 ); } static void bpf_lru_list_count_inc(struct bpf_lru_list *l,
@@ -89,7 +94,7 @@ static void __bpf_lru_node_move_in(struct bpf_lru_list *l,bpf_lru_list_count_inc (l, tgt_type); node->type = tgt_type; - node->ref =0 ; +bpf_lru_node_clear_ref (node);list_move (&node->list, &l->lists[tgt_type]); }
@@ -110,7 +115,7 @@ static void __bpf_lru_node_move(struct bpf_lru_list *l,bpf_lru_list_count_inc (l, tgt_type); node->type = tgt_type; } - node->ref =0 ; +bpf_lru_node_clear_ref (node);/* If the moving node is the next_inactive_rotation candidate, * move the next_inactive_rotation pointer also.
@@ -353,7 +358,7 @@ static void __local_list_add_pending(struct bpf_lru *lru, *(u32 *)((void *)node + lru->hash_offset) = hash; node->cpu = cpu; node->type =BPF_LRU_LOCAL_LIST_T_PENDING ; - node->ref =0 ; +bpf_lru_node_clear_ref (node);list_add (&node->list,local_pending_list (loc_l)); }
@@ -419,7 +424,7 @@ static struct bpf_lru_node *bpf_percpu_lru_pop_free(struct bpf_lru *lru,if (!list_empty (free_list)) { node = list_first_entry(free_list, struct bpf_lru_node, list); *(u32 *)((void *)node + lru->hash_offset) = hash; - node->ref =0 ; +bpf_lru_node_clear_ref (node);__bpf_lru_node_move (l, node,BPF_LRU_LIST_T_INACTIVE ); }
@@ -522,7 +527,7 @@ static void bpf_common_lru_push_free(struct bpf_lru *lru, } node->type =BPF_LRU_LOCAL_LIST_T_FREE ; - node->ref =0 ; +bpf_lru_node_clear_ref (node);list_move (&node->list,local_free_list (loc_l));raw_spin_unlock_irqrestore (&loc_l->lock, flags);
@@ -568,7 +573,7 @@ static void bpf_common_lru_populate(struct bpf_lru *lru, void *buf, node = (struct bpf_lru_node *)(buf + node_offset); node->type =BPF_LRU_LIST_T_FREE ; - node->ref =0 ; +bpf_lru_node_clear_ref (node);list_add (&node->list, &l->lists[BPF_LRU_LIST_T_FREE ]); buf += elem_size; }
@@ -594,7 +599,7 @@ static void bpf_percpu_lru_populate(struct bpf_lru *lru, void *buf, node = (struct bpf_lru_node *)(buf + node_offset); node->cpu = cpu; node->type =BPF_LRU_LIST_T_FREE ; - node->ref =0 ; +bpf_lru_node_clear_ref (node);list_add (&node->list, &l->lists[BPF_LRU_LIST_T_FREE ]); i++; buf += elem_size;
kernel/bpf/bpf_lru_list.h +2 -5
@@ -63,11 +63,8 @@ struct bpf_lru {static inline void bpf_lru_node_set_ref (struct bpf_lru_node *node) { -/* ref is an approximation on access frequency. It does not -* have to be very accurate. Hence, no protection is used. -*/ -if (!node->ref) - node->ref =1 ; +if (!READ_ONCE (node->ref)) +WRITE_ONCE (node->ref,1 ); } int bpf_lru_init(struct bpf_lru *lru, bool percpu, u32 hash_offset,
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 469/509 devlink: report devlink_port_type_warn source device
In reply to Greg Kroah-HartmanFrom: Petr Oros <[email protected]>
[ Upstream commit a52305a81d6bb74b90b400dfa56455d37872fe4b ]
devlink_port_type_warn is scheduled for port devlink and warning when the port type is not set. But from this warning it is not easy found out which device (driver) has no devlink port set.
[ 3709.975552] Type was not set for devlink port. [ 3709.975579] WARNING: CPU: 1 PID: 13092 at net/devlink/leftover.c:6775 devlink_port_type_warn+0x11/0x20 [ 3709.993967] Modules linked in: openvswitch nf_conncount nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nfnetlink bluetooth rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache netfs vhost_net vhost vhost_iotlb tap tun bridge stp llc qrtr intel_rapl_msr intel_rapl_common i10nm_edac nfit libnvdimm x86_pkg_temp_thermal mlx5_ib intel_powerclamp coretemp dell_wmi ledtrig_audio sparse_keymap ipmi_ssif kvm_intel ib_uverbs rfkill ib_core video kvm iTCO_wdt acpi_ipmi intel_vsec irqbypass ipmi_si iTCO_vendor_support dcdbas ipmi_devintf mei_me ipmi_msghandler rapl mei intel_cstate isst_if_mmio isst_if_mbox_pci dell_smbios intel_uncore isst_if_common i2c_i801 dell_wmi_descriptor wmi_bmof i2c_smbus intel_pch_thermal pcspkr acpi_power_meter xfs libcrc32c sd_mod sg nvme_tcp mgag200 i2c_algo_bit nvme_fabrics drm_shmem_helper drm_kms_helper nvme syscopyarea ahci sysfillrect sysimgblt nvme_core fb_sys_fops crct10dif_pclmul libahci mlx5_core sfc crc32_pclmul nvme_common drm [ 3709.994030] crc32c_intel mtd t10_pi mlxfw libata tg3 mdio megaraid_sas psample ghash_clmulni_intel pci_hyperv_intf wmi dm_multipath sunrpc dm_mirror dm_region_hash dm_log dm_mod be2iscsi bnx2i cnic uio cxgb4i cxgb4 tls libcxgbi libcxgb qla4xxx iscsi_boot_sysfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi fuse [ 3710.108431] CPU: 1 PID: 13092 Comm: kworker/1:1 Kdump: loaded Not tainted 5.14.0-319.el9.x86_64 #1 [ 3710.108435] Hardware name: Dell Inc. PowerEdge R750/0PJ80M, BIOS 1.8.2 09/14/2022 [ 3710.108437] Workqueue: events devlink_port_type_warn [ 3710.108440] RIP: 0010:devlink_port_type_warn+0x11/0x20 [ 3710.108443] Code: 84 76 fe ff ff 48 c7 03 20 0e 1a ad 31 c0 e9 96 fd ff ff 66 0f 1f 44 00 00 0f 1f 44 00 00 48 c7 c7 18 24 4e ad e8 ef 71 62 ff <0f> 0b c3 cc cc cc cc 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 f6 87 [ 3710.108445] RSP: 0018:ff3b6d2e8b3c7e90 EFLAGS: 00010282 [ 3710.108447] RAX: 0000000000000000 RBX: ff366d6580127080 RCX: 0000000000000027 [ 3710.108448] RDX: 0000000000000027 RSI: 00000000ffff86de RDI: ff366d753f41f8c8 [ 3710.108449] RBP: ff366d658ff5a0c0 R08: ff366d753f41f8c0 R09: ff3b6d2e8b3c7e18 [ 3710.108450] R10: 0000000000000001 R11: 0000000000000023 R12: ff366d753f430600 [ 3710.108451] R13: ff366d753f436900 R14: 0000000000000000 R15: ff366d753f436905 [ 3710.108452] FS: 0000000000000000(0000) GS:ff366d753f400000(0000) knlGS:0000000000000000 [ 3710.108453] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3710.108454] CR2: 00007f1c57bc74e0 CR3: 000000111d26a001 CR4: 0000000000773ee0 [ 3710.108456] PKRU: 55555554 [ 3710.108457] Call Trace: [ 3710.108458] <TASK> [ 3710.108459] process_one_work+0x1e2/0x3b0 [ 3710.108466] ? rescuer_thread+0x390/0x390 [ 3710.108468] worker_thread+0x50/0x3a0 [ 3710.108471] ? rescuer_thread+0x390/0x390 [ 3710.108473] kthread+0xdd/0x100 [ 3710.108477] ? kthread_complete_and_exit+0x20/0x20 [ 3710.108479] ret_from_fork+0x1f/0x30 [ 3710.108485] </TASK> [ 3710.108486] ---[ end trace 1b4b23cd0c65d6a0 ]---
After patch:
[ 402.473064] ice 0000:41:00.0: Type was not set for devlink port. [ 402.473064] ice 0000:41:00.1: Type was not set for devlink port.
--- net/core/devlink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
net/core/devlink.c +4 -1
@@ -8092,7 +8092,10 @@ EXPORT_SYMBOL_GPL(devlink_free);static void devlink_port_type_warn (struct work_struct *work) { -WARN (true,"Type was not set for devlink port." ); +struct devlink_port *port =container_of (to_delayed_work (work), + struct devlink_port, + type_warn_dw); +dev_warn (port->devlink->dev,"Type was not set for devlink port." ); }static bool devlink_port_type_should_warn (struct devlink_port *devlink_port)
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 470/509 wifi: wext-core: Fix -Wstringop-overflow warning in ioctl_standard_iw_point()
In reply to Greg Kroah-HartmanFrom: Gustavo A. R. Silva <[email protected]>
[ Upstream commit 71e7552c90db2a2767f5c17c7ec72296b0d92061 ]
-Wstringop-overflow is legitimately warning us about extra_size pontentially being zero at some point, hence potenially ending up _allocating_ zero bytes of memory for extra pointer and then trying to access such object in a call to copy_from_user().
Fix this by adding a sanity check to ensure we never end up trying to allocate zero bytes of data for extra pointer, before continue executing the rest of the code in the function.
Address the following -Wstringop-overflow warning seen when built
m68k architecture with allyesconfig configuration:
from net/wireless/wext-core.c:11:
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:183:7,
inlined from 'ioctl_standard_iw_point' at net/wireless/wext-core.c:825:7:arch/m68k/include/asm/string.h:48:25: warning: '__builtin_memset' writing 1 or more bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
48 | #define memset(d, c, n) __builtin_memset(d, c, n)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/uaccess.h:153:17: note: in expansion of macro 'memset'
153 | memset(to + (n - res), 0, res);
| ^~~~~~In function 'kmalloc',
inlined from 'kzalloc' at include/linux/slab.h:694:9,
inlined from 'ioctl_standard_iw_point' at net/wireless/wext-core.c:819:10:include/linux/slab.h:577:16: note: at offset 1 into destination object of size 0 allocated by '__kmalloc'
577 | return __kmalloc(size, flags);
| ^~~~~~~~~~~~~~~~~~~~~~This help with the ongoing efforts to globally enable -Wstringop-overflow.
--- net/wireless/wext-core.c | 6 ++++++ 1 file changed, 6 insertions(+)
net/wireless/wext-core.c +6 -0
@@ -796,6 +796,12 @@ static int ioctl_standard_iw_point(struct iw_point *iwp, unsigned int cmd, } } +/* Sanity-check to ensure we never end up _allocating_ zero +* bytes of data for extra. +*/ +if (extra_size <=0 ) +return -EFAULT ; +/* kzalloc() ensures NULL-termination for essid_compat. */ extra =kzalloc (extra_size,GFP_KERNEL );if (!extra)
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 471/509 wifi: iwlwifi: mvm: avoid baid size integer overflow
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit 1a528ab1da324d078ec60283c34c17848580df24 ]
Roee reported various hard-to-debug crashes with pings in EHT aggregation scenarios. Enabling KASAN showed that we access the BAID allocation out of bounds, and looking at the code a bit shows that since the reorder buffer entry (struct iwl_mvm_reorder_buf_entry) is 128 bytes if debug such as lockdep is enabled, then staring from an agg size 512 we overflow the size calculation, and allocate a much smaller structure than we should, causing slab corruption once we initialize this.
Fix this by simply using u32 instead of u16.
--- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/mvm/sta.c +1 -1
@@ -2590,7 +2590,7 @@ int iwl_mvm_sta_rx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta, }if (iwl_mvm_has_new_rx_api (mvm) && start) { -u16 reorder_buf_size = buf_size *sizeof (baid_data->entries[0 ]); +u32 reorder_buf_size = buf_size *sizeof (baid_data->entries[0 ]);/* sparse doesn't like the __align() so don't check */ #ifndef __CHECKER__
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 472/509 igb: Fix igb_down hung on surprise removal
In reply to Greg Kroah-HartmanFrom: Ying Hsu <[email protected]>
[ Upstream commit 004d25060c78fc31f66da0fa439c544dda1ac9d5 ]
In a setup where a Thunderbolt hub connects to Ethernet and a display through USB Type-C, users may experience a hung task timeout when they remove the cable between the PC and the Thunderbolt hub. This is because the igb_down function is called multiple times when the Thunderbolt hub is unplugged. For example, the igb_io_error_detected triggers the first call, and the igb_remove triggers the second call. The second call to igb_down will block at napi_synchronize. Here's the call trace:
__schedule+0x3b0/0xddb
? __mod_timer+0x164/0x5d3
schedule+0x44/0xa8
schedule_timeout+0xb2/0x2a4
? run_local_timers+0x4e/0x4e
msleep+0x31/0x38
igb_down+0x12c/0x22a [igb 6615058754948bfde0bf01429257eb59f13030d4]
__igb_close+0x6f/0x9c [igb 6615058754948bfde0bf01429257eb59f13030d4]
igb_close+0x23/0x2b [igb 6615058754948bfde0bf01429257eb59f13030d4]
__dev_close_many+0x95/0xec
dev_close_many+0x6e/0x103
unregister_netdevice_many+0x105/0x5b1
unregister_netdevice_queue+0xc2/0x10d
unregister_netdev+0x1c/0x23
igb_remove+0xa7/0x11c [igb 6615058754948bfde0bf01429257eb59f13030d4]
pci_device_remove+0x3f/0x9c
device_release_driver_internal+0xfe/0x1b4
pci_stop_bus_device+0x5b/0x7f
pci_stop_bus_device+0x30/0x7f
pci_stop_bus_device+0x30/0x7f
pci_stop_and_remove_bus_device+0x12/0x19
pciehp_unconfigure_device+0x76/0xe9
pciehp_disable_slot+0x6e/0x131
pciehp_handle_presence_or_link_change+0x7a/0x3f7
pciehp_ist+0xbe/0x194
irq_thread_fn+0x22/0x4d
? irq_thread+0x1fd/0x1fd
irq_thread+0x17b/0x1fd
? irq_forced_thread_fn+0x5f/0x5f
kthread+0x142/0x153
? __irq_get_irqchip_state+0x46/0x46
? kthread_associate_blkcg+0x71/0x71
ret_from_fork+0x1f/0x30In this case, igb_io_error_detected detaches the network interface and requests a PCIE slot reset, however, the PCIE reset callback is not being invoked and thus the Ethernet connection breaks down. As the PCIE error in this case is a non-fatal one, requesting a slot reset can be avoided.
This patch fixes the task hung issue and preserves Ethernet connection by ignoring non-fatal PCIE errors.
--- drivers/net/ethernet/intel/igb/igb_main.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/ethernet/intel/igb/igb_main.c +5 -0
@@ -9453,6 +9453,11 @@ static pci_ers_result_t igb_io_error_detected(struct pci_dev *pdev,struct net_device *netdev =pci_get_drvdata (pdev);struct igb_adapter *adapter =netdev_priv (netdev); +if (state == pci_channel_io_normal) { +dev_warn (&pdev->dev,"Non-correctable non-fatal error reported.\n" ); +return PCI_ERS_RESULT_CAN_RECOVER ; + } +netif_device_detach (netdev);if (state == pci_channel_io_perm_failure)
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 473/509 spi: bcm63xx: fix max prepend length
In reply to Greg Kroah-HartmanFrom: Jonas Gorski <[email protected]>
[ Upstream commit 5158814cbb37bbb38344b3ecddc24ba2ed0365f2 ]
The command word is defined as following:
/* Command */
#define SPI_CMD_COMMAND_SHIFT 0
#define SPI_CMD_DEVICE_ID_SHIFT 4
#define SPI_CMD_PREPEND_BYTE_CNT_SHIFT 8
#define SPI_CMD_ONE_BYTE_SHIFT 11
#define SPI_CMD_ONE_WIRE_SHIFT 12If the prepend byte count field starts at bit 8, and the next defined bit is SPI_CMD_ONE_BYTE at bit 11, it can be at most 3 bits wide, and thus the max value is 7, not 15.
--- drivers/spi/spi-bcm63xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-bcm63xx.c +1 -1
@@ -126,7 +126,7 @@ enum bcm63xx_regs_spi { SPI_MSG_DATA_SIZE, }; -#define BCM63XX_SPI_MAX_PREPEND 15 +#define BCM63XX_SPI_MAX_PREPEND 7#define BCM63XX_SPI_MAX_CS 8#define BCM63XX_SPI_BUS_NUM 0
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 474/509 fbdev: imxfb: warn about invalid left/right margin
In reply to Greg Kroah-HartmanFrom: Martin Kaiser <[email protected]>
[ Upstream commit 4e47382fbca916d7db95cbf9e2d7ca2e9d1ca3fe ]
Warn about invalid var->left_margin or var->right_margin. Their values are read from the device tree.
We store var->left_margin-3 and var->right_margin-1 in register fields. These fields should be >= 0.
--- drivers/video/fbdev/imxfb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/fbdev/imxfb.c +2 -2
@@ -602,10 +602,10 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *infif (var->hsync_len <1 || var->hsync_len >64 )printk (KERN_ERR "%s: invalid hsync_len %d\n" , info->fix.id, var->hsync_len); -if (var->left_margin >255 ) +if (var->left_margin <3 || var->left_margin >255 )printk (KERN_ERR "%s: invalid left_margin %d\n" , info->fix.id, var->left_margin); -if (var->right_margin >255 ) +if (var->right_margin <1 || var->right_margin >255 )printk (KERN_ERR "%s: invalid right_margin %d\n" , info->fix.id, var->right_margin);if (var->yres <1 || var->yres > ymax_mask)
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 475/509 pinctrl: amd: Use amd_pinconf_set() for all config options
In reply to Greg Kroah-HartmanFrom: Mario Limonciello <[email protected]>
[ Upstream commit 635a750d958e158e17af0f524bedc484b27fbb93 ]
On ASUS TUF A16 it is reported that the ITE5570 ACPI device connected to GPIO 7 is causing an interrupt storm. This issue doesn't happen on Windows.
Comparing the GPIO register configuration between Windows and Linux bit 20 has been configured as a pull up on Windows, but not on Linux. Checking GPIO declaration from the firmware it is clear it *should* have been a pull up on Linux as well.
```
GpioInt (Level, ActiveLow, Exclusive, PullUp, 0x0000,
"\\_SB.GPIO", 0x00, ResourceConsumer, ,)
{ // Pin list
0x0007
}
```On Linux amd_gpio_set_config() is currently only used for programming the debounce. Actually the GPIO core calls it with all the arguments that are supported by a GPIO, pinctrl-amd just responds -ENOTSUPP.
To solve this issue expand amd_gpio_set_config() to support the other arguments amd_pinconf_set() supports, namely PIN_CONFIG_BIAS_PULL_DOWN, PIN_CONFIG_BIAS_PULL_UP, and PIN_CONFIG_DRIVE_STRENGTH.
--- drivers/pinctrl/pinctrl-amd.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-)
drivers/pinctrl/pinctrl-amd.c +15 -13
@@ -189,18 +189,6 @@ static int amd_gpio_set_debounce(struct gpio_chip *gc, unsigned offset,return ret; } -static int amd_gpio_set_config (struct gpio_chip *gc,unsigned offset, -unsigned long config) -{ -u32 debounce; - -if (pinconf_to_config_param (config) !=PIN_CONFIG_INPUT_DEBOUNCE ) -return -ENOTSUPP ; - - debounce =pinconf_to_config_argument (config); -return amd_gpio_set_debounce (gc, offset, debounce); -} -#ifdef CONFIG_DEBUG_FS static void amd_gpio_dbg_show (struct seq_file *s,struct gpio_chip *gc) {
@@ -676,7 +664,7 @@ static int amd_pinconf_get(struct pinctrl_dev *pctldev, }static int amd_pinconf_set (struct pinctrl_dev *pctldev,unsigned int pin, -unsigned long *configs,unsigned num_configs) +unsigned long *configs,unsigned int num_configs) {int i;u32 arg;
@@ -766,6 +754,20 @@ static int amd_pinconf_group_set(struct pinctrl_dev *pctldev,return 0 ; } +static int amd_gpio_set_config (struct gpio_chip *gc,unsigned int pin, +unsigned long config) +{ +struct amd_gpio *gpio_dev =gpiochip_get_data (gc); + +if (pinconf_to_config_param (config) ==PIN_CONFIG_INPUT_DEBOUNCE ) { +u32 debounce =pinconf_to_config_argument (config); + +return amd_gpio_set_debounce (gc, pin, debounce); + } + +return amd_pinconf_set (gpio_dev->pctrl, pin, &config,1 ); +} +static const struct pinconf_ops amd_pinconf_ops = { .pin_config_get = amd_pinconf_get, .pin_config_set = amd_pinconf_set,
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 476/509 net: ethernet: ti: cpsw_ale: Fix cpsw_ale_get_field()/cpsw_ale_set_field()
In reply to Greg Kroah-HartmanFrom: Tanmay Patil <[email protected]>
[ Upstream commit b685f1a58956fa36cc01123f253351b25bfacfda ]
CPSW ALE has 75 bit ALE entries which are stored within three 32 bit words. The cpsw_ale_get_field() and cpsw_ale_set_field() functions assume that the field will be strictly contained within one word. However, this is not guaranteed to be the case and it is possible for ALE field entries to span across up to two words at the most.
Fix the methods to handle getting/setting fields spanning up to two words.
--- drivers/net/ethernet/ti/cpsw_ale.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-)
drivers/net/ethernet/ti/cpsw_ale.c +19 -5
@@ -104,23 +104,37 @@ struct cpsw_ale_dev_id {static inline int cpsw_ale_get_field (u32 *ale_entry,u32 start,u32 bits) { -int idx; +int idx, idx2; +u32 hi_val =0 ; idx = start /32 ; + idx2 = (start + bits -1 ) /32 ; +/* Check if bits to be fetched exceed a word */ +if (idx != idx2) { + idx2 =2 - idx2;/* flip */ + hi_val = ale_entry[idx2] << ((idx2 *32 ) - start); + } start -= idx *32 ; idx =2 - idx;/* flip */ -return (ale_entry[idx] >> start) &BITMASK (bits); +return (hi_val + (ale_entry[idx] >> start)) &BITMASK (bits); }static inline void cpsw_ale_set_field (u32 *ale_entry,u32 start,u32 bits,u32 value) { -int idx; +int idx, idx2; value &=BITMASK (bits); - idx = start /32 ; + idx = start /32 ; + idx2 = (start + bits -1 ) /32 ; +/* Check if bits to be set exceed a word */ +if (idx != idx2) { + idx2 =2 - idx2;/* flip */ + ale_entry[idx2] &= ~(BITMASK (bits + start - (idx2 *32 ))); + ale_entry[idx2] |= (value >> ((idx2 *32 ) - start)); + } start -= idx *32 ; - idx =2 - idx;/* flip */ + idx =2 - idx;/* flip */ ale_entry[idx] &= ~(BITMASK (bits) << start); ale_entry[idx] |= (value << start); }
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 477/509 bridge: Add extack warning when enabling STP in netns.
In reply to Greg Kroah-HartmanFrom: Kuniyuki Iwashima <[email protected]>
[ Upstream commit 56a16035bb6effb37177867cea94c13a8382f745 ]
When we create an L2 loop on a bridge in netns, we will see packets storm even if STP is enabled.
# unshare -n
# ip link add br0 type bridge
# ip link add veth0 type veth peer name veth1
# ip link set veth0 master br0 up
# ip link set veth1 master br0 up
# ip link set br0 type bridge stp_state 1
# ip link set br0 up
# sleep 30
# ip -s link show br0
2: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether b6:61:98:1c:1c:b5 brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped missed mcast
956553768 12861249 0 0 0 12861249 <-. Keep
TX: bytes packets errors dropped carrier collsns | increasing
1027834 11951 0 0 0 0 <-' rapidlyThis is because llc_rcv() drops all packets in non-root netns and BPDU is dropped.
Let's add extack warning when enabling STP in netns.
# unshare -n # ip link add br0 type bridge # ip link set br0 type bridge stp_state 1 Warning: bridge: STP does not work in non-root netns.
Note this commit will be reverted later when we namespacify the whole LLC infra.
--- net/bridge/br_stp_if.c | 3 +++ 1 file changed, 3 insertions(+)
net/bridge/br_stp_if.c +3 -0
@@ -201,6 +201,9 @@ int br_stp_set_enabled(struct net_bridge *br, unsigned long val, {ASSERT_RTNL (); +if (!net_eq (dev_net (br->dev), &init_net)) +NL_SET_ERR_MSG_MOD (extack,"STP does not work in non-root netns" ); +if (br_mrp_enabled (br)) {NL_SET_ERR_MSG_MOD (extack,"STP can't be enabled if MRP is already enabled" );
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 478/509 iavf: Fix use-after-free in free_netdev
In reply to Greg Kroah-HartmanFrom: Ding Hui <[email protected]>
[ Upstream commit 5f4fa1672d98fe99d2297b03add35346f1685d6b ]
We do netif_napi_add() for all allocated q_vectors[], but potentially do netif_napi_del() for part of them, then kfree q_vectors and leave invalid pointers at dev->napi_list.
Reproducer:
[root@host ~]# cat repro.sh
#!/bin/bash
pf_dbsf="0000:41:00.0"
vf0_dbsf="0000:41:02.0"
g_pids=()
function do_set_numvf()
{
echo 2 >/sys/bus/pci/devices/${pf_dbsf}/sriov_numvfs
sleep $((RANDOM%3+1))
echo 0 >/sys/bus/pci/devices/${pf_dbsf}/sriov_numvfs
sleep $((RANDOM%3+1))
}
function do_set_channel()
{
local nic=$(ls -1 --indicator-style=none /sys/bus/pci/devices/${vf0_dbsf}/net/)
[ -z "$nic" ] && { sleep $((RANDOM%3)) ; return 1; }
ifconfig $nic 192.168.18.5 netmask 255.255.255.0
ifconfig $nic up
ethtool -L $nic combined 1
ethtool -L $nic combined 4
sleep $((RANDOM%3))
}
function on_exit()
{
local pid
for pid in "${g_pids[@]}"; do
kill -0 "$pid" &>/dev/null && kill "$pid" &>/dev/null
done
g_pids=()
} trap "on_exit; exit" EXIT
while :; do do_set_numvf ; done &
g_pids+=($!)
while :; do do_set_channel ; done &
g_pids+=($!)
wait
Result:
[ 4093.900222] ==================================================================
[ 4093.900230] BUG: KASAN: use-after-free in free_netdev+0x308/0x390
[ 4093.900232] Read of size 8 at addr ffff88b4dc145640 by task repro.sh/6699
[ 4093.900233]
[ 4093.900236] CPU: 10 PID: 6699 Comm: repro.sh Kdump: loaded Tainted: G O --------- -t - 4.18.0 #1
[ 4093.900238] Hardware name: Powerleader PR2008AL/H12DSi-N6, BIOS 2.0 04/09/2021
[ 4093.900239] Call Trace:
[ 4093.900244] dump_stack+0x71/0xab
[ 4093.900249] print_address_description+0x6b/0x290
[ 4093.900251] ? free_netdev+0x308/0x390
[ 4093.900252] kasan_report+0x14a/0x2b0
[ 4093.900254] free_netdev+0x308/0x390
[ 4093.900261] iavf_remove+0x825/0xd20 [iavf]
[ 4093.900265] pci_device_remove+0xa8/0x1f0
[ 4093.900268] device_release_driver_internal+0x1c6/0x460
[ 4093.900271] pci_stop_bus_device+0x101/0x150
[ 4093.900273] pci_stop_and_remove_bus_device+0xe/0x20
[ 4093.900275] pci_iov_remove_virtfn+0x187/0x420
[ 4093.900277] ? pci_iov_add_virtfn+0xe10/0xe10
[ 4093.900278] ? pci_get_subsys+0x90/0x90
[ 4093.900280] sriov_disable+0xed/0x3e0
[ 4093.900282] ? bus_find_device+0x12d/0x1a0
[ 4093.900290] i40e_free_vfs+0x754/0x1210 [i40e]
[ 4093.900298] ? i40e_reset_all_vfs+0x880/0x880 [i40e]
[ 4093.900299] ? pci_get_device+0x7c/0x90
[ 4093.900300] ? pci_get_subsys+0x90/0x90
[ 4093.900306] ? pci_vfs_assigned.part.7+0x144/0x210
[ 4093.900309] ? __mutex_lock_slowpath+0x10/0x10
[ 4093.900315] i40e_pci_sriov_configure+0x1fa/0x2e0 [i40e]
[ 4093.900318] sriov_numvfs_store+0x214/0x290
[ 4093.900320] ? sriov_totalvfs_show+0x30/0x30
[ 4093.900321] ? __mutex_lock_slowpath+0x10/0x10
[ 4093.900323] ? __check_object_size+0x15a/0x350
[ 4093.900326] kernfs_fop_write+0x280/0x3f0
[ 4093.900329] vfs_write+0x145/0x440
[ 4093.900330] ksys_write+0xab/0x160
[ 4093.900332] ? __ia32_sys_read+0xb0/0xb0
[ 4093.900334] ? fput_many+0x1a/0x120
[ 4093.900335] ? filp_close+0xf0/0x130
[ 4093.900338] do_syscall_64+0xa0/0x370
[ 4093.900339] ? page_fault+0x8/0x30
[ 4093.900341] entry_SYSCALL_64_after_hwframe+0x65/0xca
[ 4093.900357] RIP: 0033:0x7f16ad4d22c0
[ 4093.900359] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24
[ 4093.900360] RSP: 002b:00007ffd6491b7f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[ 4093.900362] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f16ad4d22c0
[ 4093.900363] RDX: 0000000000000002 RSI: 0000000001a41408 RDI: 0000000000000001
[ 4093.900364] RBP: 0000000001a41408 R08: 00007f16ad7a1780 R09: 00007f16ae1f2700
[ 4093.900364] R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000002
[ 4093.900365] R13: 0000000000000001 R14: 00007f16ad7a0620 R15: 0000000000000001
[ 4093.900367]
[ 4093.900368] Allocated by task 820:
[ 4093.900371] kasan_kmalloc+0xa6/0xd0
[ 4093.900373] __kmalloc+0xfb/0x200
[ 4093.900376] iavf_init_interrupt_scheme+0x63b/0x1320 [iavf]
[ 4093.900380] iavf_watchdog_task+0x3d51/0x52c0 [iavf]
[ 4093.900382] process_one_work+0x56a/0x11f0
[ 4093.900383] worker_thread+0x8f/0xf40
[ 4093.900384] kthread+0x2a0/0x390
[ 4093.900385] ret_from_fork+0x1f/0x40
[ 4093.900387] 0xffffffffffffffff
[ 4093.900387]
[ 4093.900388] Freed by task 6699:
[ 4093.900390] __kasan_slab_free+0x137/0x190
[ 4093.900391] kfree+0x8b/0x1b0
[ 4093.900394] iavf_free_q_vectors+0x11d/0x1a0 [iavf]
[ 4093.900397] iavf_remove+0x35a/0xd20 [iavf]
[ 4093.900399] pci_device_remove+0xa8/0x1f0
[ 4093.900400] device_release_driver_internal+0x1c6/0x460
[ 4093.900401] pci_stop_bus_device+0x101/0x150
[ 4093.900402] pci_stop_and_remove_bus_device+0xe/0x20
[ 4093.900403] pci_iov_remove_virtfn+0x187/0x420
[ 4093.900404] sriov_disable+0xed/0x3e0
[ 4093.900409] i40e_free_vfs+0x754/0x1210 [i40e]
[ 4093.900415] i40e_pci_sriov_configure+0x1fa/0x2e0 [i40e]
[ 4093.900416] sriov_numvfs_store+0x214/0x290
[ 4093.900417] kernfs_fop_write+0x280/0x3f0
[ 4093.900418] vfs_write+0x145/0x440
[ 4093.900419] ksys_write+0xab/0x160
[ 4093.900420] do_syscall_64+0xa0/0x370
[ 4093.900421] entry_SYSCALL_64_after_hwframe+0x65/0xca
[ 4093.900422] 0xffffffffffffffff
[ 4093.900422]
[ 4093.900424] The buggy address belongs to the object at ffff88b4dc144200
which belongs to the cache kmalloc-8k of size 8192
[ 4093.900425] The buggy address is located 5184 bytes inside of
8192-byte region [ffff88b4dc144200, ffff88b4dc146200)
[ 4093.900425] The buggy address belongs to the page:
[ 4093.900427] page:ffffea00d3705000 refcount:1 mapcount:0 mapping:ffff88bf04415c80 index:0x0 compound_mapcount: 0
[ 4093.900430] flags: 0x10000000008100(slab|head)
[ 4093.900433] raw: 0010000000008100 dead000000000100 dead000000000200 ffff88bf04415c80
[ 4093.900434] raw: 0000000000000000 0000000000030003 00000001ffffffff 0000000000000000
[ 4093.900434] page dumped because: kasan: bad access detected
[ 4093.900435]
[ 4093.900435] Memory state around the buggy address:
[ 4093.900436] ffff88b4dc145500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[ 4093.900437] ffff88b4dc145580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[ 4093.900438] >ffff88b4dc145600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[ 4093.900438] ^
[ 4093.900439] ffff88b4dc145680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[ 4093.900440] ffff88b4dc145700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[ 4093.900440] ==================================================================Although the patch #2 (of 2) can avoid the issue triggered by this repro.sh, there still are other potential risks that if num_active_queues is changed to less than allocated q_vectors[] by unexpected, the mismatched netif_napi_add/del() can also cause UAF.
Since we actually call netif_napi_add() for all allocated q_vectors unconditionally in iavf_alloc_q_vectors(), so we should fix it by letting netif_napi_del() match to netif_napi_add().
--- drivers/net/ethernet/intel/iavf/iavf_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_main.c +1 -4
@@ -1377,19 +1377,16 @@ static int iavf_alloc_q_vectors(struct iavf_adapter *adapter)static void iavf_free_q_vectors (struct iavf_adapter *adapter) {int q_idx, num_q_vectors; -int napi_vectors;if (!adapter->q_vectors)return ; num_q_vectors = adapter->num_msix_vectors -NONQ_VECS ; - napi_vectors = adapter->num_active_queues;for (q_idx =0 ; q_idx < num_q_vectors; q_idx++) {struct iavf_q_vector *q_vector = &adapter->q_vectors[q_idx]; -if (q_idx < napi_vectors) -netif_napi_del (&q_vector->napi); +netif_napi_del (&q_vector->napi); }kfree (adapter->q_vectors); adapter->q_vectors =NULL ;
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 479/509 iavf: Fix out-of-bounds when setting channels on remove
In reply to Greg Kroah-HartmanFrom: Ding Hui <[email protected]>
[ Upstream commit 7c4bced3caa749ce468b0c5de711c98476b23a52 ]
If we set channels greater during iavf_remove(), and waiting reset done would be timeout, then returned with error but changed num_active_queues directly, that will lead to OOB like the following logs. Because the num_active_queues is greater than tx/rx_rings[] allocated actually.
Reproducer:
[root@host ~]# cat repro.sh
#!/bin/bash
pf_dbsf="0000:41:00.0"
vf0_dbsf="0000:41:02.0"
g_pids=()
function do_set_numvf()
{
echo 2 >/sys/bus/pci/devices/${pf_dbsf}/sriov_numvfs
sleep $((RANDOM%3+1))
echo 0 >/sys/bus/pci/devices/${pf_dbsf}/sriov_numvfs
sleep $((RANDOM%3+1))
}
function do_set_channel()
{
local nic=$(ls -1 --indicator-style=none /sys/bus/pci/devices/${vf0_dbsf}/net/)
[ -z "$nic" ] && { sleep $((RANDOM%3)) ; return 1; }
ifconfig $nic 192.168.18.5 netmask 255.255.255.0
ifconfig $nic up
ethtool -L $nic combined 1
ethtool -L $nic combined 4
sleep $((RANDOM%3))
}
function on_exit()
{
local pid
for pid in "${g_pids[@]}"; do
kill -0 "$pid" &>/dev/null && kill "$pid" &>/dev/null
done
g_pids=()
} trap "on_exit; exit" EXIT
while :; do do_set_numvf ; done &
g_pids+=($!)
while :; do do_set_channel ; done &
g_pids+=($!)
wait
Result:
[ 3506.152887] iavf 0000:41:02.0: Removing device [ 3510.400799] ================================================================== [ 3510.400820] BUG: KASAN: slab-out-of-bounds in iavf_free_all_tx_resources+0x156/0x160 [iavf] [ 3510.400823] Read of size 8 at addr ffff88b6f9311008 by task repro.sh/55536 [ 3510.400823] [ 3510.400830] CPU: 101 PID: 55536 Comm: repro.sh Kdump: loaded Tainted: G O --------- -t - 4.18.0 #1 [ 3510.400832] Hardware name: Powerleader PR2008AL/H12DSi-N6, BIOS 2.0 04/09/2021 [ 3510.400835] Call Trace: [ 3510.400851] dump_stack+0x71/0xab [ 3510.400860] print_address_description+0x6b/0x290 [ 3510.400865] ? iavf_free_all_tx_resources+0x156/0x160 [iavf] [ 3510.400868] kasan_report+0x14a/0x2b0 [ 3510.400873] iavf_free_all_tx_resources+0x156/0x160 [iavf] [ 3510.400880] iavf_remove+0x2b6/0xc70 [iavf] [ 3510.400884] ? iavf_free_all_rx_resources+0x160/0x160 [iavf] [ 3510.400891] ? wait_woken+0x1d0/0x1d0 [ 3510.400895] ? notifier_call_chain+0xc1/0x130 [ 3510.400903] pci_device_remove+0xa8/0x1f0 [ 3510.400910] device_release_driver_internal+0x1c6/0x460 [ 3510.400916] pci_stop_bus_device+0x101/0x150 [ 3510.400919] pci_stop_and_remove_bus_device+0xe/0x20 [ 3510.400924] pci_iov_remove_virtfn+0x187/0x420 [ 3510.400927] ? pci_iov_add_virtfn+0xe10/0xe10 [ 3510.400929] ? pci_get_subsys+0x90/0x90 [ 3510.400932] sriov_disable+0xed/0x3e0 [ 3510.400936] ? bus_find_device+0x12d/0x1a0 [ 3510.400953] i40e_free_vfs+0x754/0x1210 [i40e] [ 3510.400966] ? i40e_reset_all_vfs+0x880/0x880 [i40e] [ 3510.400968] ? pci_get_device+0x7c/0x90 [ 3510.400970] ? pci_get_subsys+0x90/0x90 [ 3510.400982] ? pci_vfs_assigned.part.7+0x144/0x210 [ 3510.400987] ? __mutex_lock_slowpath+0x10/0x10 [ 3510.400996] i40e_pci_sriov_configure+0x1fa/0x2e0 [i40e] [ 3510.401001] sriov_numvfs_store+0x214/0x290 [ 3510.401005] ? sriov_totalvfs_show+0x30/0x30 [ 3510.401007] ? __mutex_lock_slowpath+0x10/0x10 [ 3510.401011] ? __check_object_size+0x15a/0x350 [ 3510.401018] kernfs_fop_write+0x280/0x3f0 [ 3510.401022] vfs_write+0x145/0x440 [ 3510.401025] ksys_write+0xab/0x160 [ 3510.401028] ? __ia32_sys_read+0xb0/0xb0 [ 3510.401031] ? fput_many+0x1a/0x120 [ 3510.401032] ? filp_close+0xf0/0x130 [ 3510.401038] do_syscall_64+0xa0/0x370 [ 3510.401041] ? page_fault+0x8/0x30 [ 3510.401043] entry_SYSCALL_64_after_hwframe+0x65/0xca [ 3510.401073] RIP: 0033:0x7f3a9bb842c0 [ 3510.401079] Code: 73 01 c3 48 8b 0d d8 cb 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 24 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe dd 01 00 48 89 04 24 [ 3510.401080] RSP: 002b:00007ffc05f1fe18 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 3510.401083] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f3a9bb842c0 [ 3510.401085] RDX: 0000000000000002 RSI: 0000000002327408 RDI: 0000000000000001 [ 3510.401086] RBP: 0000000002327408 R08: 00007f3a9be53780 R09: 00007f3a9c8a4700 [ 3510.401086] R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000002 [ 3510.401087] R13: 0000000000000001 R14: 00007f3a9be52620 R15: 0000000000000001 [ 3510.401090] [ 3510.401093] Allocated by task 76795: [ 3510.401098] kasan_kmalloc+0xa6/0xd0 [ 3510.401099] __kmalloc+0xfb/0x200 [ 3510.401104] iavf_init_interrupt_scheme+0x26f/0x1310 [iavf] [ 3510.401108] iavf_watchdog_task+0x1d58/0x4050 [iavf] [ 3510.401114] process_one_work+0x56a/0x11f0 [ 3510.401115] worker_thread+0x8f/0xf40 [ 3510.401117] kthread+0x2a0/0x390 [ 3510.401119] ret_from_fork+0x1f/0x40 [ 3510.401122] 0xffffffffffffffff [ 3510.401123]
In timeout handling, we should keep the original num_active_queues and reset num_req_queues to 0.
--- drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/iavf/iavf_ethtool.c +1 -1
@@ -968,7 +968,7 @@ static int iavf_set_channels(struct net_device *netdev, }if (i ==IAVF_RESET_WAIT_COMPLETE_COUNT ) { adapter->flags &= ~IAVF_FLAG_REINIT_ITR_NEEDED ; - adapter->num_active_queues = num_req; + adapter->num_req_queues =0 ;return -EOPNOTSUPP ; }
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 480/509 security: keys: Modify mismatched function name
In reply to Greg Kroah-HartmanFrom: Jiapeng Chong <[email protected]>
[ Upstream commit 2a4152742025c5f21482e8cebc581702a0fa5b01 ]
No functional modification involved.
security/keys/trusted-keys/trusted_tpm2.c:203: warning: expecting prototype for tpm_buf_append_auth(). Prototype was for tpm2_buf_append_auth() instead.
--- security/keys/trusted-keys/trusted_tpm2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
security/keys/trusted-keys/trusted_tpm2.c +1 -1
@@ -21,7 +21,7 @@ static struct tpm2_hash tpm2_hash_map[] = { };/** -* tpm_buf_append_auth() - append TPMS_AUTH_COMMAND to the buffer. +* tpm2_buf_append_auth() - append TPMS_AUTH_COMMAND to the buffer. * * @buf: an allocated tpm_buf instance * @session_handle: session handle
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 481/509 octeontx2-pf: Dont allocate BPIDs for LBK interfaces
In reply to Greg Kroah-HartmanFrom: Geetha sowjanya <[email protected]>
[ Upstream commit 8fcd7c7b3a38ab5e452f542fda8f7940e77e479a ]
Current driver enables backpressure for LBK interfaces. But these interfaces do not support this feature. Hence, this patch fixes the issue by skipping the backpressure configuration for these interfaces.
--- drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +3 -2
@@ -1311,8 +1311,9 @@ static int otx2_init_hw_resources(struct otx2_nic *pf)if (err) goto err_free_npa_lf; -/* Enable backpressure */ -otx2_nix_config_bp (pf, true); +/* Enable backpressure for CGX mapped PF/VFs */ +if (!is_otx2_lbkvf (pf->pdev)) +otx2_nix_config_bp (pf, true);/* Init Auras and pools used by NIX RQ, for free buffer ptrs */ err =otx2_rq_aura_pool_init (pf);
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 482/509 tcp: annotate data-races around tcp_rsk(req)->ts_recent
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit eba20811f32652bc1a52d5e7cc403859b86390d9 ]
TCP request sockets are lockless, tcp_rsk(req)->ts_recent can change while being read by another cpu as syzbot noticed.
This is harmless, but we should annotate the known races.
Note that tcp_check_req() changes req->ts_recent a bit early, we might change this in the future.
BUG: KCSAN: data-race in tcp_check_req / tcp_check_req
write to 0xffff88813c8afb84 of 4 bytes by interrupt on cpu 1:
tcp_check_req+0x694/0xc70 net/ipv4/tcp_minisocks.c:762 tcp_v4_rcv+0x12db/0x1b70 net/ipv4/tcp_ipv4.c:2071 ip_protocol_deliver_rcu+0x356/0x6d0 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x13c/0x1a0 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:303 [inline] ip_local_deliver+0xec/0x1c0 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:468 [inline] ip_rcv_finish net/ipv4/ip_input.c:449 [inline] NF_HOOK include/linux/netfilter.h:303 [inline] ip_rcv+0x197/0x270 net/ipv4/ip_input.c:569 __netif_receive_skb_one_core net/core/dev.c:5493 [inline] __netif_receive_skb+0x90/0x1b0 net/core/dev.c:5607 process_backlog+0x21f/0x380 net/core/dev.c:5935 __napi_poll+0x60/0x3b0 net/core/dev.c:6498 napi_poll net/core/dev.c:6565 [inline] net_rx_action+0x32b/0x750 net/core/dev.c:6698 __do_softirq+0xc1/0x265 kernel/softirq.c:571 do_softirq+0x7e/0xb0 kernel/softirq.c:472 __local_bh_enable_ip+0x64/0x70 kernel/softirq.c:396 local_bh_enable+0x1f/0x20 include/linux/bottom_half.h:33 rcu_read_unlock_bh include/linux/rcupdate.h:843 [inline] __dev_queue_xmit+0xabb/0x1d10 net/core/dev.c:4271 dev_queue_xmit include/linux/netdevice.h:3088 [inline] neigh_hh_output include/net/neighbour.h:528 [inline] neigh_output include/net/neighbour.h:542 [inline] ip_finish_output2+0x700/0x840 net/ipv4/ip_output.c:229 ip_finish_output+0xf4/0x240 net/ipv4/ip_output.c:317 NF_HOOK_COND include/linux/netfilter.h:292 [inline] ip_output+0xe5/0x1b0 net/ipv4/ip_output.c:431 dst_output include/net/dst.h:458 [inline] ip_local_out net/ipv4/ip_output.c:126 [inline] __ip_queue_xmit+0xa4d/0xa70 net/ipv4/ip_output.c:533 ip_queue_xmit+0x38/0x40 net/ipv4/ip_output.c:547 __tcp_transmit_skb+0x1194/0x16e0 net/ipv4/tcp_output.c:1399 tcp_transmit_skb net/ipv4/tcp_output.c:1417 [inline] tcp_write_xmit+0x13ff/0x2fd0 net/ipv4/tcp_output.c:2693 __tcp_push_pending_frames+0x6a/0x1a0 net/ipv4/tcp_output.c:2877 tcp_push_pending_frames include/net/tcp.h:1952 [inline] __tcp_sock_set_cork net/ipv4/tcp.c:3336 [inline] tcp_sock_set_cork+0xe8/0x100 net/ipv4/tcp.c:3343 rds_tcp_xmit_path_complete+0x3b/0x40 net/rds/tcp_send.c:52 rds_send_xmit+0xf8d/0x1420 net/rds/send.c:422 rds_send_worker+0x42/0x1d0 net/rds/threads.c:200 process_one_work+0x3e6/0x750 kernel/workqueue.c:2408 worker_thread+0x5f2/0xa10 kernel/workqueue.c:2555 kthread+0x1d7/0x210 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
read to 0xffff88813c8afb84 of 4 bytes by interrupt on cpu 0:
tcp_check_req+0x32a/0xc70 net/ipv4/tcp_minisocks.c:622 tcp_v4_rcv+0x12db/0x1b70 net/ipv4/tcp_ipv4.c:2071 ip_protocol_deliver_rcu+0x356/0x6d0 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x13c/0x1a0 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:303 [inline] ip_local_deliver+0xec/0x1c0 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:468 [inline] ip_rcv_finish net/ipv4/ip_input.c:449 [inline] NF_HOOK include/linux/netfilter.h:303 [inline] ip_rcv+0x197/0x270 net/ipv4/ip_input.c:569 __netif_receive_skb_one_core net/core/dev.c:5493 [inline] __netif_receive_skb+0x90/0x1b0 net/core/dev.c:5607 process_backlog+0x21f/0x380 net/core/dev.c:5935 __napi_poll+0x60/0x3b0 net/core/dev.c:6498 napi_poll net/core/dev.c:6565 [inline] net_rx_action+0x32b/0x750 net/core/dev.c:6698 __do_softirq+0xc1/0x265 kernel/softirq.c:571 run_ksoftirqd+0x17/0x20 kernel/softirq.c:939 smpboot_thread_fn+0x30a/0x4a0 kernel/smpboot.c:164 kthread+0x1d7/0x210 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
value changed: 0x1cd237f1 -> 0x1cd237f2
--- net/ipv4/tcp_ipv4.c | 2 +- net/ipv4/tcp_minisocks.c | 9 ++++++--- net/ipv4/tcp_output.c | 2 +- net/ipv6/tcp_ipv6.c | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-)
net/ipv4/tcp_ipv4.c +1 -1
@@ -960,7 +960,7 @@ static void tcp_v4_reqsk_send_ack(const struct sock *sk, struct sk_buff *skb,tcp_rsk (req)->rcv_nxt, req->rsk_rcv_wnd >>inet_rsk (req)->rcv_wscale,tcp_time_stamp_raw () +tcp_rsk (req)->ts_off, - req->ts_recent, +READ_ONCE (req->ts_recent),0 ,tcp_md5_do_lookup (sk, l3index, addr,AF_INET ), inet_rsk(req)->no_srccheck ? IP_REPLY_ARG_NOSRCCHECK : 0,
net/ipv4/tcp_minisocks.c +6 -3
@@ -523,7 +523,7 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, newtp->max_window = newtp->snd_wnd;if (newtp->rx_opt.tstamp_ok) { - newtp->rx_opt.ts_recent = req->ts_recent; + newtp->rx_opt.ts_recent =READ_ONCE (req->ts_recent); newtp->rx_opt.ts_recent_stamp =ktime_get_seconds (); newtp->tcp_header_len =sizeof (struct tcphdr ) +TCPOLEN_TSTAMP_ALIGNED ; }else {
@@ -586,7 +586,7 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,tcp_parse_options (sock_net (sk), skb, &tmp_opt,0 ,NULL );if (tmp_opt.saw_tstamp) { - tmp_opt.ts_recent = req->ts_recent; + tmp_opt.ts_recent =READ_ONCE (req->ts_recent);if (tmp_opt.rcv_tsecr) tmp_opt.rcv_tsecr -=tcp_rsk (req)->ts_off;/* We do not store true stamp, but it is not required,
@@ -726,8 +726,11 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,/* In sequence, PAWS is OK. */ +/* TODO: We probably should defer ts_recent change once +* we take ownership of @req. +*/ if (tmp_opt.saw_tstamp && !after (TCP_SKB_CB (skb)->seq,tcp_rsk (req)->rcv_nxt)) - req->ts_recent = tmp_opt.rcv_tsval; +WRITE_ONCE (req->ts_recent, tmp_opt.rcv_tsval);if (TCP_SKB_CB (skb)->seq ==tcp_rsk (req)->rcv_isn) {/* Truncate SYN, it is out of window starting
net/ipv4/tcp_output.c +1 -1
@@ -874,7 +874,7 @@ static unsigned int tcp_synack_options(const struct sock *sk,if (likely (ireq->tstamp_ok)) { opts->options |=OPTION_TS ; opts->tsval =tcp_skb_timestamp (skb) +tcp_rsk (req)->ts_off; - opts->tsecr = req->ts_recent; + opts->tsecr =READ_ONCE (req->ts_recent); remaining -=TCPOLEN_TSTAMP_ALIGNED ; }if (likely (ireq->sack_ok)) {
net/ipv6/tcp_ipv6.c +1 -1
@@ -1151,7 +1151,7 @@ static void tcp_v6_reqsk_send_ack(const struct sock *sk, struct sk_buff *skb,tcp_rsk (req)->rcv_nxt, req->rsk_rcv_wnd >>inet_rsk (req)->rcv_wscale,tcp_time_stamp_raw () +tcp_rsk (req)->ts_off, - req->ts_recent, sk->sk_bound_dev_if, +READ_ONCE (req->ts_recent), sk->sk_bound_dev_if,tcp_v6_md5_do_lookup (sk, &ipv6_hdr (skb)->saddr, l3index), ipv6_get_dsfield(ipv6_hdr(skb)), 0, sk->sk_priority); }
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 483/509 net: ipv4: Use kfree_sensitive instead of kfree
In reply to Greg Kroah-HartmanFrom: Wang Ming <[email protected]>
[ Upstream commit daa751444fd9d4184270b1479d8af49aaf1a1ee6 ]
key might contain private part of the key, so better use kfree_sensitive to free it.
--- net/ipv4/esp4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/esp4.c +1 -1
@@ -1134,7 +1134,7 @@ static int esp_init_authenc(struct xfrm_state *x) err =crypto_aead_setkey (aead, key, keylen); free_key: -kfree (key); +kfree_sensitive (key); error:return err;
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 484/509 net:ipv6: check return value of pskb_trim()
In reply to Greg Kroah-HartmanFrom: Yuanjun Gong <[email protected]>
[ Upstream commit 4258faa130be4ea43e5e2d839467da421b8ff274 ]
goto tx_err if an unexpected result is returned by pskb_tirm() in ip6erspan_tunnel_xmit().
--- net/ipv6/ip6_gre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/ipv6/ip6_gre.c +2 -1
@@ -955,7 +955,8 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb, goto tx_err;if (skb->len > dev->mtu + dev->hard_header_len) { -pskb_trim (skb, dev->mtu + dev->hard_header_len); +if (pskb_trim (skb, dev->mtu + dev->hard_header_len)) + goto tx_err; truncate = true; }
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 485/509 Revert "tcp: avoid the lookup process failing to get sk in ehash table"
In reply to Greg Kroah-HartmanFrom: Kuniyuki Iwashima <[email protected]>
[ Upstream commit 81b3ade5d2b98ad6e0a473b0e1e420a801275592 ]
This reverts commit 3f4ca5fafc08881d7a57daa20449d171f2887043.
Commit 3f4ca5fafc08 ("tcp: avoid the lookup process failing to get sk in ehash table") reversed the order in how a socket is inserted into ehash to fix an issue that ehash-lookup could fail when reqsk/full sk/twsk are swapped. However, it introduced another lookup failure.
The full socket in ehash is allocated from a slab with SLAB_TYPESAFE_BY_RCU and does not have SOCK_RCU_FREE, so the socket could be reused even while it is being referenced on another CPU doing RCU lookup.
Let's say a socket is reused and inserted into the same hash bucket during lookup. After the blamed commit, a new socket is inserted at the end of the list. If that happens, we will skip sockets placed after the previous position of the reused socket, resulting in ehash lookup failure.
As described in Documentation/RCU/rculist_nulls.rst, we should insert a new socket at the head of the list to avoid such an issue.
This issue, the swap-lookup-failure, and another variant reported in [0] can all be handled properly by adding a locked ehash lookup suggested by Eric Dumazet [1].
However, this issue could occur for every packet, thus more likely than the other two races, so let's revert the change for now.
--- net/ipv4/inet_hashtables.c | 17 ++--------------- net/ipv4/inet_timewait_sock.c | 8 ++++---- 2 files changed, 6 insertions(+), 19 deletions(-)
net/ipv4/inet_hashtables.c +2 -15
@@ -571,20 +571,8 @@ bool inet_ehash_insert(struct sock *sk, struct sock *osk, bool *found_dup_sk)spin_lock (lock);if (osk) {WARN_ON_ONCE (sk->sk_hash != osk->sk_hash); - ret =sk_hashed (osk); -if (ret) { -/* Before deleting the node, we insert a new one to make -* sure that the look-up-sk process would not miss either -* of them and that at least one node would exist in ehash -* table all the time. Otherwise there's a tiny chance -* that lookup process could find nothing in ehash table. -*/ -__sk_nulls_add_node_tail_rcu (sk, list); -sk_nulls_del_node_init_rcu (osk); - } - goto unlock; - } -if (found_dup_sk) { + ret =sk_nulls_del_node_init_rcu (osk); + }else if (found_dup_sk) { *found_dup_sk =inet_ehash_lookup_by_sk (sk, list);if (*found_dup_sk) ret = false;
@@ -593,7 +581,6 @@ bool inet_ehash_insert(struct sock *sk, struct sock *osk, bool *found_dup_sk)if (ret)__sk_nulls_add_node_rcu (sk, list); -unlock:spin_unlock (lock);return ret;
net/ipv4/inet_timewait_sock.c +4 -4
@@ -81,10 +81,10 @@ void inet_twsk_put(struct inet_timewait_sock *tw) }EXPORT_SYMBOL_GPL (inet_twsk_put); -static void inet_twsk_add_node_tail_rcu (struct inet_timewait_sock *tw, -struct hlist_nulls_head *list) +static void inet_twsk_add_node_rcu (struct inet_timewait_sock *tw, +struct hlist_nulls_head *list) { -hlist_nulls_add_tail_rcu (&tw->tw_node, list); +hlist_nulls_add_head_rcu (&tw->tw_node, list); } static void inet_twsk_add_bind_node(struct inet_timewait_sock *tw,
@@ -120,7 +120,7 @@ void inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk,spin_lock (lock); -inet_twsk_add_node_tail_rcu (tw, &ehead->chain); +inet_twsk_add_node_rcu (tw, &ehead->chain);/* Step 3: Remove SK from hash chain */ if (__sk_nulls_del_node_init_rcu (sk))
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 486/509 fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe
In reply to Greg Kroah-HartmanFrom: Zhang Shurong <[email protected]>
[ Upstream commit 4e88761f5f8c7869f15a2046b1a1116f4fab4ac8 ]
This func misses checking for platform_get_irq()'s call and may passes the negative error codes to request_irq(), which takes unsigned IRQ #, causing it to fail with -EINVAL, overriding an original error code.
Fix this by stop calling request_irq() with invalid IRQ #s.
--- drivers/video/fbdev/au1200fb.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/video/fbdev/au1200fb.c +3 -0
@@ -1732,6 +1732,9 @@ static int au1200fb_drv_probe(struct platform_device *dev)/* Now hook interrupt too */ irq =platform_get_irq (dev,0 ); +if (irq <0 ) +return irq; + ret =request_irq (irq, au1200fb_handle_irq,IRQF_SHARED ,"lcd" , (void *)dev);if (ret) {
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 487/509 llc: Dont drop packet from non-root netns.
In reply to Greg Kroah-HartmanFrom: Kuniyuki Iwashima <[email protected]>
[ Upstream commit 6631463b6e6673916d2481f692938f393148aa82 ]
Now these upper layer protocol handlers can be called from llc_rcv() as sap->rcv_func(), which is registered by llc_sap_open().
* function which is passed to register_8022_client()
-> no in-kernel user calls register_8022_client().
* snap_rcv()
`- proto->rcvfunc() : registered by register_snap_client()
-> aarp_rcv() and atalk_rcv() drop packets from non-root netns * stp_pdu_rcv()
`- garp_protos[]->rcv() : registered by stp_proto_register()
-> garp_pdu_rcv() and br_stp_rcv() are netns-awareSo, we can safely remove the netns restriction in llc_rcv().
--- net/llc/llc_input.c | 3 --- 1 file changed, 3 deletions(-)
net/llc/llc_input.c +0 -3
@@ -163,9 +163,6 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev,void (*sta_handler)(struct sk_buff *skb);void (*sap_handler)(struct llc_sap *sap,struct sk_buff *skb); -if (!net_eq (dev_net (dev), &init_net)) - goto drop; -/* * When the interface is in promisc. mode, drop all the crap that it * receives, do not try to analyse it.
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 488/509 netfilter: nf_tables: fix spurious set element insertion failure
In reply to Greg Kroah-HartmanFrom: Florian Westphal <[email protected]>
[ Upstream commit ddbd8be68941985f166f5107109a90ce13147c44 ]
On some platforms there is a padding hole in the nft_verdict structure, between the verdict code and the chain pointer.
On element insertion, if the new element clashes with an existing one and NLM_F_EXCL flag isn't set, we want to ignore the -EEXIST error as long as the data associated with duplicated element is the same as the existing one. The data equality check uses memcmp.
For normal data (NFT_DATA_VALUE) this works fine, but for NFT_DATA_VERDICT padding area leads to spurious failure even if the verdict data is the same.
This then makes the insertion fail with 'already exists' error, even though the new "key : data" matches an existing entry and userspace told the kernel that it doesn't want to receive an error indication.
--- net/netfilter/nf_tables_api.c | 3 +++ 1 file changed, 3 insertions(+)
net/netfilter/nf_tables_api.c +3 -0
@@ -8914,6 +8914,9 @@ static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data,if (!tb[NFTA_VERDICT_CODE ])return -EINVAL ; + +/* zero padding hole for memcmp */ +memset (data,0 ,sizeof (*data)); data->verdict.code =ntohl (nla_get_be32 (tb[NFTA_VERDICT_CODE ]));switch (data->verdict.code) {
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 489/509 netfilter: nf_tables: cant schedule in nft_chain_validate
In reply to Greg Kroah-HartmanFrom: Florian Westphal <[email protected]>
[ Upstream commit 314c82841602a111c04a7210c21dc77e0d560242 ]
Can be called via nft set element list iteration, which may acquire rcu and/or bh read lock (depends on set type).
BUG: sleeping function called from invalid context at net/netfilter/nf_tables_api.c:3353
in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 1232, name: nftpreempt_count: 0, expected: 0
RCU nest depth: 1, expected: 0
2 locks held by nft/1232:
#0: ffff8881180e3ea8 (&nft_net->commit_mutex){+.+.}-{3:3}, at: nf_tables_valid_genid #1: ffffffff83f5f540 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire
Call Trace: nft_chain_validate nft_lookup_validate_setelem nft_pipapo_walk nft_lookup_validate nft_chain_validate nft_immediate_validate nft_chain_validate nf_tables_validate nf_tables_abort
No choice but to move it to nf_tables_validate().
--- net/netfilter/nf_tables_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/netfilter/nf_tables_api.c +2 -2
@@ -3276,8 +3276,6 @@ int nft_chain_validate(const struct nft_ctx *ctx, const struct nft_chain *chain)if (err <0 )return err; } - -cond_resched (); }return 0 ;
@@ -3301,6 +3299,8 @@ static int nft_table_validate(struct net *net, const struct nft_table *table) err =nft_chain_validate (&ctx, chain);if (err <0 )return err; + +cond_resched (); }return 0 ;
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 490/509 netfilter: nft_set_pipapo: fix improper element removal
In reply to Greg Kroah-HartmanFrom: Florian Westphal <[email protected]>
[ Upstream commit 87b5a5c209405cb6b57424cdfa226a6dbd349232 ]
end key should be equal to start unless NFT_SET_EXT_KEY_END is present.
Its possible to add elements that only have a start key ("{ 1.0.0.0 . 2.0.0.0 }") without an internval end.
Insertion treats this via:
if (nft_set_ext_exists(ext, NFT_SET_EXT_KEY_END))
end = (const u8 *)nft_set_ext_key_end(ext)->data;
else
end = start;
but removal side always uses nft_set_ext_key_end().
This is wrong and leads to garbage remaining in the set after removal next lookup/insert attempt will give:
BUG: KASAN: slab-use-after-free in pipapo_get+0x8eb/0xb90 Read of size 1 at addr ffff888100d50586 by task nft-pipapo_uaf_/1399 Call Trace: kasan_report+0x105/0x140 pipapo_get+0x8eb/0xb90 nft_pipapo_insert+0x1dc/0x1710 nf_tables_newsetelem+0x31f5/0x4e00 ..
--- net/netfilter/nft_set_pipapo.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
net/netfilter/nft_set_pipapo.c +5 -1
@@ -1904,7 +1904,11 @@ static void nft_pipapo_remove(const struct net *net, const struct nft_set *set,int i, start, rules_fx; match_start = data; - match_end = (const u8 *)nft_set_ext_key_end (&e->ext)->data; + +if (nft_set_ext_exists (&e->ext,NFT_SET_EXT_KEY_END )) + match_end = (const u8 *)nft_set_ext_key_end (&e->ext)->data; +else + match_end = data; start = first_rule; rules_fx = rules_f0;
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 491/509 netfilter: nf_tables: skip bound chain in netns release path
In reply to Greg Kroah-HartmanFrom: Pablo Neira Ayuso <[email protected]>
[ Upstream commit 751d460ccff3137212f47d876221534bf0490996 ]
Skip bound chain from netns release path, the rule that owns this chain releases these objects.
--- net/netfilter/nf_tables_api.c | 3 +++ 1 file changed, 3 insertions(+)
net/netfilter/nf_tables_api.c +3 -0
@@ -9185,6 +9185,9 @@ static void __nft_release_table(struct net *net, struct nft_table *table) ctx.family = table->family; ctx.table = table;list_for_each_entry (chain, &table->chains, list) { +if (nft_chain_is_bound (chain)) +continue ; + ctx.chain = chain;list_for_each_entry_safe (rule, nr, &chain->rules, list) {list_del (&rule->list);
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 492/509 netfilter: nf_tables: skip bound chain on rule flush
In reply to Greg Kroah-HartmanFrom: Pablo Neira Ayuso <[email protected]>
[ Upstream commit 6eaf41e87a223ae6f8e7a28d6e78384ad7e407f8 ]
Skip bound chain when flushing table rules, the rule that owns this chain releases these objects.
Otherwise, the following warning is triggered:
WARNING: CPU: 2 PID: 1217 at net/netfilter/nf_tables_api.c:2013 nf_tables_chain_destroy+0x1f7/0x210 [nf_tables] CPU: 2 PID: 1217 Comm: chain-flush Not tainted 6.1.39 #1 RIP: 0010:nf_tables_chain_destroy+0x1f7/0x210 [nf_tables]
--- net/netfilter/nf_tables_api.c | 2 ++ 1 file changed, 2 insertions(+)
net/netfilter/nf_tables_api.c +2 -0
@@ -3611,6 +3611,8 @@ static int nf_tables_delrule(struct net *net, struct sock *nlsk,list_for_each_entry (chain, &table->chains, list) {if (!nft_is_active_next (net, chain))continue ; +if (nft_chain_is_bound (chain)) +continue ; ctx.chain = chain; err =nft_delrule_by_chain (&ctx);
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 493/509 tcp: annotate data-races around tp->tcp_tx_delay
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit 348b81b68b13ebd489a3e6a46aa1c384c731c919 ]
do_tcp_getsockopt() reads tp->tcp_tx_delay while another cpu might change its value.
--- net/ipv4/tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/ipv4/tcp.c +2 -2
@@ -3447,7 +3447,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level, int optname,case TCP_TX_DELAY :if (val)tcp_enable_tx_delay (); - tp->tcp_tx_delay = val; +WRITE_ONCE (tp->tcp_tx_delay, val);break ;default : err = -ENOPROTOOPT ;
@@ -3902,7 +3902,7 @@ static int do_tcp_getsockopt(struct sock *sk, int level,break ;case TCP_TX_DELAY : - val = tp->tcp_tx_delay; + val =READ_ONCE (tp->tcp_tx_delay);break ;case TCP_TIMESTAMP :
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 494/509 tcp: annotate data-races around tp->keepalive_time
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit 4164245c76ff906c9086758e1c3f87082a7f5ef5 ]
do_tcp_getsockopt() reads tp->keepalive_time while another cpu might change its value.
--- include/net/tcp.h | 7 +++++-- net/ipv4/tcp.c | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-)
include/net/tcp.h +5 -2
@@ -1459,9 +1459,12 @@ static inline int keepalive_intvl_when(const struct tcp_sock *tp)static inline int keepalive_time_when (const struct tcp_sock *tp) {struct net *net =sock_net ((struct sock *)tp); +int val; -return tp->keepalive_time ? : -READ_ONCE (net->ipv4.sysctl_tcp_keepalive_time); +/* Paired with WRITE_ONCE() in tcp_sock_set_keepidle_locked() */ + val =READ_ONCE (tp->keepalive_time); + +return val ? :READ_ONCE (net->ipv4.sysctl_tcp_keepalive_time); }static inline int keepalive_probes (const struct tcp_sock *tp)
net/ipv4/tcp.c +2 -1
@@ -3093,7 +3093,8 @@ int tcp_sock_set_keepidle_locked(struct sock *sk, int val)if (val <1 || val >MAX_TCP_KEEPIDLE )return -EINVAL ; - tp->keepalive_time = val *HZ ; +/* Paired with WRITE_ONCE() in keepalive_time_when() */ +WRITE_ONCE (tp->keepalive_time, val *HZ );if (sock_flag (sk,SOCK_KEEPOPEN ) && !((1 << sk->sk_state) & (TCPF_CLOSE |TCPF_LISTEN ))) {u32 elapsed =keepalive_time_elapsed (tp);
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 495/509 tcp: annotate data-races around tp->keepalive_intvl
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit 5ecf9d4f52ff2f1d4d44c9b68bc75688e82f13b4 ]
do_tcp_getsockopt() reads tp->keepalive_intvl while another cpu might change its value.
--- include/net/tcp.h | 9 +++++++-- net/ipv4/tcp.c | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-)
include/net/tcp.h +7 -2
@@ -1451,9 +1451,14 @@ void tcp_leave_memory_pressure(struct sock *sk);static inline int keepalive_intvl_when (const struct tcp_sock *tp) {struct net *net =sock_net ((struct sock *)tp); +int val; + +/* Paired with WRITE_ONCE() in tcp_sock_set_keepintvl() +* and do_tcp_setsockopt(). +*/ + val =READ_ONCE (tp->keepalive_intvl); -return tp->keepalive_intvl ? : -READ_ONCE (net->ipv4.sysctl_tcp_keepalive_intvl); +return val ? :READ_ONCE (net->ipv4.sysctl_tcp_keepalive_intvl); }static inline int keepalive_time_when (const struct tcp_sock *tp)
net/ipv4/tcp.c +2 -2
@@ -3126,7 +3126,7 @@ int tcp_sock_set_keepintvl(struct sock *sk, int val)return -EINVAL ;lock_sock (sk); -tcp_sk (sk)->keepalive_intvl = val *HZ ; +WRITE_ONCE (tcp_sk (sk)->keepalive_intvl, val *HZ );release_sock (sk);return 0 ; }
@@ -3324,7 +3324,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level, int optname,if (val <1 || val >MAX_TCP_KEEPINTVL ) err = -EINVAL ;else - tp->keepalive_intvl = val *HZ ; +WRITE_ONCE (tp->keepalive_intvl, val *HZ );break ;case TCP_KEEPCNT :if (val <1 || val >MAX_TCP_KEEPCNT )
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 496/509 tcp: annotate data-races around tp->keepalive_probes
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit 6e5e1de616bf5f3df1769abc9292191dfad9110a ]
do_tcp_getsockopt() reads tp->keepalive_probes while another cpu might change its value.
--- include/net/tcp.h | 9 +++++++-- net/ipv4/tcp.c | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-)
include/net/tcp.h +7 -2
@@ -1475,9 +1475,14 @@ static inline int keepalive_time_when(const struct tcp_sock *tp)static inline int keepalive_probes (const struct tcp_sock *tp) {struct net *net =sock_net ((struct sock *)tp); +int val; + +/* Paired with WRITE_ONCE() in tcp_sock_set_keepcnt() +* and do_tcp_setsockopt(). +*/ + val =READ_ONCE (tp->keepalive_probes); -return tp->keepalive_probes ? : -READ_ONCE (net->ipv4.sysctl_tcp_keepalive_probes); +return val ? :READ_ONCE (net->ipv4.sysctl_tcp_keepalive_probes); }static inline u32 keepalive_time_elapsed (const struct tcp_sock *tp)
net/ipv4/tcp.c +3 -2
@@ -3138,7 +3138,8 @@ int tcp_sock_set_keepcnt(struct sock *sk, int val)return -EINVAL ;lock_sock (sk); -tcp_sk (sk)->keepalive_probes = val; +/* Paired with READ_ONCE() in keepalive_probes() */ +WRITE_ONCE (tcp_sk (sk)->keepalive_probes, val);release_sock (sk);return 0 ; }
@@ -3330,7 +3331,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level, int optname,if (val <1 || val >MAX_TCP_KEEPCNT ) err = -EINVAL ;else - tp->keepalive_probes = val; +WRITE_ONCE (tp->keepalive_probes, val);break ;case TCP_SYNCNT :if (val <1 || val >MAX_TCP_SYNCNT )
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 497/509 net: Introduce net.ipv4.tcp_migrate_req.
In reply to Greg Kroah-HartmanFrom: Kuniyuki Iwashima <[email protected]>
[ Upstream commit f9ac779f881c2ec3d1cdcd7fa9d4f9442bf60e80 ]
This commit adds a new sysctl option: net.ipv4.tcp_migrate_req. If this option is enabled or eBPF program is attached, we will be able to migrate child sockets from a listener to another in the same reuseport group after close() or shutdown() syscalls.
Stable-dep-of: 3a037f0f3c4b ("tcp: annotate data-races around icsk->icsk_syn_retries")
--- Documentation/networking/ip-sysctl.rst | 25 +++++++++++++++++++++++++ include/net/netns/ipv4.h | 1 + net/ipv4/sysctl_net_ipv4.c | 9 +++++++++ 3 files changed, 35 insertions(+)
Documentation/networking/ip-sysctl.rst +25 -0
@@ -713,6 +713,31 @@ tcp_syncookies - INTEGER network connections you can set this knob to 2 to enable unconditionally generation of syncookies. +tcp_migrate_req - BOOLEAN + The incoming connection is tied to a specific listening socket when + the initial SYN packet is received during the three-way handshake. + When a listener is closed, in-flight request sockets during the + handshake and established sockets in the accept queue are aborted. + + If the listener has SO_REUSEPORT enabled, other listeners on the + same port should have been able to accept such connections. This + option makes it possible to migrate such child sockets to another + listener after close() or shutdown(). + + The BPF_SK_REUSEPORT_SELECT_OR_MIGRATE type of eBPF program should + usually be used to define the policy to pick an alive listener. + Otherwise, the kernel will randomly pick an alive listener only if + this option is enabled. + + Note that migration between listeners with different settings may + crash applications. Let's say migration happens from listener A to + B, and only B has TCP_SAVE_SYN enabled. B cannot read SYN data from + the requests migrated from A. To avoid such a situation, cancel + migration by returning SK_DROP in the type of eBPF program, or + disable this option. + + Default: 0 + tcp_fastopen - INTEGER Enable TCP Fast Open (RFC7413) to send and accept data in the opening SYN packet.
include/net/netns/ipv4.h +1 -0
@@ -131,6 +131,7 @@ struct netns_ipv4 {u8 sysctl_tcp_syn_retries;u8 sysctl_tcp_synack_retries;u8 sysctl_tcp_syncookies; +u8 sysctl_tcp_migrate_req;int sysctl_tcp_reordering;u8 sysctl_tcp_retries1;u8 sysctl_tcp_retries2;
net/ipv4/sysctl_net_ipv4.c +9 -0
@@ -878,6 +878,15 @@ static struct ctl_table ipv4_net_table[] = { .proc_handler = proc_dou8vec_minmax, },#endif + { + .procname = "tcp_migrate_req", + .data = &init_net.ipv4.sysctl_tcp_migrate_req, + .maxlen = sizeof(u8), + .mode = 0644, + .proc_handler = proc_dou8vec_minmax, + .extra1 = SYSCTL_ZERO, + .extra2 =SYSCTL_ONE + }, { .procname = "tcp_reordering", .data = &init_net.ipv4.sysctl_tcp_reordering,
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 498/509 tcp: Fix data-races around sysctl_tcp_syn(ack)?_retries.
In reply to Greg Kroah-HartmanFrom: Kuniyuki Iwashima <[email protected]>
[ Upstream commit 20a3b1c0f603e8c55c3396abd12dfcfb523e4d3c ]
While reading sysctl_tcp_syn(ack)?_retries, they can be changed concurrently. Thus, we need to add READ_ONCE() to their readers.
Stable-dep-of: 3a037f0f3c4b ("tcp: annotate data-races around icsk->icsk_syn_retries")
--- net/ipv4/inet_connection_sock.c | 3 ++- net/ipv4/tcp.c | 3 ++- net/ipv4/tcp_timer.c | 10 +++++++--- 3 files changed, 11 insertions(+), 5 deletions(-)
net/ipv4/inet_connection_sock.c +2 -1
@@ -740,7 +740,8 @@ static void reqsk_timer_handler(struct timer_list *t)if (inet_sk_state_load (sk_listener) !=TCP_LISTEN ) goto drop; - max_syn_ack_retries = icsk->icsk_syn_retries ? : net->ipv4.sysctl_tcp_synack_retries; + max_syn_ack_retries = icsk->icsk_syn_retries ? : +READ_ONCE (net->ipv4.sysctl_tcp_synack_retries);/* Normally all the openreqs are young and become mature * (i.e. converted to established socket) for first timeout. * If synack was not acknowledged for 1 second, it means
net/ipv4/tcp.c +2 -1
@@ -3743,7 +3743,8 @@ static int do_tcp_getsockopt(struct sock *sk, int level, val =keepalive_probes (tp);break ;case TCP_SYNCNT : - val = icsk->icsk_syn_retries ? : net->ipv4.sysctl_tcp_syn_retries; + val = icsk->icsk_syn_retries ? : +READ_ONCE (net->ipv4.sysctl_tcp_syn_retries);break ;case TCP_LINGER2 : val = tp->linger2;
net/ipv4/tcp_timer.c +7 -3
@@ -239,7 +239,8 @@ static int tcp_write_timeout(struct sock *sk)if ((1 << sk->sk_state) & (TCPF_SYN_SENT |TCPF_SYN_RECV )) {if (icsk->icsk_retransmits)__dst_negative_advice (sk); - retry_until = icsk->icsk_syn_retries ? : net->ipv4.sysctl_tcp_syn_retries; + retry_until = icsk->icsk_syn_retries ? : +READ_ONCE (net->ipv4.sysctl_tcp_syn_retries); expired = icsk->icsk_retransmits >= retry_until; }else {if (retransmits_timed_out (sk,READ_ONCE (net->ipv4.sysctl_tcp_retries1),0 )) {
@@ -406,12 +407,15 @@ abort: tcp_write_err(sk);static void tcp_fastopen_synack_timer (struct sock *sk,struct request_sock *req) {struct inet_connection_sock *icsk =inet_csk (sk); -int max_retries = icsk->icsk_syn_retries ? : -sock_net (sk)->ipv4.sysctl_tcp_synack_retries +1 ;/* add one more retry for fastopen */ struct tcp_sock *tp =tcp_sk (sk); +int max_retries; req->rsk_ops->syn_ack_timeout (req); +/* add one more retry for fastopen */ + max_retries = icsk->icsk_syn_retries ? : +READ_ONCE (sock_net (sk)->ipv4.sysctl_tcp_synack_retries) +1 ; +if (req->num_timeout >= max_retries) {tcp_write_err (sk);return ;
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 499/509 tcp: annotate data-races around icsk->icsk_syn_retries
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit 3a037f0f3c4bfe44518f2fbb478aa2f99a9cd8bb ]
do_tcp_getsockopt() and reqsk_timer_handler() read icsk->icsk_syn_retries while another cpu might change its value.
--- net/ipv4/inet_connection_sock.c | 2 +- net/ipv4/tcp.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
net/ipv4/inet_connection_sock.c +1 -1
@@ -740,7 +740,7 @@ static void reqsk_timer_handler(struct timer_list *t)if (inet_sk_state_load (sk_listener) !=TCP_LISTEN ) goto drop; - max_syn_ack_retries = icsk->icsk_syn_retries ? : + max_syn_ack_retries =READ_ONCE (icsk->icsk_syn_retries) ? :READ_ONCE (net->ipv4.sysctl_tcp_synack_retries);/* Normally all the openreqs are young and become mature * (i.e. converted to established socket) for first timeout.
net/ipv4/tcp.c +3 -3
@@ -3072,7 +3072,7 @@ int tcp_sock_set_syncnt(struct sock *sk, int val)return -EINVAL ;lock_sock (sk); -inet_csk (sk)->icsk_syn_retries = val; +WRITE_ONCE (inet_csk (sk)->icsk_syn_retries, val);release_sock (sk);return 0 ; }
@@ -3337,7 +3337,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level, int optname,if (val <1 || val >MAX_TCP_SYNCNT ) err = -EINVAL ;else - icsk->icsk_syn_retries = val; +WRITE_ONCE (icsk->icsk_syn_retries, val);break ;case TCP_SAVE_SYN :
@@ -3743,7 +3743,7 @@ static int do_tcp_getsockopt(struct sock *sk, int level, val =keepalive_probes (tp);break ;case TCP_SYNCNT : - val = icsk->icsk_syn_retries ? : + val =READ_ONCE (icsk->icsk_syn_retries) ? :READ_ONCE (net->ipv4.sysctl_tcp_syn_retries);break ;case TCP_LINGER2 :
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 500/509 tcp: annotate data-races around tp->linger2
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit 9df5335ca974e688389c875546e5819778a80d59 ]
do_tcp_getsockopt() reads tp->linger2 while another cpu might change its value.
--- net/ipv4/tcp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
net/ipv4/tcp.c +4 -4
@@ -3350,11 +3350,11 @@ static int do_tcp_setsockopt(struct sock *sk, int level, int optname,case TCP_LINGER2 :if (val <0 ) - tp->linger2 =-1 ; +WRITE_ONCE (tp->linger2,-1 );else if (val >TCP_FIN_TIMEOUT_MAX /HZ ) - tp->linger2 =TCP_FIN_TIMEOUT_MAX ; +WRITE_ONCE (tp->linger2,TCP_FIN_TIMEOUT_MAX );else - tp->linger2 = val *HZ ; +WRITE_ONCE (tp->linger2, val *HZ );break ;case TCP_DEFER_ACCEPT :
@@ -3747,7 +3747,7 @@ static int do_tcp_getsockopt(struct sock *sk, int level,READ_ONCE (net->ipv4.sysctl_tcp_syn_retries);break ;case TCP_LINGER2 : - val = tp->linger2; + val =READ_ONCE (tp->linger2);if (val >=0 ) val = (val ? :READ_ONCE (net->ipv4.sysctl_tcp_fin_timeout)) /HZ ;break ;
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 501/509 tcp: annotate data-races around rskq_defer_accept
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit ae488c74422fb1dcd807c0201804b3b5e8a322a3 ]
do_tcp_getsockopt() reads rskq_defer_accept while another cpu might change its value.
--- net/ipv4/tcp.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
net/ipv4/tcp.c +6 -5
@@ -3359,9 +3359,9 @@ static int do_tcp_setsockopt(struct sock *sk, int level, int optname,case TCP_DEFER_ACCEPT :/* Translate value in seconds to number of retransmits */ - icsk->icsk_accept_queue.rskq_defer_accept = -secs_to_retrans (val,TCP_TIMEOUT_INIT /HZ , -TCP_RTO_MAX /HZ ); +WRITE_ONCE (icsk->icsk_accept_queue.rskq_defer_accept, +secs_to_retrans (val,TCP_TIMEOUT_INIT /HZ , +TCP_RTO_MAX /HZ ));break ;case TCP_WINDOW_CLAMP :
@@ -3752,8 +3752,9 @@ static int do_tcp_getsockopt(struct sock *sk, int level, val = (val ? :READ_ONCE (net->ipv4.sysctl_tcp_fin_timeout)) /HZ ;break ;case TCP_DEFER_ACCEPT : - val =retrans_to_secs (icsk->icsk_accept_queue.rskq_defer_accept, -TCP_TIMEOUT_INIT /HZ ,TCP_RTO_MAX /HZ ); + val =READ_ONCE (icsk->icsk_accept_queue.rskq_defer_accept); + val =retrans_to_secs (val,TCP_TIMEOUT_INIT /HZ , +TCP_RTO_MAX /HZ );break ;case TCP_WINDOW_CLAMP : val = tp->window_clamp;
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 502/509 tcp: annotate data-races around tp->notsent_lowat
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit 1aeb87bc1440c5447a7fa2d6e3c2cca52cbd206b ]
tp->notsent_lowat can be read locklessly from do_tcp_getsockopt() and tcp_poll().
--- include/net/tcp.h | 6 +++++- net/ipv4/tcp.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-)
include/net/tcp.h +5 -1
@@ -1991,7 +1991,11 @@ void __tcp_v4_send_check(struct sk_buff *skb, __be32 saddr, __be32 daddr);static inline u32 tcp_notsent_lowat (const struct tcp_sock *tp) {struct net *net =sock_net ((struct sock *)tp); -return tp->notsent_lowat ?:READ_ONCE (net->ipv4.sysctl_tcp_notsent_lowat); +u32 val; + + val =READ_ONCE (tp->notsent_lowat); + +return val ?:READ_ONCE (net->ipv4.sysctl_tcp_notsent_lowat); }/* @wake is one when sk_stream_write_space() calls us.
net/ipv4/tcp.c +2 -2
@@ -3437,7 +3437,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level, int optname, err =tcp_repair_set_window (tp, optval, optlen);break ;case TCP_NOTSENT_LOWAT : - tp->notsent_lowat = val; +WRITE_ONCE (tp->notsent_lowat, val); sk->sk_write_space (sk);break ;case TCP_INQ :
@@ -3913,7 +3913,7 @@ static int do_tcp_getsockopt(struct sock *sk, int level, val =tcp_time_stamp_raw () + tp->tsoffset;break ;case TCP_NOTSENT_LOWAT : - val = tp->notsent_lowat; + val =READ_ONCE (tp->notsent_lowat);break ;case TCP_INQ : val = tp->recvmsg_inq;
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 503/509 tcp: annotate data-races around icsk->icsk_user_timeout
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit 26023e91e12c68669db416b97234328a03d8e499 ]
This field can be read locklessly from do_tcp_getsockopt()
--- net/ipv4/tcp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
net/ipv4/tcp.c +3 -3
@@ -3081,7 +3081,7 @@ EXPORT_SYMBOL(tcp_sock_set_syncnt);void tcp_sock_set_user_timeout (struct sock *sk,u32 val) {lock_sock (sk); -inet_csk (sk)->icsk_user_timeout = val; +WRITE_ONCE (inet_csk (sk)->icsk_user_timeout, val);release_sock (sk); }EXPORT_SYMBOL (tcp_sock_set_user_timeout);
@@ -3393,7 +3393,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level, int optname,if (val <0 ) err = -EINVAL ;else - icsk->icsk_user_timeout = val; +WRITE_ONCE (icsk->icsk_user_timeout, val);break ;case TCP_FASTOPEN :
@@ -3890,7 +3890,7 @@ static int do_tcp_getsockopt(struct sock *sk, int level,break ;case TCP_USER_TIMEOUT : - val = icsk->icsk_user_timeout; + val =READ_ONCE (icsk->icsk_user_timeout);break ;case TCP_FASTOPEN :
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 504/509 tcp: annotate data-races around fastopenq.max_qlen
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit 70f360dd7042cb843635ece9d28335a4addff9eb ]
This field can be read locklessly.
--- include/linux/tcp.h | 2 +- net/ipv4/tcp.c | 2 +- net/ipv4/tcp_fastopen.c | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-)
include/linux/tcp.h +1 -1
@@ -473,7 +473,7 @@ static inline void fastopen_queue_tune(struct sock *sk, int backlog)struct request_sock_queue *queue = &inet_csk (sk)->icsk_accept_queue;int somaxconn =READ_ONCE (sock_net (sk)->core.sysctl_somaxconn); - queue->fastopenq.max_qlen = min_t(unsigned int, backlog, somaxconn); + WRITE_ONCE(queue->fastopenq.max_qlen, min_t(unsigned int, backlog, somaxconn)); } static inline void tcp_move_syn(struct tcp_sock *tp,
net/ipv4/tcp.c +1 -1
@@ -3894,7 +3894,7 @@ static int do_tcp_getsockopt(struct sock *sk, int level,break ;case TCP_FASTOPEN : - val = icsk->icsk_accept_queue.fastopenq.max_qlen; + val =READ_ONCE (icsk->icsk_accept_queue.fastopenq.max_qlen);break ;case TCP_FASTOPEN_CONNECT :
net/ipv4/tcp_fastopen.c +4 -2
@@ -312,6 +312,7 @@ static struct sock *tcp_fastopen_create_child(struct sock *sk,static bool tcp_fastopen_queue_check (struct sock *sk) {struct fastopen_queue *fastopenq; +int max_qlen;/* Make sure the listener has enabled fastopen, and we don't * exceed the max # of pending TFO requests allowed before trying
@@ -324,10 +325,11 @@ static bool tcp_fastopen_queue_check(struct sock *sk)* temporarily vs a server not supporting Fast Open at all. */ fastopenq = &inet_csk (sk)->icsk_accept_queue.fastopenq; -if (fastopenq->max_qlen ==0 ) + max_qlen =READ_ONCE (fastopenq->max_qlen); +if (max_qlen ==0 )return false; -if (fastopenq->qlen >= fastopenq->max_qlen) { +if (fastopenq->qlen >= max_qlen) {struct request_sock *req1;spin_lock (&fastopenq->lock); req1 = fastopenq->rskq_rst_head;
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 505/509 net: phy: prevent stale pointer dereference in phy_init()
In reply to Greg Kroah-HartmanFrom: Vladimir Oltean <[email protected]>
[ Upstream commit 1c613beaf877c0c0d755853dc62687e2013e55c4 ]
mdio_bus_init() and phy_driver_register() both have error paths, and if those are ever hit, ethtool will have a stale pointer to the phy_ethtool_phy_ops stub structure, which references memory from a module that failed to load (phylib).
It is probably hard to force an error in this code path even manually, but the error teardown path of phy_init() should be the same as phy_exit(), which is now simply not the case.
--- drivers/net/phy/phy_device.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
drivers/net/phy/phy_device.c +14 -7
@@ -3024,23 +3024,30 @@ static int __init phy_init(void) {int rc; +ethtool_set_ethtool_phy_ops (&phy_ethtool_phy_ops); + rc =mdio_bus_init ();if (rc) -return rc; + goto err_ethtool_phy_ops; -ethtool_set_ethtool_phy_ops (&phy_ethtool_phy_ops);features_init (); rc =phy_driver_register (&genphy_c45_driver,THIS_MODULE );if (rc) - goto err_c45; + goto err_mdio_bus; rc =phy_driver_register (&genphy_driver,THIS_MODULE ); -if (rc) { -phy_driver_unregister (&genphy_c45_driver); +if (rc) + goto err_c45; + +return 0 ; + err_c45: -mdio_bus_exit (); - } +phy_driver_unregister (&genphy_c45_driver); +err_mdio_bus: +mdio_bus_exit (); +err_ethtool_phy_ops: +ethtool_set_ethtool_phy_ops (NULL );return rc; }
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 506/509 tracing/histograms: Return an error if we fail to add histogram to hist_vars list
In reply to Greg Kroah-HartmanFrom: Mohamed Khalfella <[email protected]>
commit 4b8b3905165ef98386a3c06f196c85d21292d029 upstream.
Commit 6018b585e8c6 ("tracing/histograms: Add histograms to hist_vars if they have referenced variables") added a check to fail histogram creation if save_hist_vars() failed to add histogram to hist_vars list. But the commit failed to set ret to failed return code before jumping to unregister histogram, fix it.
--- kernel/trace/trace_events_hist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/trace/trace_events_hist.c +2 -1
@@ -5822,7 +5822,8 @@ static int event_hist_trigger_func(struc goto out_unreg;if (has_hist_vars (hist_data) || hist_data->n_var_refs) { -if (save_hist_vars (hist_data)) + ret =save_hist_vars (hist_data); +if (ret) goto out_unreg; }
Greg Kroah-Hartman
maintainerPATCH 507/509 tracing: Fix memory leak of iter->temp when reading trace_pipe
In reply to Greg Kroah-HartmanFrom: Zheng Yejian <[email protected]>
commit d5a821896360cc8b93a15bd888fabc858c038dc0 upstream.
kmemleak reports:
unreferenced object 0xffff88814d14e200 (size 256):
comm "cat", pid 336, jiffies 4294871818 (age 779.490s)
hex dump (first 32 bytes):
04 00 01 03 00 00 00 00 08 00 00 00 00 00 00 00 ................
0c d8 c8 9b ff ff ff ff 04 5a ca 9b ff ff ff ff .........Z......
backtrace:
[<ffffffff9bdff18f>] __kmalloc+0x4f/0x140
[<ffffffff9bc9238b>] trace_find_next_entry+0xbb/0x1d0
[<ffffffff9bc9caef>] trace_print_lat_context+0xaf/0x4e0
[<ffffffff9bc94490>] print_trace_line+0x3e0/0x950
[<ffffffff9bc95499>] tracing_read_pipe+0x2d9/0x5a0
[<ffffffff9bf03a43>] vfs_read+0x143/0x520
[<ffffffff9bf04c2d>] ksys_read+0xbd/0x160
[<ffffffff9d0f0edf>] do_syscall_64+0x3f/0x90
[<ffffffff9d2000aa>] entry_SYSCALL_64_after_hwframe+0x6e/0xd8when reading file 'trace_pipe', 'iter->temp' is allocated or relocated in trace_find_next_entry() but not freed before 'trace_pipe' is closed.
To fix it, free 'iter->temp' in tracing_release_pipe().
--- kernel/trace/trace.c | 1 + 1 file changed, 1 insertion(+)
kernel/trace/trace.c +1 -0
@@ -6250,6 +6250,7 @@ static int tracing_release_pipe(struct imutex_unlock (&trace_types_lock);free_cpumask_var (iter->started); +kfree (iter->temp);mutex_destroy (&iter->mutex);kfree (iter);
Greg Kroah-Hartman
maintainerPATCH 508/509 ftrace: Store the order of pages allocated in ftrace_page
In reply to Greg Kroah-HartmanFrom: Linus Torvalds <[email protected]>
commit db42523b4f3e83ff86b53cdda219a9767c8b047f upstream.
Instead of saving the size of the records field of the ftrace_page, store the order it uses to allocate the pages, as that is what is needed to know in order to free the pages. This simplifies the code.
--- kernel/trace/ftrace.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-)
kernel/trace/ftrace.c +17 -18
@@ -1091,7 +1091,7 @@ struct ftrace_page {struct ftrace_page *next;struct dyn_ftrace *records;int index; -int size; +int order; };#define ENTRY_SIZE sizeof(struct dyn_ftrace)
@@ -3188,7 +3188,7 @@ static int ftrace_allocate_records(struc ftrace_number_of_groups++; cnt = (PAGE_SIZE << order) /ENTRY_SIZE ; - pg->size = cnt; + pg->order = order;if (cnt > count) cnt = count;
@@ -3201,7 +3201,6 @@ ftrace_allocate_pages(unsigned long num_ {struct ftrace_page *start_pg;struct ftrace_page *pg; -int order;int cnt;if (!num_to_init)
@@ -3237,13 +3236,13 @@ ftrace_allocate_pages(unsigned long num_ free_pages: pg = start_pg;while (pg) { - order =get_count_order (pg->size /ENTRIES_PER_PAGE ); -if (order >=0 ) -free_pages ((unsigned long )pg->records, order); +if (pg->records) { +free_pages ((unsigned long )pg->records, pg->order); + ftrace_number_of_pages -=1 << pg->order; + } start_pg = pg->next;kfree (pg); pg = start_pg; - ftrace_number_of_pages -=1 << order; ftrace_number_of_groups--; }pr_info ("ftrace: FAILED to allocate memory for functions\n" );
@@ -6239,6 +6238,7 @@ static int ftrace_process_locs(struct mo p = start; pg = start_pg;while (p < end) { +unsigned long end_offset; addr =ftrace_call_adjust (*p++);/* * Some architecture linkers will pad between
@@ -6249,7 +6249,8 @@ static int ftrace_process_locs(struct moif (!addr)continue ; -if (pg->index == pg->size) { + end_offset = (pg->index+1 ) *sizeof (pg->records[0 ]); +if (end_offset >PAGE_SIZE << pg->order) {/* We should have allocated enough */ if (WARN_ON (!pg->next))break ;
@@ -6418,7 +6419,6 @@ void ftrace_release_mod(struct module *mstruct ftrace_page **last_pg;struct ftrace_page *tmp_page =NULL ;struct ftrace_page *pg; -int order;mutex_lock (&ftrace_lock);
@@ -6469,12 +6469,12 @@ void ftrace_release_mod(struct module *m/* Needs to be called outside of ftrace_lock */ clear_mod_from_hashes (pg); - order =get_count_order (pg->size /ENTRIES_PER_PAGE ); -if (order >=0 ) -free_pages ((unsigned long )pg->records, order); +if (pg->records) { +free_pages ((unsigned long )pg->records, pg->order); + ftrace_number_of_pages -=1 << pg->order; + } tmp_page = pg->next;kfree (pg); - ftrace_number_of_pages -=1 << order; ftrace_number_of_groups--; } }
@@ -6792,7 +6792,6 @@ void ftrace_free_mem(struct module *mod,struct ftrace_mod_map *mod_map =NULL ;struct ftrace_init_func *func, *func_next;struct list_head clear_hash; -int order;INIT_LIST_HEAD (&clear_hash);
@@ -6830,10 +6829,10 @@ void ftrace_free_mem(struct module *mod, ftrace_update_tot_cnt--;if (!pg->index) { *last_pg = pg->next; - order =get_count_order (pg->size /ENTRIES_PER_PAGE ); -if (order >=0 ) -free_pages ((unsigned long )pg->records, order); - ftrace_number_of_pages -=1 << order; +if (pg->records) { +free_pages ((unsigned long )pg->records, pg->order); + ftrace_number_of_pages -=1 << pg->order; + } ftrace_number_of_groups--;kfree (pg); pg = container_of(last_pg, struct ftrace_page, next);
Greg Kroah-Hartman
maintainerPATCH 509/509 ftrace: Fix possible warning on checking all pages used in ftrace_process_locs()
In reply to Greg Kroah-HartmanFrom: Zheng Yejian <[email protected]>
commit 26efd79c4624294e553aeaa3439c646729bad084 upstream.
As comments in ftrace_process_locs(), there may be NULL pointers in mcount_loc section:
Quoted 4 lines
Some architecture linkers will pad between the different
mcount_locsections of different object files to satisfy alignments. Skip any NULL pointers.
After commit 20e5227e9f55 ("ftrace: allow NULL pointers in mcount_loc"), NULL pointers will be accounted when allocating ftrace pages but skipped before adding into ftrace pages, this may result in some pages not being used. Then after commit 706c81f87f84 ("ftrace: Remove extra helper functions"), warning may occur at:
WARN_ON(pg->next);
To fix it, only warn for case that no pointers skipped but pages not used up, then free those unused pages after releasing ftrace_lock.
--- kernel/trace/ftrace.c | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-)
kernel/trace/ftrace.c +31 -14
@@ -3196,6 +3196,22 @@ static int ftrace_allocate_records(strucreturn cnt; } +static void ftrace_free_pages (struct ftrace_page *pages) +{ +struct ftrace_page *pg = pages; + +while (pg) { +if (pg->records) { +free_pages ((unsigned long )pg->records, pg->order); + ftrace_number_of_pages -=1 << pg->order; + } + pages = pg->next; +kfree (pg); + pg = pages; + ftrace_number_of_groups--; + } +} +static struct ftrace_page *ftrace_allocate_pages (unsigned long num_to_init) {
@@ -3234,17 +3250,7 @@ ftrace_allocate_pages(unsigned long num_return start_pg; free_pages: - pg = start_pg; -while (pg) { -if (pg->records) { -free_pages ((unsigned long )pg->records, pg->order); - ftrace_number_of_pages -=1 << pg->order; - } - start_pg = pg->next; -kfree (pg); - pg = start_pg; - ftrace_number_of_groups--; - } +ftrace_free_pages (start_pg);pr_info ("ftrace: FAILED to allocate memory for functions\n" );return NULL ; }
@@ -6190,9 +6196,11 @@ static int ftrace_process_locs(struct mounsigned long *start, unsigned long *end) { + struct ftrace_page *pg_unuse = NULL;struct ftrace_page *start_pg;struct ftrace_page *pg;struct dyn_ftrace *rec; +unsigned long skipped =0 ;unsigned long count;unsigned long *p;unsigned long addr;
@@ -6246,8 +6254,10 @@ static int ftrace_process_locs(struct mo* object files to satisfy alignments. * Skip any NULL pointers. */ -if (!addr) +if (!addr) { + skipped++;continue ; + } end_offset = (pg->index+1 ) *sizeof (pg->records[0 ]);if (end_offset >PAGE_SIZE << pg->order) {
@@ -6261,8 +6271,10 @@ static int ftrace_process_locs(struct mo rec->ip = addr; } -/* We should have used all pages */ -WARN_ON (pg->next); +if (pg->next) { + pg_unuse = pg->next; + pg->next =NULL ; + }/* Assign the last page to ftrace_pages */ ftrace_pages = pg;
@@ -6284,6 +6296,11 @@ static int ftrace_process_locs(struct mo out:mutex_unlock (&ftrace_lock); +/* We should have used all pages unless we skipped some */ +if (pg_unuse) { +WARN_ON (!skipped); +ftrace_free_pages (pg_unuse); + }return ret; }
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.188 release. There are 509 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 27 Jul 2023 10:44:26 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.188-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
Following commit caused build failures on all the architectures,
Quoted 2 lines
Chao Yu <[email protected]>
ext4: fix to check return value offreeze_bdev()inext4_shutdown()
ext4: fix to check return value of freeze_bdev() in ext4_shutdown() commit c4d13222afd8a64bf11bc7ec68645496ee8b54b9 upstream
make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/2/build ARCH=x86_64 SRCARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- 'HOSTCC=sccache clang' 'CC=sccache clang' LLVM=1 LLVM_IAS=1 /builds/linux/fs/ext4/ioctl.c:634:7: error: incompatible pointer to integer conversion assigning to 'int' from 'struct super_block *' [-Wint-conversion]
ret = freeze_bdev(sb->s_bdev);
^ ~~~~~~~~~~~~~~~~~~~~~~~1 error generated.
make[3]: *** [/builds/linux/scripts/Makefile.build:286: fs/ext4/ioctl.o] Error 1
--
Linaro LKFT
https://lkft.linaro.org
Greg Kroah-Hartman
maintainerQuoted 36 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.188 release. There are 509 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 27 Jul 2023 10:44:26 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.188-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
Following commit caused build failures on all the architectures,
Quoted 2 lines
Chao Yu <[email protected]>
ext4: fix to check return value offreeze_bdev()inext4_shutdown()ext4: fix to check return value of
freeze_bdev()inext4_shutdown()commitc4d13222afd8a64bf11bc7ec68645496ee8b54b9upstreammake --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/2/build ARCH=x86_64 SRCARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- 'HOSTCC=sccache clang' 'CC=sccache clang' LLVM=1 LLVM_IAS=1 /builds/linux/fs/ext4/ioctl.c:634:7: error: incompatible pointer to integer conversion assigning to 'int' from 'struct
super_block*' [-Wint-conversion]
Quoted 6 lines
ret = freeze_bdev(sb->s_bdev); ^ ~~~~~~~~~~~~~~~~~~~~~~~1 error generated.
make[3]: *** [/builds/linux/scripts/Makefile.build:286:fs/ext4/ioctl.o] Error 1
Argh, I saw that warning be added, and forgot to go back and track it down to fix it. I'll go drop the patch now and push out some new -rcs, thanks for that.
greg k-h
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.188 release. There are 509 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 27 Jul 2023 10:44:26 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.188-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v5.10:
11 builds: 11 pass, 0 fail
28 boots: 28 pass, 0 fail
75 tests: 75 pass, 0 failLinux version: 5.10.188-rc1-g4a64f0370103
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Jon
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.188 release. There are 509 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 27 Jul 2023 10:44:26 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.188-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.188 release. There are 509 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 27 Jul 2023 10:44:26 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.188-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Tested on arm64 and x86 for 5.10.188-rc1,
Kernel repo:https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Branch: linux-5.10.y
Version: 5.10.188-rc1
Commit: 4a64f03701033c39271bac1039ff76ef15ae50a3
Compiler: gcc version 7.3.0 (GCC)
arm64:
--------------------------------------------------------------------
Testcase Result Summary:
total: 8978
passed: 8978
failed: 0
timeout: 0
--------------------------------------------------------------------
x86:
--------------------------------------------------------------------
Testcase Result Summary:
total: 8978
passed: 8978
failed: 0
timeout: 0
--------------------------------------------------------------------
Quoted 2,083 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.188 release. There are 509 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 27 Jul 2023 10:44:26 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.188-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:Greg Kroah-Hartman <[email protected]>
Linux 5.10.188-rc1Zheng Yejian <[email protected]>
ftrace: Fix possible warning on checking all pages used inftrace_process_locs()Linus Torvalds <[email protected]>
ftrace: Store the order of pages allocated inftrace_pageZheng Yejian <[email protected]>
tracing: Fix memory leak of iter->temp when reading trace_pipeMohamed Khalfella <[email protected]>
tracing/histograms: Return an error if we fail to add histogram tohist_varslistVladimir Oltean <[email protected]>
net: phy: prevent stale pointer dereference inphy_init()Eric Dumazet <[email protected]>
tcp: annotate data-races around fastopenq.max_qlenEric Dumazet <[email protected]>
tcp: annotate data-races around icsk->icsk_user_timeoutEric Dumazet <[email protected]>
tcp: annotate data-races around tp->notsent_lowatEric Dumazet <[email protected]>
tcp: annotate data-races aroundrskq_defer_acceptEric Dumazet <[email protected]>
tcp: annotate data-races around tp->linger2Eric Dumazet <[email protected]>
tcp: annotate data-races around icsk->icsk_syn_retriesKuniyuki Iwashima <[email protected]>
tcp: Fix data-races around sysctl_tcp_syn(ack)?_retries.Kuniyuki Iwashima <[email protected]>
net: Introduce net.ipv4.tcp_migrate_req.Eric Dumazet <[email protected]>
tcp: annotate data-races around tp->keepalive_probesEric Dumazet <[email protected]>
tcp: annotate data-races around tp->keepalive_intvlEric Dumazet <[email protected]>
tcp: annotate data-races around tp->keepalive_timeEric Dumazet <[email protected]>
tcp: annotate data-races around tp->tcp_tx_delayPablo Neira Ayuso <[email protected]>
netfilter:nf_tables: skip bound chain on rule flushPablo Neira Ayuso <[email protected]>
netfilter:nf_tables: skip bound chain in netns release pathFlorian Westphal <[email protected]>
netfilter:nft_set_pipapo: fix improper element removalFlorian Westphal <[email protected]>
netfilter:nf_tables: can't schedule innft_chain_validateFlorian Westphal <[email protected]>
netfilter:nf_tables: fix spurious set element insertion failureKuniyuki Iwashima <[email protected]>
llc: Don't drop packet from non-root netns.Zhang Shurong <[email protected]>
fbdev: au1200fb: Fix missing IRQ check inau1200fb_drv_probeKuniyuki Iwashima <[email protected]>
Revert "tcp: avoid the lookup process failing to get sk in ehash table"Yuanjun Gong <[email protected]>
net:ipv6: check return value ofpskb_trim()Wang Ming <[email protected]>
net: ipv4: Usekfree_sensitiveinstead of kfreeEric Dumazet <[email protected]>
tcp: annotate data-races around tcp_rsk(req)->ts_recentGeetha sowjanya <[email protected]>
octeontx2-pf: Dont allocate BPIDs for LBK interfacesJiapeng Chong <[email protected]>
security: keys: Modify mismatched function nameDing Hui <[email protected]>
iavf: Fix out-of-bounds when setting channels on removeDing Hui <[email protected]>
iavf: Fix use-after-free infree_netdevKuniyuki Iwashima <[email protected]>
bridge: Add extack warning when enabling STP in netns.Tanmay Patil <[email protected]>
net: ethernet: ti:cpsw_ale: Fix cpsw_ale_get_field()/cpsw_ale_set_field()Mario Limonciello <[email protected]>
pinctrl: amd: Useamd_pinconf_set()for all config optionsMartin Kaiser <[email protected]>
fbdev: imxfb: warn about invalid left/right marginJonas Gorski <[email protected]>
spi: bcm63xx: fix max prepend lengthYing Hsu <[email protected]>
igb: Fixigb_downhung on surprise removalJohannes Berg <[email protected]>
wifi: iwlwifi: mvm: avoid baid size integer overflowGustavo A. R. Silva <[email protected]>
wifi: wext-core: Fix -Wstringop-overflow warning inioctl_standard_iw_point()Petr Oros <[email protected]>
devlink: reportdevlink_port_type_warnsource deviceMartin KaFai Lau <[email protected]>
bpf: Address KCSAN report onbpf_lru_listMaxime Bizon <[email protected]>
wifi: ath11k: fix registration of 6Ghz-only phy without the full channel rangeYicong Yang <[email protected]>
sched/fair: Don't balance task to its current running CPUMark Rutland <[email protected]>
arm64: mm: fix VA-range sanity checkYoungmin Nam <[email protected]>
arm64: set__exception_irq_entrywith__irq_entryas a defaultHans de Goede <[email protected]>
ACPI: video: Add backlight=native DMI quirk for Lenovo ThinkPad X131e (3371 AMD version)Hans de Goede <[email protected]>
ACPI: video: Add backlight=native DMI quirk for Apple iMac11,3Hans de Goede <[email protected]>
ACPI: button: Add lid disable DMI quirk for Nextbook Ares 8ADavid Sterba <[email protected]>
btrfs: add xxhash to fast checksum implementationsThomas Gleixner <[email protected]>
posix-timers: Ensure timer ID search-loop limit is validYu Kuai <[email protected]>
md/raid10: prevent soft lockup while flush writesYu Kuai <[email protected]>
md: fix data corruption for raid456 when reshape restart while grow upZhong Jinghua <[email protected]>
nbd: Add the maximum limit of allocated index innbd_dev_addTetsuo Handa <[email protected]>
debugobjects: Recheckdebug_objects_enabledbefore reportingEric Whitney <[email protected]>
ext4: correct inline offset when handling xattrs in inode bodyMatus Gajdos <[email protected]>
ASoC:fsl_sai: Disable bit clock with transmitterJocelyn Falempe <[email protected]>
drm/client: Fix memory leak indrm_client_modeset_probeJocelyn Falempe <[email protected]>
drm/client: Fix memory leak indrm_client_target_clonedYueHaibing <[email protected]>
can: bcm: Fix UAF inbcm_proc_show()Mark Brown <[email protected]>
regmap: Account for register length in SMBus I/O limitsMark Brown <[email protected]>
regmap: Drop initial version of maximum transfer length fixesMatthieu Baerts <[email protected]>
selftests: tc: add 'ct' action kconfig depMatthieu Baerts <[email protected]>
selftests: tc: set timeout to 15 minutesMiklos Szeredi <[email protected]>
fuse: revalidate: don't invalidate if interruptedFilipe Manana <[email protected]>
btrfs: fix warning when putting transaction with qgroups enabled after abortGeorg Müller <[email protected]>
perf probe: Add test for regression introduced by switch todie_get_decl_file()Petr Pavlu <[email protected]>
keys: Fix linking a duplicate key to a keyring'sassoc_arrayLuka Guzenko <[email protected]>
ALSA: hda/realtek: Enable Mute LED on HP Laptop 15s-eq2xxxKailang Yang <[email protected]>
ALSA: hda/realtek - remove 3k pull low procedureDaniel Vetter <[email protected]>
drm/atomic: Fix potential use-after-free in nonblocking commitsJason Gunthorpe <[email protected]>
RDMA/cma: Ensurerdma_addr_cancel()happens before issuing more requestsPedro Tammela <[email protected]>
net/sched:sch_qfq: reintroduce lmax bound check for MTUManish Rangankar <[email protected]>
scsi: qla2xxx: Remove unusednvme_ls_waitqwait queueShreyas Deodhar <[email protected]>
scsi: qla2xxx: Pointer may be dereferencedBikash Hazarika <[email protected]>
scsi: qla2xxx: Correct the index of arrayNilesh Javali <[email protected]>
scsi: qla2xxx: Check valid rport returned byfc_bsg_to_rport()Bikash Hazarika <[email protected]>
scsi: qla2xxx: Fix potential NULL pointer dereferenceQuinn Tran <[email protected]>
scsi: qla2xxx: Fix buffer overrunNilesh Javali <[email protected]>
scsi: qla2xxx: Array index may go out of boundQuinn Tran <[email protected]>
scsi: qla2xxx: Wait for io return on terminate rportMasami Hiramatsu (Google) <[email protected]>
tracing/probes: Fix not to count error code to total lengthMateusz Stachyra <[email protected]>
tracing: Fix null pointer dereference intracing_err_log_open()Max Filippov <[email protected]>
xtensa: ISS: fix call tosplit_if_specZheng Yejian <[email protected]>
ring-buffer: Fix deadloop issue on readingtrace_pipeKrister Johansen <[email protected]>
net: ena: fix shift-out-of-bounds in exponential backoffFlorent Revest <[email protected]>
samples: ftrace: Save required argument registers in sample trampolinesMohamed Khalfella <[email protected]>
tracing/histograms: Add histograms tohist_varsif they have referenced variablesHeiko Carstens <[email protected]>
s390/decompressor: fix misaligned symbol build errorJiaqing Zhao <[email protected]>
Revert "8250: add support for ASIX devices with a FIFO bug"George Stark <[email protected]>
meson saradc: fix clock divider mask lengthWeitao Wang <[email protected]>
xhci: Show ZHAOXIN xHCI root hub speed correctlyWeitao Wang <[email protected]>
xhci: Fix TRB prefetch issue of ZHAOXIN hostsWeitao Wang <[email protected]>
xhci: Fix resume issue of some ZHAOXIN hostsXiubo Li <[email protected]>
ceph: don't letcheck_capsskip sending responses for revoke msgsChristophe JAILLET <[email protected]>
firmware: stratix10-svc: Fix a potential resource leak insvc_create_memory_pool()Christophe JAILLET <[email protected]>
tty: serial:samsung_tty: Fix a memory leak ins3c24xx_serial_getclk()when iterating clkChristophe JAILLET <[email protected]>
tty: serial:samsung_tty: Fix a memory leak ins3c24xx_serial_getclk()in case of errorDan Carpenter <[email protected]>
serial: atmel: don't enable IRQs prematurelyMario Limonciello <[email protected]>
drm/amd/display: CorrectDMUB_FW_VERSIONmacroBrian Norris <[email protected]>
drm/rockchip: vop: Leave vblank enabled in self-refreshBrian Norris <[email protected]>
drm/atomic: Allow vblank-enabled + self-refresh "disable"Alexander Aring <[email protected]>
fs: dlm: return positive pid value forF_GETLKJason Baron <[email protected]>
md/raid0: add discard support for the 'original' layoutDamien Le Moal <[email protected]>
misc:pci_endpoint_test: Re-init completion for every testDamien Le Moal <[email protected]>
misc:pci_endpoint_test: Free IRQs before removing the deviceDamien Le Moal <[email protected]>
PCI: rockchip: Set address alignment for endpoint modeRick Wertenbroek <[email protected]>
PCI: rockchip: Use u32 variable to access 32-bit registersRick Wertenbroek <[email protected]>
PCI: rockchip: Fix legacy IRQ generation for RK3399 PCIe endpoint coreRick Wertenbroek <[email protected]>
PCI: rockchip: Add poll and timeout to wait for PHY PLLs to be lockedRick Wertenbroek <[email protected]>
PCI: rockchip: Write PCI Device ID to correct registerRick Wertenbroek <[email protected]>
PCI: rockchip: Assert PCI Configuration Enable bit after probeManivannan Sadhasivam <[email protected]>
PCI: qcom: Disable write access to read only registers for IP v2.3.3Robin Murphy <[email protected]>
PCI: Add function 1 DMA alias quirk for Marvell 88SE9235Ondrej Zary <[email protected]>
PCI/PM: Avoid putting EloPOS E2/S2/H2 PCIe Ports in D3coldMartin Kaiser <[email protected]>
hwrng: imx-rngc - fix the timeout for init and self checkSiddh Raman Pant <[email protected]>
jfs:jfs_dmap: Validatedb_l2nbperpagewhile mountingBaokun Li <[email protected]>
ext4: only updatei_reserved_data_blockson successful block allocationChao Yu <[email protected]>
ext4: fix to check return value offreeze_bdev()inext4_shutdown()Kemeng Shi <[email protected]>
ext4: fix wrong unit use inext4_mb_new_blocksKemeng Shi <[email protected]>
ext4: get block from bh inext4_free_blocksfor fast commit replayKemeng Shi <[email protected]>
ext4: fix wrong unit use inext4_mb_clear_bbZhihao Cheng <[email protected]>
ext4: Fix reusing stale buffer heads from last failed mountingHuacai Chen <[email protected]>
MIPS: Loongson: Fixcpu_probe_loongson()againGao Xiang <[email protected]>
erofs: fix compact 4B support for 16k block sizeEkansh Gupta <[email protected]>
misc: fastrpc: Create fastrpc scalar with correct buffer countNaveen N Rao <[email protected]>
powerpc: Fail build if using recordmcount with binutils v2.37Florian Fainelli <[email protected]>
net: bcmgenet: Ensure MDIO unregistration has clocks enabledArseniy Krasnov <[email protected]>
mtd: rawnand: meson: fix unaligned DMA buffers handlingJarkko Sakkinen <[email protected]>
tpm:tpm_vtpm_proxy: fix a race condition in/dev/vtpmxcreationMario Limonciello <[email protected]>
pinctrl: amd: Only use special debounce behavior for GPIO 0Mario Limonciello <[email protected]>
pinctrl: amd: Detect internal GPIO0 debounce handlingMario Limonciello <[email protected]>
pinctrl: amd: Fix mistake in handling clearing pins at startupChao Yu <[email protected]>
f2fs: fix to avoid NULL pointer dereferencef2fs_write_end_io()Ming Lei <[email protected]>
nvme-pci: fix DMA direction of unmapping integrity dataPedro Tammela <[email protected]>
net/sched:sch_qfq: account for stab overhead inqfq_enqueuePedro Tammela <[email protected]>
net/sched:sch_qfq: refactor parsing of netlink parametersPedro Tammela <[email protected]>
net/sched: makepsched_mtu()RTNL-less safeDan Carpenter <[email protected]>
netdevsim: fix uninitialized data innsim_dev_trap_fa_cookie_write()Ido Schimmel <[email protected]>
net/sched: flower: Ensure both minimum and maximum ports are specifiedRandy Dunlap <[email protected]>
wifi: airo: avoid uninitialized warning inairo_get_rate()Chunhai Guo <[email protected]>
erofs: avoid infinite loop inz_erofs_do_read_page()when reading beyond EOFBjörn Töpel <[email protected]>
riscv, bpf: Fix inconsistent JIT image generationPu Lehui <[email protected]>
bpf, riscv: Support riscv jit to providebpf_line_infoJisheng Zhang <[email protected]>
riscv: bpf: Avoid breaking W^XJisheng Zhang <[email protected]>
riscv: bpf: Movebpf_jit_alloc_exec()andbpf_jit_free_exec()to coreFlorian Kauer <[email protected]>
igc: Fix inserting of empty frame for launchtimeFlorian Kauer <[email protected]>
igc: Fix launchtime before start of cycleAndy Shevchenko <[email protected]>
platform/x86: wmi: Break possible infinite loop when parsing GUIDBarnabás Pőcze <[email protected]>
platform/x86: wmi: move variablesBarnabás Pőcze <[email protected]>
platform/x86: wmi: useguid_tandguid_equal()Barnabás Pőcze <[email protected]>
platform/x86: wmi: remove unnecessary argumentZiyang Xuan <[email protected]>
ipv6/addrconf: fix a potential refcount underflow for idevJiasheng Jiang <[email protected]>
NTB:ntb_tool: Add check fordevm_kcallocYang Yingliang <[email protected]>
NTB:ntb_transport: fix possible memory leak whiledevice_register()failsYuan Can <[email protected]>
ntb: intel: Fix error handling inintel_ntb_pci_driver_init()Yuan Can <[email protected]>
NTB: amd: Fix error handling inamd_ntb_pci_driver_init()Yuan Can <[email protected]>
ntb: idt: Fix error handling inidt_pci_driver_init()Eric Dumazet <[email protected]>
udp6: fixudp6_ehashfn()typoKuniyuki Iwashima <[email protected]>
icmp6: Fix null-ptr-deref of ip6_null_entry->rt6i_idev in icmp6_dev().Paolo Abeni <[email protected]>
net: prevent skb corruption on frag list segmentationRafał Miłecki <[email protected]>
net: bgmac: postpone turning IRQs off to avoid SoC hangsNitya Sunkad <[email protected]>
ionic: removeWARN_ONto preventpanic_on_warnJunfeng Guo <[email protected]>
gve: Set default duplex configuration to fullM A Ramdhan <[email protected]>
net/sched:cls_fw: Fix improper refcount update leads to use-after-freeKlaus Kudielka <[email protected]>
net: mvneta: fix txq_map in case of txq_number==1Dan Carpenter <[email protected]>
scsi: qla2xxx: Fix error code inqla2x00_start_sp()Prasad Koya <[email protected]>
igc: set TP bit in 'supported' and 'advertising' fields ofethtool_link_ksettingsVlad Buslov <[email protected]>
net/mlx5e: Check forNOT_READYflag state after lockingZhengchao Shao <[email protected]>
net/mlx5e: fix double free inmlx5e_destroy_flow_tableMuhammad Husaini Zulkifli <[email protected]>
igc: Remove delay during TX ring configurationMarek Vasut <[email protected]>
drm/panel: simple: Add Powertip PH800480T013drm_display_modeflagsFabio Estevam <[email protected]>
drm/panel: simple: Addconnector_typeforinnolux_at043tn24Linus Torvalds <[email protected]>
workqueue: clean up WORK_* constant types, clarify maskingMoritz Fischer <[email protected]>
net: lan743x: Don't sleep in atomic contextJens Axboe <[email protected]>
io_uring: add reschedule point tohandle_tw_list()Andres Freund <[email protected]>
io_uring: Use io_schedule* in cqring waitMichael Schmitz <[email protected]>
block/partition: fix signedness issue for Amiga partitionsPaul E. McKenney <[email protected]>
rcu-tasks: Simplifytrc_read_check_handler()atomic operationsPaul E. McKenney <[email protected]>
rcu-tasks: Mark ->trc_reader_special.b.need_qs data racesPaul E. McKenney <[email protected]>
rcu-tasks: Mark ->trc_reader_nesting data racesSherry Sun <[email protected]>
tty: serial:fsl_lpuart: add earlycon for imx8ulp platformJason A. Donenfeld <[email protected]>
wireguard: netlink: send staged packets when setting initial private keyJason A. Donenfeld <[email protected]>
wireguard: queueing: use saner cpu selection wrappingThadeu Lima de Souza Cascardo <[email protected]>
netfilter:nf_tables: prevent OOB access innft_byteorder_evalThadeu Lima de Souza Cascardo <[email protected]>
netfilter:nf_tables: do not ignore genmask when looking up chain by idFlorent Revest <[email protected]>
netfilter: conntrack: Avoidnf_ct_helper_hashuses after freeFlorian Westphal <[email protected]>
netfilter:nf_tables: fix scheduling-while-atomic splatPablo Neira Ayuso <[email protected]>
netfilter:nf_tables: unbind non-anonymous set if rule construction failsPablo Neira Ayuso <[email protected]>
netfilter:nf_tables: drop map element references from preparation phasePablo Neira Ayuso <[email protected]>
netfilter: nftables: rename set element data activation/deactivation functionsPablo Neira Ayuso <[email protected]>
netfilter:nf_tables: reject unbound chain set before commit phasePablo Neira Ayuso <[email protected]>
netfilter:nf_tables: reject unbound anonymous set before commit phasePablo Neira Ayuso <[email protected]>
netfilter:nf_tables: addNFT_TRANS_PREPARE_ERRORto deal with bound set/chainPablo Neira Ayuso <[email protected]>
netfilter:nf_tables: fix chain binding transaction logicPablo Neira Ayuso <[email protected]>
netfilter:nf_tables: incorrect error path handling withNFT_MSG_NEWRULEFlorian Westphal <[email protected]>
netfilter:nf_tables: add rescheduling points during loop detection walksFlorian Westphal <[email protected]>
netfilter:nf_tables: usenet_genericinfra for transaction dataGeert Uytterhoeven <[email protected]>
sh: pgtable-3level: Fix cast to pointer from integer of different sizeMichael Schmitz <[email protected]>
block: add overflow checks for Amiga partition supportGilad Reti <[email protected]>
selftests/bpf: Add verifier test forPTR_TO_MEMspillLino Sanfilippo <[email protected]>
tpm,tpm_tis: Claim locality in interrupt handlerAmir Goldstein <[email protected]>
fanotify: disallow mount/sb marks on kernel internal pseudo fsJan Kara <[email protected]>
fs: no need to check sourceChristian Marangi <[email protected]>
leds: trigger: netdev: RecheckNETDEV_LED_MODE_LINKUPon dev renameArnd Bergmann <[email protected]>
ARM: orion5x: fix d2net gpio initializationRicardo Ribalda Delgado <[email protected]>
ASoC: mediatek: mt8173: Fixsnd_soc_component_initializeerror pathRicardo Ribalda Delgado <[email protected]>
ASoC: mediatek: mt8173: Fix irq error pathFilipe Manana <[email protected]>
btrfs: fix race when deleting quota root from the dirty cow roots listMatt Corallo <[email protected]>
btrfs: add handling for RAID1C23/DUP tobtrfs_reduce_alloc_profileJan Kara <[email protected]>
fs: Lock moved directoriesJan Kara <[email protected]>
fs: Establish locking order for unrelated directoriesJan Kara <[email protected]>
Revert "f2fs: fix potential corruption when moving a directory"Jan Kara <[email protected]>
ext4: Remove ext4 locking of moved directoryThomas Weißschuh <[email protected]>
fs: avoid empty option when generating legacy mount stringFabian Frederick <[email protected]>
jffs2: reduce stack usage injffs2_build_xattr_subsystem()Roberto Sassu <[email protected]>
shmem: useramfs_kill_sb()forkill_sbmethod of ramfs-based tmpfsArnd Bergmann <[email protected]>
autofs: use flexible array in ioctl structureTianjia Zhang <[email protected]>
integrity: Fix possible multiple allocation inintegrity_inode_get()Kees Cook <[email protected]>
um: UseHOST_DIRfor mrproperZheng Wang <[email protected]>
bcache: Fix__bch_btree_node_allocto make the failure behavior consistentZheng Wang <[email protected]>
bcache: Remove unnecessary NULL point check in node allocationsMingzhe Zou <[email protected]>
bcache: fixupbtree_cache_waitlist damageChevron Li <[email protected]>
mmc: sdhci: fix DMA configure compatibility issue when 64bit DMA mode is used.Ulf Hansson <[email protected]>
mmc: mmci: SetPROBE_PREFER_ASYNCHRONOUSRobert Marko <[email protected]>
mmc: core: disable TRIM on Micron MTFC4GACAJCN-1MRobert Marko <[email protected]>
mmc: core: disable TRIM on Kingston EMMC04G-M627Jens Axboe <[email protected]>
io_uring: wait interruptibly for request completions on exitDai Ngo <[email protected]>
NFSD: add encoding ofop_recallflag for write delegationShuai Jiang <[email protected]>
i2c: qup: Add missing unwind goto inqup_i2c_probe()Takashi Iwai <[email protected]>
ALSA: jack: Fix mutex call insnd_jack_report()Robert Hancock <[email protected]>
i2c: xiic: Don't try to handle more interrupt events after errorMarek Vasut <[email protected]>
i2c: xiic: Deferxiic_wakeup()and__xiic_start_xfer()inxiic_process()Danila Chernetsov <[email protected]>
apparmor: fix missing error check forrhashtable_insert_fastArtur Rojek <[email protected]>
sh: dma: Fix DMA channel offset calculationThorsten Winkler <[email protected]>
s390/qeth: Fix vipa deletionVladimir Oltean <[email protected]>
net: dsa:tag_sja1105: fix MAC DA patching from meta framesGuillaume Nault <[email protected]>
pptp: Fix fib lookup calls.Lin Ma <[email protected]>
net/sched:act_pedit: Add size check forTCA_PEDIT_PARMS_EXIlya Maximets <[email protected]>
xsk: HonorSO_BINDTODEVICEon bindEric Dumazet <[email protected]>
tcp: annotate data races in__tcp_oow_rate_limited()Vladimir Oltean <[email protected]>
net: bridge: keep ports withoutIFF_UNICAST_FLTinBR_PROMISCmodeRandy Dunlap <[email protected]>
powerpc: allowPPC_EARLY_DEBUG_CPMonly when SERIAL_CPM=yHariprasad Kelam <[email protected]>
octeontx2-af: Fix mapping for NIX block from CGX connectionChao Yu <[email protected]>
f2fs: fix error path handling intruncate_dnode()Nishanth Menon <[email protected]>
mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0Jonas Gorski <[email protected]>
spi: bcm-qspi: return error if neitherhif_mspinor mspi is availablePawel Dembicki <[email protected]>
net: dsa: vsc73xx: fix MTU configurationTobias Heider <[email protected]>
AddMODULE_FIRMWARE()forFIRMWARE_TG357766.Chengfeng Ye <[email protected]>
sctp: fix potential deadlock on &net->sctp.addr_wq_lockRandy Dunlap <[email protected]>
media: cec: i2c: ch7322: also select REGMAPChristophe JAILLET <[email protected]>
rtc: st-lpc: Release some resources inst_rtc_probe()in case of errorMarek Vasut <[email protected]>
pwm: sysfs: Do not apply state to already disabled PWMsFancy Fang <[email protected]>
pwm: imx-tpm: force 'real_period' to be zero in suspendClaudiu Beznea <[email protected]>
phy: tegra: xusb: check return value ofdevm_kzalloc()Christophe JAILLET <[email protected]>
mfd: stmpe: Only disable the regulators if they are enabledPierre Morel <[email protected]>
KVM: s390: vsie: fix the length of APCB bitmapAmelie Delaunay <[email protected]>
mfd: stmfx: Nullify stmfx->vdd in case of errorAmelie Delaunay <[email protected]>
mfd: stmfx: Fix error path instmfx_chip_initMirsad Goran Todorovac <[email protected]>
test_firmware: return ENOMEM instead of ENOSPC on failed memory allocationTony Lindgren <[email protected]>
serial: 8250_omap: Useforce_suspendand resume for system suspendGreg Kroah-Hartman <[email protected]>
Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection"Jiasheng Jiang <[email protected]>
mfd: intel-lpss: Add missing check forplatform_get_resourceChristophe JAILLET <[email protected]>
usb: dwc3-meson-g12a: Fix an error handling path indwc3_meson_g12a_probe()Prashanth K <[email protected]>
usb: common: usb-conn-gpio: Set last role to unknown before initial detectionChristophe JAILLET <[email protected]>
usb: dwc3: qcom: Fix an error handling path indwc3_qcom_probe()Christophe JAILLET <[email protected]>
usb: dwc3: qcom: Release the correct resources indwc3_qcom_remove()Nico Boehr <[email protected]>
KVM: s390: fixKVM_S390_GET_CMMA_BITSfor GFNs in memslot holesDan Carpenter <[email protected]>
media: atomisp:gmin_platform: fixout_leningmin_get_config_dsm_var()Rikard Falkeborn <[email protected]>
media: venus: helpers: FixALIGN()of non power of twoStephan Gerhold <[email protected]>
mfd: rt5033: Drop rt5033-battery sub-deviceJames Clark <[email protected]>
coresight: Fix loss of connection info when a module is unloadedMuchun Song <[email protected]>
kernfs: fix missingkernfs_idr_lockto remove an ID from the IDRJohn Ogness <[email protected]>
serial: 8250: lock port forUART_IERaccess inomap8250_irq()John Ogness <[email protected]>
serial: 8250: lock port for stop_rx() in omap8250_irq()Arnd Bergmann <[email protected]>
usb: hide unused usbfs_notify_suspend/resume functionsLi Yang <[email protected]>
usb: phy: phy-tahvo: fix memory leak intahvo_usb_probe()Andy Shevchenko <[email protected]>
extcon: Fix kernel doc of property capability fields to avoid warningsAndy Shevchenko <[email protected]>
extcon: Fix kernel doc of property fields to avoid warningsPrashanth K <[email protected]>
usb: gadget:u_serial: Add null pointer check ingserial_suspendVladislav Efanov <[email protected]>
usb: dwc3: qcom: Fix potential memory leakRobert Marko <[email protected]>
clk: qcom: ipq6018: fix networking resetsRobert Marko <[email protected]>
clk: qcom: reset: support resetting multiple bitsStephan Gerhold <[email protected]>
clk: qcom: reset: Allow specifying custom reset delayDuoming Zhou <[email protected]>
media: usb: siano: Fix warning due to nullwork_func_tfunction pointerMarek Vasut <[email protected]>
media:videodev2.h: Fix structv4l2_inputtuner index commentDaniil Dulov <[email protected]>
media: usb: Checkaz6007_read()return valueMantas Pucka <[email protected]>
clk: qcom: gcc-ipq6018: Use floor ops for sdcc clocksTony Lindgren <[email protected]>
serial: 8250: omap: Fix freeing of resources on failed registerJohn Paul Adrian Glaubitz <[email protected]>
sh: j2: Useioremap()to translate device tree address into kernel memoryDan Carpenter <[email protected]>
w1: fix loop inw1_fini()Stefan Wahren <[email protected]>
w1:w1_therm: fix locking behavior inconvert_tDing Hui <[email protected]>
SUNRPC: Fix UAF insvc_tcp_listen_data_ready()Michael Schmitz <[email protected]>
block: change all__u32annotations to__be32inaffs_hardblocks.hMichael Schmitz <[email protected]>
block: fix signed int overflow in Amiga partition supportEJ Hsu <[email protected]>
phy: tegra: xusb: Clear the driver reference in usb-phy devKrishna Kurapati <[email protected]>
usb: dwc3: gadget: Propagate core init errors to UDC during pullupDavide Tronchin <[email protected]>
USB: serial: option: add LARA-R6 01B PIDsJens Axboe <[email protected]>
io_uring: ensure IOPOLL locks around deferred workMartin Kaiser <[email protected]>
hwrng: st - keep clock enabled while hwrng is registeredDan Williams <[email protected]>
dax: Introducealloc_dev_dax_id()Dan Williams <[email protected]>
dax: Fixdax_mapping_release()use after freeOlga Kornievskaia <[email protected]>
NFSv4.1: freeze the session table upon receivingNFS4ERR_BADSESSIONMasahiro Yamada <[email protected]>
ARC: defineASM_NLand__ALIGN(_STR)outside #ifdef__ASSEMBLY__guardDan Carpenter <[email protected]>
modpost: fix off by one inis_executable_section()Arnd Bergmann <[email protected]>
crypto: marvell/cesa - Fix type mismatch warningMasahiro Yamada <[email protected]>
modpost: fix section mismatch message for R_ARM_{PC24,CALL,JUMP24}Masahiro Yamada <[email protected]>
modpost: fix section mismatch message forR_ARM_ABS32Randy Dunlap <[email protected]>
crypto: nx - fix build warnings whenDEBUG_FSis not enabledHerbert Xu <[email protected]>
hwrng: virtio - Fix race ondata_availand actual dataLaurent Vivier <[email protected]>
hwrng: virtio - always add a pending requestLaurent Vivier <[email protected]>
hwrng: virtio - don't waste entropyLaurent Vivier <[email protected]>
hwrng: virtio - don't wait on cleanupLaurent Vivier <[email protected]>
hwrng: virtio - add an internal bufferAneesh Kumar K.V <[email protected]>
powerpc/mm/dax: Fix the condition when checking if altmap vmemap can cross-boundaryAneesh Kumar K.V <[email protected]>
powerpc/book3s64/mm: Fix DirectMap stats in/proc/meminfoAneesh Kumar K.V <[email protected]>
mm: renamep4d_page_vaddrtop4d_pgtableand make it returnpud_t*Aneesh Kumar K.V <[email protected]>
mm: renamepud_page_vaddrtopud_pgtableand make it returnpmd_t*Colin Ian King <[email protected]>
powerpc/powernv/sriov: perform null check on iov before dereferencing iovClaudiu Beznea <[email protected]>
pinctrl: at91-pio4: check return value ofdevm_kasprintf()Namhyung Kim <[email protected]>
perf dwarf-aux: Fix off-by-one indie_get_varname()Arnaldo Carvalho de Melo <[email protected]>
perf script: Fix allocation of evsel->priv related to per-event dump filesArnaldo Carvalho de Melo <[email protected]>
perf script: Fixup 'structevsel_script' method prefixChristophe Leroy <[email protected]>
kcsan: Don't expect 64 bits atomic builtins from 32 bits architecturesAndy Shevchenko <[email protected]>
pinctrl: cherryview: Return correct value if pin in push-pull modeArnaldo Carvalho de Melo <[email protected]>
perf bench: Add missingsetlocale()call to allow usage of %'d style formattingSohaib Mohamed <[email protected]>
perf bench: Use unbuffered output when pipe/tee'ing to a fileSui Jingfeng <[email protected]>
PCI: Addpci_clear_master()stub for non-CONFIG_PCIJunyan Ye <[email protected]>
PCI: ftpci100: Release the clock resourcesRongguang Wei <[email protected]>
PCI: pciehp: Cancel bringup sequence if card is not presentYuchen Yang <[email protected]>
scsi: 3w-xxxx: Add error handling for initialization failure intw_probe()Ding Hui <[email protected]>
PCI/ASPM: Disable ASPM on MFD function removal to avoid use-after-freeChristophe JAILLET <[email protected]>
pinctrl: bcm2835: Handlegpiochip_add_pin_range()errorsJinhong Zhu <[email protected]>
scsi: qedf: Fix NULL dereference in error handlingSiddharth Vadapalli <[email protected]>
PCI: cadence: Fix Gen2 Link Retraining processClaudiu Beznea <[email protected]>
ASoC: imx-audmix: check return value ofdevm_kasprintf()Amir Goldstein <[email protected]>
ovl: update of dentry revalidate flags after copy upAlexey Romanov <[email protected]>
drivers: meson: secure-pwrc: always enable DMA domainClaudiu Beznea <[email protected]>
clk: ti: clkctrl: check return value ofkasprintf()Claudiu Beznea <[email protected]>
clk: keystone: sci-clk: check return value ofkasprintf()Claudiu Beznea <[email protected]>
clk: si5341: free unused memory on probe failureClaudiu Beznea <[email protected]>
clk: si5341: check return value of {devm_}kasprintf()Claudiu Beznea <[email protected]>
clk: si5341: return error if one synth clock registration failsRobert Hancock <[email protected]>
clk: si5341: Add sysfs properties to allow checking/resetting device faultsRobert Hancock <[email protected]>
clk: si5341: Allow different outputVDD_SELvaluesClaudiu Beznea <[email protected]>
clk: cdce925: check return value ofkasprintf()Claudiu Beznea <[email protected]>
clk: vc5: check memory returned bykasprintf()Bjorn Andersson <[email protected]>
drm/msm/dp: Free resources after unregistering themDmitry Baryshkov <[email protected]>
drm/msm/dpu: do not enable color-management if DSPPs are not availableSu Hui <[email protected]>
ALSA: ac97: Fix possible NULL dereference insnd_ac97_mixerYuan Can <[email protected]>
clk: tegra: tegra124-emc: Fix potential memory leakYuxing Liu <[email protected]>
clk: imx: clk-imx8mp: improve error handling inimx8mp_clocks_probe()Hao Luo <[email protected]>
clk: imx: clk-imx8mn: fix memory leak inimx8mn_clocks_probeKashyap Desai <[email protected]>
RDMA/bnxt_re: Avoid callingwake_upthreads fromspin_lockcontextKashyap Desai <[email protected]>
RDMA/bnxt_re: wraparound mbox producer indexChia-I Wu <[email protected]>
amdgpu: validateoffset_in_boofdrm_amdgpu_gem_vaNikita Zhandarovich <[email protected]>
drm/radeon: fix possible division-by-zero errorsDaniil Dulov <[email protected]>
drm/amdkfd: Fix potential deallocation of previously deallocated memory.Christian Lamparter <[email protected]>
ARM: dts: BCM5301X: fix duplex-full => full-duplexGuenter Roeck <[email protected]>
hwmon: (pmbus/adm1275) Fix problems with temperature monitoring on ADM1272Potin Lai <[email protected]>
hwmon: (adm1275) Allow setting sample averagingChu Lin <[email protected]>
hwmon: (adm1275) enable adm1272 temperature reportingTim Harvey <[email protected]>
hwmon: (gsc-hwmon) fix fan pwm temperature scalingOlivier Moysan <[email protected]>
ARM: dts: stm32: fix i2s endpoint format property for stm32mp15xx-dkxMarek Vasut <[email protected]>
ARM: dts: stm32: Fix audio routing on STM32MP15xx DHCOM PDK2Keerthy <[email protected]>
arm64: dts: ti: k3-j7200: Fix physical address of pinChristophe JAILLET <[email protected]>
fbdev: omapfb:lcd_mipid: Fix an error handling path inmipid_spi_probe()Wolfram Sang <[email protected]>
arm64: dts: renesas: ulcb-kf: Remove flow control for SCIF1Geert Uytterhoeven <[email protected]>
ARM: dts: iwg20d-q7-common: Fix backlight pwm specifierChengchang Tang <[email protected]>
RDMA/hns: Fixhns_roce_table_getreturn valueXi Wang <[email protected]>
RDMA/hns: Clean the hardware related code for HEMWeihang Li <[email protected]>
RDMA/hns: Userefcount_tAPIs for HEMLang Cheng <[email protected]>
RDMA/hns: Fix coding style issuesJason Gunthorpe <[email protected]>
RDMA: Removeuverbs_ex_cmd_maskvalues that are linked to functionsBrendan Cunningham <[email protected]>
IB/hfi1: Fix wrongmmu_nodeused for user SDMA packet after invalidatePatrick Kelsey <[email protected]>
IB/hfi1: Fix sdma.h tx->num_descs off-by-one errorsChristophe JAILLET <[email protected]>
IB/hfi1: Usebitmap_zalloc()when applicableRandy Dunlap <[email protected]>
soc/fsl/qe: fixusb.cbuild errorsMartin Blumenstingl <[email protected]>
ARM: dts: meson8: correctuart_Banduart_Cclock referencesCristian Ciocaltea <[email protected]>
ASoC: es8316: Do not set rate constraints for unsupported MCLKsCristian Ciocaltea <[email protected]>
ASoC: es8316: Increment max value for ALC Capture Target Volume controlKrzysztof Kozlowski <[email protected]>
memory:brcmstb_dpfe: fix testing array offset after useMarek Vasut <[email protected]>
ARM: dts: stm32: Shorten the AV96 HDMI sound card nameKrzysztof Kozlowski <[email protected]>
arm64: dts: qcom: apq8096: fix fixed regulator name propertyArnd Bergmann <[email protected]>
ARM: omap2: fix missingtick_broadcast()prototypeArnd Bergmann <[email protected]>
ARM: ep93xx: fix missing-prototype warningsDario Binacchi <[email protected]>
drm/panel: simple: fix active size for Ampire AM-480272H3TMQW-T01HKrzysztof Kozlowski <[email protected]>
arm64: dts: qcom: msm8996: correct camss unit addressKrzysztof Kozlowski <[email protected]>
arm64: dts: qcom: msm8994: correct SPMI unit addressKrzysztof Kozlowski <[email protected]>
arm64: dts: qcom: msm8916: correct camss unit addressTony Lindgren <[email protected]>
ARM: dts: gta04: Move model property out of pinctrl nodeKalesh AP <[email protected]>
RDMA/bnxt_re: Fix to remove an unnecessary logKalesh AP <[email protected]>
RDMA/bnxt_re: Remove a redundant check insidebnxt_re_update_gidKalesh AP <[email protected]>
RDMA/bnxt_re: Use unique names while registering interruptsKalesh AP <[email protected]>
RDMA/bnxt_re: Fix to remove unnecessary return labelsSelvin Xavier <[email protected]>
RDMA/bnxt_re: Disable/kill tasklet only if it is enabledRobert Marko <[email protected]>
arm64: dts: microchip: sparx5: do not use PSCI on reference boardsTony Lindgren <[email protected]>
bus: ti-sysc: Fix dispc quirk masking bool variablesMarek Vasut <[email protected]>
ARM: dts: stm32: Move ethernet MAC EEPROM from SoM to carrier boardsDmitry Baryshkov <[email protected]>
drm/panel: sharp-ls043t1le01: adjust mode settingsXuDong Liu <[email protected]>
drm:sun4i_tcon: usedevm_clk_get_enabledinsun4i_tcon_init_clocksMarek Vasut <[email protected]>
Input: adxl34x - do not hardcode interrupt trigger type[email protected] <[email protected]>
ARM: dts: meson8b: correctuart_Banduart_Cclock referencesRafał Miłecki <[email protected]>
ARM: dts: BCM5301X: Drop "clock-names" from the SPI nodeLuc Ma <[email protected]>
drm/vram-helper: fix function names in vram helper docFrancesco Dolcini <[email protected]>
drm/bridge: tc358768: fixTHS_TRAILCNTcomputationFrancesco Dolcini <[email protected]>
drm/bridge: tc358768: fix TXTAGOCNT computationFrancesco Dolcini <[email protected]>
drm/bridge: tc358768: fixTHS_ZEROCNTcomputationFrancesco Dolcini <[email protected]>
drm/bridge: tc358768: fixTCLK_TRAILCNTcomputationFrancesco Dolcini <[email protected]>
drm/bridge: tc358768: Addatomic_get_input_bus_fmts()implementationFrancesco Dolcini <[email protected]>
drm/bridge: tc358768: fixTCLK_ZEROCNTcomputationFrancesco Dolcini <[email protected]>
drm/bridge: tc358768: fix PLL target frequencyFrancesco Dolcini <[email protected]>
drm/bridge: tc358768: fix PLL parameters computationFrancesco Dolcini <[email protected]>
drm/bridge: tc358768: always enable HS video modeLuca Weiss <[email protected]>
Input: drv260x - sleep between polling GO bitNicholas Kazlauskas <[email protected]>
drm/amd/display: Explicitly specify update type per plane info changeNikita Zhandarovich <[email protected]>
radeon: avoid double free inci_dpm_init()Kuniyuki Iwashima <[email protected]>
netlink: Add __sock_i_ino() for __netlink_diag_dump().Cambda Zhu <[email protected]>
ipvlan: Fix return value ofipvlan_queue_xmit()Ilia.Gavrilov <[email protected]>
netfilter:nf_conntrack_sip: fix thect_sip_parse_numerical_param()return value.Florian Westphal <[email protected]>
netfilter: conntrack: dccp: copy entire header to stack buffer, not just basic oneJeremy Sowden <[email protected]>
lib/ts_bm: reset initial match offset for every block of textLin Ma <[email protected]>
net: nfc: Fix use-after-free caused bynfc_llcp_find_localKrzysztof Kozlowski <[email protected]>
nfc: llcp: simplifyllcp_sock_connect()error pathsEdward Cree <[email protected]>
sfc: fix crash when reading stats while NIC is resettingMaxim Kochetkov <[email protected]>
net: axienet: Move reset before 64-bit DMA detectionKuniyuki Iwashima <[email protected]>
gtp: Fix use-after-free in__gtp_encap_destroy().Sabrina Dubroca <[email protected]>
selftests: rtnetlink: remove netdevsim device after ipsec offload testEric Dumazet <[email protected]>
netlink: do not hard code device address lenth in fdb dumpsEric Dumazet <[email protected]>
netlink: fix potential deadlock innetlink_set_err()Bartosz Golaszewski <[email protected]>
net: stmmac: fix double serdes powerdownVinicius Costa Gomes <[email protected]>
igc: Fix race condition in PTP tx codeDmitry Antipov <[email protected]>
wifi: ath9k: convert msecs to jiffies where neededBenjamin Berg <[email protected]>
wifi: cfg80211: rewrite merging of inherited elementsJohannes Berg <[email protected]>
wifi: iwlwifi: pull from TXQs with softirqs disabledEdwin Peer <[email protected]>
rtnetlink: extendRTEXT_FILTER_SKIP_STATStoIFLA_VF_INFORemi Pommarel <[email protected]>
wifi: ath9k: Fix possible stall onath9k_txq_list_has_key()Arnd Bergmann <[email protected]>
memstick r592: makememstick_debug_get_tpc_name()staticZhen Lei <[email protected]>
kexec: fix a memory leak incrash_shrink_memory()Douglas Anderson <[email protected]>
watchdog/perf: more properly prevent false positives with turbo modesDouglas Anderson <[email protected]>
watchdog/perf: define dummywatchdog_update_hrtimer_threshold()on correct configMarek Vasut <[email protected]>
wifi: rsi: Do not setMMC_PM_KEEP_POWERin shutdownMarek Vasut <[email protected]>
wifi: rsi: Do not configure WoWlan in shutdown hook if not enabledFedor Pchelkin <[email protected]>
wifi: ath9k: don't allow to overwrite ENDPOINT0 attributesChristophe JAILLET <[email protected]>
wifi:ray_cs: Fix an error handling path inray_probe()Andy Shevchenko <[email protected]>
wifi:ray_cs: Drop useless status variable inparse_addr()Andy Shevchenko <[email protected]>
wifi:ray_cs: Utilizestrnlen()inparse_addr()Christophe JAILLET <[email protected]>
wifi:wl3501_cs: Fix an error handling path inwl3501_probe()Jakub Kicinski <[email protected]>
wl3501_cs: use eth_hw_addr_set()Jakub Kicinski <[email protected]>
net: create netdev->dev_addr assignment helpersLee Jones <[email protected]>
wl3501_cs: Fix misspelling and provide missing documentationChristophe JAILLET <[email protected]>
wifi: atmel: Fix an error handling path inatmel_probe()Christophe JAILLET <[email protected]>
wifi: orinoco: Fix an error handling path inorinoco_cs_probe()Christophe JAILLET <[email protected]>
wifi: orinoco: Fix an error handling path inspectrum_cs_probe()Geert Uytterhoeven <[email protected]>
regulator: core: Streamline debugfs operationsGeert Uytterhoeven <[email protected]>
regulator: core: Fix more error checking fordebugfs_create_dir()Alan Maguire <[email protected]>
bpftool: JIT limited misreported as negative value on aarch64Krzysztof Kozlowski <[email protected]>
nfc: llcp: fix possible use of uninitialized variable innfc_llcp_send_connect()Krzysztof Kozlowski <[email protected]>
nfc: constify several pointers to u8, char andsk_buffAndrii Nakryiko <[email protected]>
libbpf: fixoffsetof()andcontainer_of()to work with CO-REAlexander Mikhalitsyn <[email protected]>
sctp: addbpf_bypass_getsockoptproto callbackStanislav Fomichev <[email protected]>
bpf: Remove extralock_sockforTCP_ZEROCOPY_RECEIVEChristophe JAILLET <[email protected]>
wifi: mwifiex: Fix the size of a memory allocation inmwifiex_ret_802_11_scan()Amisha Patel <[email protected]>
wifi: wilc1000: fix for absent RSN capabilities WFA testcaseVijaya Krishna Nivarthi <[email protected]>
spi: spi-geni-qcom: CorrectCS_TOGGLEbit inSPI_TRANS_CFGPengcheng Yang <[email protected]>
samples/bpf: Fix buffer overflow intcp_baserttFedor Pchelkin <[email protected]>
wifi: ath9k: avoid referencing uninit memory inath9k_wmi_ctrl_rxPeter Seiderer <[email protected]>
wifi: ath9k: fix AR9003 mac hardware hang check register offset calculationJesper Dangaard Brouer <[email protected]>
igc: Enable and fix RX hash usage by netstackJiasheng Jiang <[email protected]>
pstore/ram: Add check for kstrdupRoberto Sassu <[email protected]>
ima: Fix build warningsRoberto Sassu <[email protected]>
evm: Complete description ofevm_inode_setattr()Juergen Gross <[email protected]>
x86/mm: Fix__swp_entry_to_pte()for Xen PV guestsRavi Bangoria <[email protected]>
perf/ibs: Fix interface via core pmu eventsQiuxu Zhuo <[email protected]>
rcu/rcuscale: Stopkfree_scale_threadthread(s) after unloading rcuscaleQiuxu Zhuo <[email protected]>
rcu/rcuscale: Move rcu_scale_*() afterkfree_scale_cleanup()Paul E. McKenney <[email protected]>
rcuscale: Move shutdown fromwait_event()towait_event_idle()Li Zhijian <[email protected]>
rcuscale: Always log error messageJiangong.Han <[email protected]>
rcuscale: Console output claims too few grace periodsChristophe JAILLET <[email protected]>
thermal/drivers/sun8i: Fix some error handling paths insun8i_ths_probe()Tero Kristo <[email protected]>
cpufreq:intel_pstate: Fixenergy_performance_preferencefor passiveArnd Bergmann <[email protected]>
ARM: 9303/1: kprobes: avoid missing-declaration warningsZhang Rui <[email protected]>
powercap: RAPL: FixCONFIG_IOSF_MBIdependencyRobin Murphy <[email protected]>
perf/arm-cmn: Fix DTC resetNikita Zhandarovich <[email protected]>
PM: domains: fix integer overflow issues ingenpd_parse_state()Feng Mingxi <[email protected]>
clocksource/drivers/cadence-ttc: Fix memory leak inttc_timer_probeSebastian Andrzej Siewior <[email protected]>
tracing/timer: Add missing hrtimer modes todecode_hrtimer_mode().Thomas Gleixner <[email protected]>
posix-timers: Prevent RT livelock initimer_delete()John Paul Adrian Glaubitz <[email protected]>
irqchip/jcore-aic: Fix missing allocation of IRQ descriptorsMarc Zyngier <[email protected]>
irqchip/jcore-aic: Kill use ofirq_create_strict_mappings()Li Nan <[email protected]>
md/raid10: fix io loss while replacement replace rdevLi Nan <[email protected]>
md/raid10: fix null-ptr-deref of mreplace inraid10_sync_requestLi Nan <[email protected]>
md/raid10: fix wrong setting ofmax_corr_read_errorsLi Nan <[email protected]>
md/raid10: fix overflow of md/safe_mode_delayLi Nan <[email protected]>
md/raid10: check slab-out-of-bounds inmd_bitmap_get_counterLi Nan <[email protected]>
blk-iocost: usespin_lock_irqsaveinadjust_inuse_and_calc_costShawn Wang <[email protected]>
x86/resctrl: Only show tasks' pid in current pid namespaceArnd Bergmann <[email protected]>
fs: pipe: reveal missing function protoypesFinn Thain <[email protected]>
nubus: Partially revertproc_create_single_data()conversionBas Nieuwenhuizen <[email protected]>
drm/amdgpu: Validate VM ioctl flags.Ahmed S. Darwish <[email protected]>
scripts/tags.sh: Resolve gtags empty index generationRicardo Cañuelo <[email protected]>
Revert "thermal/drivers/mediatek: Usedevm_of_iomapto avoid resource leak inmtk_thermal_probe"Mike Hommey <[email protected]>
HID: logitech-hidpp: addHIDPP_QUIRK_DELAYED_INITfor the T651.Jason Gerecke <[email protected]>
HID: wacom: Usektime_trather than int when dealing with timestampsZheng Wang <[email protected]>
fbdev: imsttfb: Fix use after free bug inimsttfb_probeGreg Kroah-Hartman <[email protected]>
video: imsttfb: check forioremap()failuresOliver Hartkopp <[email protected]>
can: isotp:isotp_sendmsg(): fix return error fix on TX pathThomas Gleixner <[email protected]>
x86/smp: Use dedicated cache-line formwait_play_dead()Tsuchiya Yuto <[email protected]>
media: atomisp: fix "variable dereferenced before check 'asd'"-------------
Diffstat:
Documentation/filesystems/autofs-mount-control.rst | 2 +- Documentation/filesystems/autofs.rst | 2 +- Documentation/filesystems/directory-locking.rst | 26 +- Documentation/networking/af_xdp.rst | 9 + Documentation/networking/ip-sysctl.rst | 25 + Makefile | 4 +- arch/alpha/include/asm/pgtable.h | 8 +- arch/arc/include/asm/linkage.h | 8 +- arch/arm/boot/dts/bcm53015-meraki-mr26.dts | 2 +- arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 2 +- arch/arm/boot/dts/bcm5301x.dtsi | 1 - arch/arm/boot/dts/iwg20d-q7-common.dtsi | 2 +- arch/arm/boot/dts/meson8.dtsi | 4 +- arch/arm/boot/dts/meson8b.dtsi | 4 +- arch/arm/boot/dts/omap3-gta04a5one.dts | 4 +- arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi | 11 +- arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 8 +- arch/arm/boot/dts/stm32mp15xx-dhcor-som.dtsi | 6 - arch/arm/boot/dts/stm32mp15xx-dkx.dtsi | 2 +- arch/arm/include/asm/pgtable-3level.h | 2 +- arch/arm/mach-ep93xx/timer-ep93xx.c | 3 +- arch/arm/mach-omap2/board-generic.c | 1 + arch/arm/mach-orion5x/board-dt.c | 3 + arch/arm/mach-orion5x/common.h | 6 + arch/arm/probes/kprobes/checkers-common.c | 2 +- arch/arm/probes/kprobes/core.c | 2 +- arch/arm/probes/kprobes/opt-arm.c | 2 - arch/arm/probes/kprobes/test-core.c | 2 +- arch/arm/probes/kprobes/test-core.h | 4 + arch/arm64/boot/dts/microchip/sparx5.dtsi | 2 +- .../boot/dts/microchip/sparx5_pcb_common.dtsi | 12 + arch/arm64/boot/dts/qcom/apq8096-ifc6640.dts | 4 +- arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8994.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 3 +- .../boot/dts/ti/k3-j7200-common-proc-board.dts | 28 +- arch/arm64/include/asm/exception.h | 5 - arch/arm64/include/asm/pgtable.h | 8 +- arch/arm64/mm/mmu.c | 4 +- arch/ia64/include/asm/pgtable.h | 4 +- arch/m68k/include/asm/motorola_pgtable.h | 2 +- arch/mips/include/asm/pgtable-64.h | 8 +- arch/mips/kernel/cpu-probe.c | 9 +- arch/parisc/include/asm/pgtable.h | 4 +- arch/powerpc/Kconfig.debug | 2 +- arch/powerpc/Makefile | 8 + arch/powerpc/include/asm/book3s/64/pgtable.h | 11 +- arch/powerpc/include/asm/nohash/64/pgtable-4k.h | 6 +- arch/powerpc/include/asm/nohash/64/pgtable.h | 6 +- arch/powerpc/mm/book3s64/radix_pgtable.c | 40 +- arch/powerpc/mm/init_64.c | 2 +- arch/powerpc/mm/pgtable_64.c | 4 +- arch/powerpc/platforms/powernv/pci-sriov.c | 6 +- arch/riscv/include/asm/pgtable-64.h | 4 +- arch/riscv/net/bpf_jit.h | 5 +- arch/riscv/net/bpf_jit_comp64.c | 13 - arch/riscv/net/bpf_jit_core.c | 29 +- arch/s390/Makefile | 1 + arch/s390/kvm/kvm-s390.c | 4 + arch/s390/kvm/vsie.c | 6 +- arch/sh/drivers/dma/dma-sh.c | 37 +- arch/sh/include/asm/pgtable-3level.h | 4 +- arch/sh/kernel/cpu/sh2/probe.c | 2 +- arch/sparc/include/asm/pgtable_32.h | 6 +- arch/sparc/include/asm/pgtable_64.h | 10 +- arch/um/Makefile | 2 +- arch/um/include/asm/pgtable-3level.h | 2 +- arch/x86/events/amd/core.c | 2 +- arch/x86/events/amd/ibs.c | 53 +- arch/x86/include/asm/perf_event.h | 2 + arch/x86/include/asm/pgtable.h | 8 +- arch/x86/include/asm/pgtable_64.h | 4 +- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 8 +- arch/x86/kernel/smpboot.c | 24 +- arch/x86/mm/init_64.c | 4 +- arch/x86/mm/pat/set_memory.c | 4 +- arch/x86/mm/pgtable.c | 2 +- arch/xtensa/platforms/iss/network.c | 2 +- block/blk-iocost.c | 7 +- block/partitions/amiga.c | 104 +++- drivers/acpi/button.c | 9 + drivers/acpi/video_detect.c | 16 + drivers/base/power/domain.c | 6 +- drivers/base/regmap/regmap-i2c.c | 8 +- drivers/base/regmap/regmap-spi-avmm.c | 2 +- drivers/base/regmap/regmap.c | 6 +- drivers/block/nbd.c | 3 +- drivers/bus/ti-sysc.c | 4 +- drivers/char/hw_random/imx-rngc.c | 6 +- drivers/char/hw_random/st-rng.c | 21 +- drivers/char/hw_random/virtio-rng.c | 86 ++- drivers/char/tpm/tpm_tis_core.c | 2 + drivers/char/tpm/tpm_vtpm_proxy.c | 30 +- drivers/clk/clk-cdce925.c | 12 + drivers/clk/clk-si5341.c | 242 +++++++- drivers/clk/clk-versaclock5.c | 29 + drivers/clk/imx/clk-imx8mn.c | 8 +- drivers/clk/imx/clk-imx8mp.c | 24 +- drivers/clk/keystone/sci-clk.c | 2 + drivers/clk/qcom/gcc-ipq6018.c | 34 +- drivers/clk/qcom/reset.c | 8 +- drivers/clk/qcom/reset.h | 2 + drivers/clk/tegra/clk-tegra124-emc.c | 2 + drivers/clk/ti/clkctrl.c | 7 + drivers/clocksource/timer-cadence-ttc.c | 19 +- drivers/cpufreq/intel_pstate.c | 2 + drivers/crypto/marvell/cesa/cipher.c | 2 +- drivers/crypto/nx/Makefile | 2 +- drivers/crypto/nx/nx.h | 4 +- drivers/dax/bus.c | 61 +- drivers/dax/dax-private.h | 4 +- drivers/extcon/extcon.c | 8 + drivers/firmware/stratix10-svc.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 20 +- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 13 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 3 - drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 2 +- drivers/gpu/drm/bridge/tc358768.c | 93 ++- drivers/gpu/drm/drm_atomic.c | 11 +- drivers/gpu/drm/drm_atomic_helper.c | 11 +- drivers/gpu/drm/drm_client_modeset.c | 6 + drivers/gpu/drm/drm_gem_vram_helper.c | 6 +- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 5 +- drivers/gpu/drm/msm/dp/dp_display.c | 2 +- drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 11 +- drivers/gpu/drm/panel/panel-simple.c | 6 +- drivers/gpu/drm/radeon/ci_dpm.c | 28 +- drivers/gpu/drm/radeon/cypress_dpm.c | 8 +- drivers/gpu/drm/radeon/ni_dpm.c | 8 +- drivers/gpu/drm/radeon/rv740_dpm.c | 8 +- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 8 +- drivers/gpu/drm/sun4i/sun4i_tcon.c | 19 +- drivers/hid/hid-logitech-hidpp.c | 2 +- drivers/hid/wacom_wac.c | 6 +- drivers/hid/wacom_wac.h | 2 +- drivers/hwmon/gsc-hwmon.c | 6 +- drivers/hwmon/pmbus/adm1275.c | 94 ++- drivers/hwtracing/coresight/coresight-core.c | 9 +- drivers/i2c/busses/i2c-qup.c | 21 +- drivers/i2c/busses/i2c-xiic.c | 39 +- drivers/iio/adc/meson_saradc.c | 2 +- drivers/infiniband/core/cma.c | 23 + drivers/infiniband/core/cma_priv.h | 1 + drivers/infiniband/core/device.c | 11 + drivers/infiniband/core/uverbs_cmd.c | 2 +- drivers/infiniband/hw/bnxt_re/main.c | 20 +- drivers/infiniband/hw/bnxt_re/qplib_fp.c | 40 +- drivers/infiniband/hw/bnxt_re/qplib_fp.h | 2 +- drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 46 +- drivers/infiniband/hw/bnxt_re/qplib_rcfw.h | 1 + drivers/infiniband/hw/efa/efa_main.c | 3 - drivers/infiniband/hw/hfi1/ipoib_tx.c | 4 +- drivers/infiniband/hw/hfi1/mmu_rb.c | 101 +-- drivers/infiniband/hw/hfi1/mmu_rb.h | 3 + drivers/infiniband/hw/hfi1/sdma.c | 27 +- drivers/infiniband/hw/hfi1/sdma.h | 62 +- drivers/infiniband/hw/hfi1/sdma_txreq.h | 2 + drivers/infiniband/hw/hfi1/user_sdma.c | 145 ++--- drivers/infiniband/hw/hfi1/user_sdma.h | 1 - drivers/infiniband/hw/hfi1/vnic_sdma.c | 4 +- drivers/infiniband/hw/hns/hns_roce_cmd.c | 27 +- drivers/infiniband/hw/hns/hns_roce_cmd.h | 4 +- drivers/infiniband/hw/hns/hns_roce_cq.c | 2 +- drivers/infiniband/hw/hns/hns_roce_device.h | 2 - drivers/infiniband/hw/hns/hns_roce_hem.c | 131 +--- drivers/infiniband/hw/hns/hns_roce_hem.h | 15 +- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 93 ++- drivers/infiniband/hw/hns/hns_roce_hw_v1.h | 7 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 9 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 6 +- drivers/infiniband/hw/hns/hns_roce_main.c | 8 +- drivers/infiniband/hw/hns/hns_roce_mr.c | 4 +- drivers/infiniband/hw/hns/hns_roce_qp.c | 2 +- drivers/infiniband/hw/hns/hns_roce_srq.c | 1 - drivers/infiniband/hw/mlx4/main.c | 14 +- drivers/infiniband/hw/mlx5/main.c | 14 +- drivers/input/misc/adxl34x.c | 3 +- drivers/input/misc/drv260x.c | 1 + drivers/irqchip/irq-jcore-aic.c | 11 +- drivers/leds/trigger/ledtrig-netdev.c | 3 + drivers/mailbox/ti-msgmgr.c | 12 +- drivers/md/bcache/btree.c | 25 +- drivers/md/bcache/btree.h | 1 + drivers/md/bcache/super.c | 4 +- drivers/md/bcache/writeback.c | 10 + drivers/md/md-bitmap.c | 17 +- drivers/md/md.c | 23 +- drivers/md/raid0.c | 62 +- drivers/md/raid0.h | 1 + drivers/md/raid10.c | 38 +- drivers/media/cec/i2c/Kconfig | 1 + drivers/media/platform/qcom/venus/helpers.c | 4 +- drivers/media/usb/dvb-usb-v2/az6007.c | 3 +- drivers/media/usb/siano/smsusb.c | 3 +- drivers/memory/brcmstb_dpfe.c | 4 +- drivers/memstick/host/r592.c | 4 +- drivers/mfd/intel-lpss-acpi.c | 3 + drivers/mfd/rt5033.c | 3 - drivers/mfd/stmfx.c | 7 +- drivers/mfd/stmpe.c | 4 +- drivers/misc/fastrpc.c | 2 +- drivers/misc/pci_endpoint_test.c | 10 +- drivers/mmc/core/quirks.h | 14 + drivers/mmc/host/mmci.c | 1 + drivers/mmc/host/sdhci.c | 4 +- drivers/mtd/nand/raw/meson_nand.c | 4 + drivers/net/dsa/vitesse-vsc73xx-core.c | 6 +- drivers/net/ethernet/amazon/ena/ena_com.c | 3 + drivers/net/ethernet/broadcom/bgmac.c | 4 +- drivers/net/ethernet/broadcom/genet/bcmmii.c | 2 + drivers/net/ethernet/broadcom/tg3.c | 1 + drivers/net/ethernet/google/gve/gve_ethtool.c | 3 + drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 2 +- drivers/net/ethernet/intel/iavf/iavf_main.c | 5 +- drivers/net/ethernet/intel/igb/igb_main.c | 5 + drivers/net/ethernet/intel/igc/igc.h | 33 +- drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 + drivers/net/ethernet/intel/igc/igc_main.c | 45 +- drivers/net/ethernet/intel/igc/igc_ptp.c | 57 +- drivers/net/ethernet/marvell/mvneta.c | 4 +- drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 11 + .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 2 +- .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 5 +- .../ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 6 +- drivers/net/ethernet/microchip/lan743x_main.c | 21 +- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 5 - drivers/net/ethernet/sfc/ef10.c | 13 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 - drivers/net/ethernet/ti/cpsw_ale.c | 24 +- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 10 +- drivers/net/gtp.c | 2 + drivers/net/ipvlan/ipvlan_core.c | 9 +- drivers/net/netdevsim/dev.c | 9 +- drivers/net/phy/phy_device.c | 21 +- drivers/net/ppp/pptp.c | 31 +- drivers/net/wireguard/netlink.c | 14 +- drivers/net/wireguard/queueing.c | 1 + drivers/net/wireguard/queueing.h | 25 +- drivers/net/wireguard/receive.c | 2 +- drivers/net/wireguard/send.c | 2 +- drivers/net/wireless/ath/ath11k/mac.c | 2 +- drivers/net/wireless/ath/ath9k/ar9003_hw.c | 27 +- drivers/net/wireless/ath/ath9k/htc_hst.c | 8 +- drivers/net/wireless/ath/ath9k/main.c | 11 +- drivers/net/wireless/ath/ath9k/wmi.c | 4 + drivers/net/wireless/atmel/atmel_cs.c | 13 +- drivers/net/wireless/cisco/airo.c | 5 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 5 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 +- drivers/net/wireless/intersil/orinoco/orinoco_cs.c | 13 +- .../net/wireless/intersil/orinoco/spectrum_cs.c | 13 +- drivers/net/wireless/marvell/mwifiex/scan.c | 6 +- drivers/net/wireless/microchip/wilc1000/hif.c | 8 +- drivers/net/wireless/ray_cs.c | 36 +- drivers/net/wireless/rsi/rsi_91x_sdio.c | 9 +- drivers/net/wireless/wl3501_cs.c | 27 +- drivers/ntb/hw/amd/ntb_hw_amd.c | 7 +- drivers/ntb/hw/idt/ntb_hw_idt.c | 7 +- drivers/ntb/hw/intel/ntb_hw_gen1.c | 7 +- drivers/ntb/ntb_transport.c | 2 +- drivers/ntb/test/ntb_tool.c | 2 + drivers/nubus/proc.c | 22 +- drivers/nvme/host/pci.c | 3 +- drivers/pci/controller/cadence/pcie-cadence-host.c | 27 + drivers/pci/controller/dwc/pcie-qcom.c | 2 + drivers/pci/controller/pci-ftpci100.c | 14 +- drivers/pci/controller/pcie-rockchip-ep.c | 65 +- drivers/pci/controller/pcie-rockchip.c | 17 + drivers/pci/controller/pcie-rockchip.h | 11 +- drivers/pci/hotplug/pciehp_ctrl.c | 8 + drivers/pci/pci.c | 10 +- drivers/pci/pcie/aspm.c | 21 +- drivers/pci/quirks.c | 2 + drivers/perf/arm-cmn.c | 7 +- drivers/phy/tegra/xusb.c | 4 + drivers/pinctrl/bcm/pinctrl-bcm2835.c | 6 +- drivers/pinctrl/intel/pinctrl-cherryview.c | 15 +- drivers/pinctrl/pinctrl-amd.c | 41 +- drivers/pinctrl/pinctrl-amd.h | 1 + drivers/pinctrl/pinctrl-at91-pio4.c | 2 + drivers/platform/x86/wmi.c | 64 +- drivers/powercap/Kconfig | 4 +- drivers/powercap/intel_rapl_msr.c | 1 - drivers/pwm/pwm-imx-tpm.c | 7 + drivers/pwm/sysfs.c | 17 + drivers/regulator/core.c | 30 +- drivers/rtc/rtc-st-lpc.c | 2 +- drivers/s390/net/qeth_l3_sys.c | 2 +- drivers/scsi/3w-xxxx.c | 4 +- drivers/scsi/qedf/qedf_main.c | 3 +- drivers/scsi/qla2xxx/qla_attr.c | 13 + drivers/scsi/qla2xxx/qla_bsg.c | 6 + drivers/scsi/qla2xxx/qla_def.h | 1 - drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_inline.h | 5 +- drivers/scsi/qla2xxx/qla_iocb.c | 5 +- drivers/scsi/qla2xxx/qla_nvme.c | 3 - drivers/scsi/qla2xxx/qla_os.c | 3 +- drivers/soc/amlogic/meson-secure-pwrc.c | 2 +- drivers/soc/fsl/qe/Kconfig | 1 + drivers/spi/spi-bcm-qspi.c | 10 +- drivers/spi/spi-bcm63xx.c | 2 +- drivers/spi/spi-geni-qcom.c | 2 +- drivers/staging/media/atomisp/pci/atomisp_cmd.c | 3 +- .../media/atomisp/pci/atomisp_gmin_platform.c | 2 +- drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 3 +- drivers/thermal/mtk_thermal.c | 14 +- drivers/thermal/sun8i_thermal.c | 55 +- drivers/tty/serial/8250/8250.h | 1 - drivers/tty/serial/8250/8250_omap.c | 25 +- drivers/tty/serial/8250/8250_pci.c | 19 - drivers/tty/serial/8250/8250_port.c | 11 +- drivers/tty/serial/atmel_serial.c | 4 +- drivers/tty/serial/fsl_lpuart.c | 1 + drivers/tty/serial/samsung_tty.c | 14 +- drivers/usb/core/devio.c | 2 + drivers/usb/dwc3/dwc3-meson-g12a.c | 5 +- drivers/usb/dwc3/dwc3-qcom.c | 17 +- drivers/usb/dwc3/gadget.c | 4 +- drivers/usb/gadget/function/u_serial.c | 13 +- drivers/usb/host/xhci-mem.c | 39 +- drivers/usb/host/xhci-pci.c | 12 + drivers/usb/host/xhci.h | 2 + drivers/usb/phy/phy-tahvo.c | 2 +- drivers/usb/serial/option.c | 4 + drivers/video/fbdev/au1200fb.c | 3 + drivers/video/fbdev/imsttfb.c | 34 +- drivers/video/fbdev/imxfb.c | 4 +- drivers/video/fbdev/omap/lcd_mipid.c | 6 +- drivers/w1/slaves/w1_therm.c | 31 +- drivers/w1/w1.c | 4 +- fs/btrfs/block-group.c | 9 +- fs/btrfs/disk-io.c | 3 + fs/btrfs/qgroup.c | 3 + fs/ceph/caps.c | 9 + fs/dlm/plock.c | 4 +- fs/erofs/zdata.c | 2 +- fs/erofs/zmap.c | 6 +- fs/ext4/indirect.c | 8 + fs/ext4/inode.c | 10 - fs/ext4/ioctl.c | 5 +- fs/ext4/mballoc.c | 17 +- fs/ext4/namei.c | 17 +- fs/ext4/super.c | 13 +- fs/ext4/xattr.c | 14 + fs/f2fs/f2fs.h | 2 +- fs/f2fs/file.c | 2 +- fs/f2fs/gc.c | 22 +- fs/f2fs/namei.c | 16 +- fs/f2fs/node.c | 4 +- fs/fs_context.c | 3 +- fs/fuse/dir.c | 2 +- fs/inode.c | 42 ++ fs/internal.h | 2 + fs/jffs2/build.c | 5 +- fs/jffs2/xattr.c | 13 +- fs/jffs2/xattr.h | 4 +- fs/jfs/jfs_dmap.c | 6 + fs/jfs/jfs_filsys.h | 2 + fs/kernfs/dir.c | 2 + fs/namei.c | 25 +- fs/nfs/nfs4proc.c | 1 + fs/nfsd/nfs4xdr.c | 2 +- fs/notify/fanotify/fanotify_user.c | 22 +- fs/overlayfs/copy_up.c | 2 + fs/overlayfs/dir.c | 3 +- fs/overlayfs/export.c | 3 +- fs/overlayfs/namei.c | 3 +- fs/overlayfs/overlayfs.h | 6 +- fs/overlayfs/super.c | 2 +- fs/overlayfs/util.c | 24 +- fs/pstore/ram_core.c | 2 + fs/ramfs/inode.c | 2 +- include/asm-generic/pgtable-nop4d.h | 2 +- include/asm-generic/pgtable-nopmd.h | 2 +- include/asm-generic/pgtable-nopud.h | 2 +- include/linux/bpf-cgroup.h | 27 +- include/linux/etherdevice.h | 12 + include/linux/indirect_call_wrapper.h | 6 + include/linux/netdevice.h | 18 + include/linux/nmi.h | 2 +- include/linux/pci.h | 1 + include/linux/pgtable.h | 4 +- include/linux/pipe_fs_i.h | 4 - include/linux/ramfs.h | 1 + include/linux/sched/signal.h | 2 +- include/linux/serial_8250.h | 1 - include/linux/tcp.h | 2 +- include/linux/workqueue.h | 15 +- include/net/netfilter/nf_tables.h | 41 +- include/net/netns/ipv4.h | 1 + include/net/netns/nftables.h | 7 - include/net/nfc/nfc.h | 4 +- include/net/pkt_sched.h | 2 +- include/net/sock.h | 3 + include/net/tcp.h | 32 +- include/trace/events/timer.h | 6 +- include/uapi/linux/affs_hardblocks.h | 68 +- include/uapi/linux/auto_dev-ioctl.h | 2 +- include/uapi/linux/videodev2.h | 2 +- io_uring/io_uring.c | 66 +- kernel/bpf/bpf_lru_list.c | 21 +- kernel/bpf/bpf_lru_list.h | 7 +- kernel/bpf/cgroup.c | 46 ++ kernel/kcsan/core.c | 2 + kernel/kexec_core.c | 5 +- kernel/rcu/rcuscale.c | 214 +++---- kernel/rcu/tasks.h | 37 +- kernel/sched/fair.c | 2 +- kernel/time/posix-timers.c | 74 ++- kernel/trace/ftrace.c | 72 ++- kernel/trace/ring_buffer.c | 24 +- kernel/trace/trace.c | 3 +- kernel/trace/trace_events_hist.c | 9 +- kernel/trace/trace_probe_tmpl.h | 2 + kernel/watchdog_hld.c | 6 +- kernel/workqueue.c | 13 +- lib/debugobjects.c | 9 + lib/test_firmware.c | 12 +- lib/ts_bm.c | 4 +- mm/shmem.c | 2 +- net/bridge/br_if.c | 5 +- net/bridge/br_stp_if.c | 3 + net/can/bcm.c | 12 +- net/can/isotp.c | 5 +- net/core/devlink.c | 5 +- net/core/rtnetlink.c | 104 ++-- net/core/skbuff.c | 5 + net/core/sock.c | 17 +- net/dsa/tag_sja1105.c | 4 +- net/ipv4/esp4.c | 2 +- net/ipv4/inet_connection_sock.c | 3 +- net/ipv4/inet_hashtables.c | 17 +- net/ipv4/inet_timewait_sock.c | 8 +- net/ipv4/sysctl_net_ipv4.c | 9 + net/ipv4/tcp.c | 68 +- net/ipv4/tcp_fastopen.c | 6 +- net/ipv4/tcp_input.c | 12 +- net/ipv4/tcp_ipv4.c | 3 +- net/ipv4/tcp_minisocks.c | 9 +- net/ipv4/tcp_output.c | 2 +- net/ipv4/tcp_timer.c | 10 +- net/ipv6/addrconf.c | 3 +- net/ipv6/icmp.c | 5 +- net/ipv6/ip6_gre.c | 3 +- net/ipv6/tcp_ipv6.c | 3 +- net/ipv6/udp.c | 2 +- net/llc/llc_input.c | 3 - net/netfilter/nf_conntrack_helper.c | 4 + net/netfilter/nf_conntrack_proto_dccp.c | 52 +- net/netfilter/nf_conntrack_sip.c | 2 +- net/netfilter/nf_tables_api.c | 681 +++++++++++++++------ net/netfilter/nf_tables_offload.c | 30 +- net/netfilter/nft_byteorder.c | 14 +- net/netfilter/nft_chain_filter.c | 11 +- net/netfilter/nft_dynset.c | 6 +- net/netfilter/nft_immediate.c | 90 ++- net/netfilter/nft_set_bitmap.c | 5 +- net/netfilter/nft_set_hash.c | 23 +- net/netfilter/nft_set_pipapo.c | 20 +- net/netfilter/nft_set_rbtree.c | 5 +- net/netlink/af_netlink.c | 5 +- net/netlink/diag.c | 7 +- net/nfc/core.c | 4 +- net/nfc/hci/llc_shdlc.c | 10 +- net/nfc/llcp.h | 9 +- net/nfc/llcp_commands.c | 59 +- net/nfc/llcp_core.c | 95 ++- net/nfc/llcp_sock.c | 21 +- net/nfc/netlink.c | 20 +- net/nfc/nfc.h | 3 +- net/sched/act_pedit.c | 1 + net/sched/cls_flower.c | 10 + net/sched/cls_fw.c | 10 +- net/sched/sch_qfq.c | 41 +- net/sctp/socket.c | 22 +- net/socket.c | 3 + net/sunrpc/svcsock.c | 23 +- net/wireless/scan.c | 217 ++++--- net/wireless/wext-core.c | 6 + net/xdp/xsk.c | 5 + samples/bpf/tcp_basertt_kern.c | 2 +- samples/ftrace/ftrace-direct-too.c | 14 +- scripts/mod/modpost.c | 26 +- scripts/tags.sh | 9 +- security/apparmor/policy_unpack.c | 9 +- security/integrity/evm/evm_main.c | 2 + security/integrity/iint.c | 15 +- security/integrity/ima/ima_modsig.c | 3 + security/integrity/ima/ima_policy.c | 3 +- security/keys/request_key.c | 35 +- security/keys/trusted-keys/trusted_tpm2.c | 2 +- sound/core/jack.c | 15 +- sound/pci/ac97/ac97_codec.c | 4 +- sound/pci/hda/patch_realtek.c | 28 +- sound/soc/codecs/es8316.c | 23 +- sound/soc/fsl/fsl_sai.c | 2 +- sound/soc/fsl/fsl_sai.h | 1 + sound/soc/fsl/imx-audmix.c | 9 + sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 13 +- tools/bpf/bpftool/feature.c | 24 +- tools/include/uapi/linux/tcp.h | 357 +++++++++++ tools/lib/bpf/bpf_helpers.h | 15 +- tools/perf/builtin-bench.c | 7 +- tools/perf/builtin-script.c | 34 +- tools/perf/tests/builtin-test.c | 3 + .../tests/shell/test_uprobe_from_different_cu.sh | 77 +++ tools/perf/util/dwarf-aux.c | 2 +- .../testing/selftests/bpf/prog_tests/bpf_tcp_ca.c | 1 + .../selftests/bpf/prog_tests/cls_redirect.c | 1 + .../selftests/bpf/prog_tests/sockmap_basic.c | 1 + .../testing/selftests/bpf/prog_tests/sockopt_sk.c | 28 + tools/testing/selftests/bpf/progs/sockopt_sk.c | 23 +- tools/testing/selftests/bpf/test_progs.h | 1 - tools/testing/selftests/bpf/test_verifier.c | 12 +- tools/testing/selftests/bpf/verifier/spill_fill.c | 30 + tools/testing/selftests/net/rtnetlink.sh | 1 + tools/testing/selftests/tc-testing/config | 1 + tools/testing/selftests/tc-testing/settings | 1 + tools/testing/selftests/wireguard/netns.sh | 30 +- 522 files changed, 5604 insertions(+), 2683 deletions(-).