Skip to content

[rocky8_10] History rebuild for kernel-4.18.0-553.58.1.el8_10 #384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 53 commits into from
Jul 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
2b92079
security/keys: fix slab-out-of-bounds in key_task_permission
PlaidCat Jun 27, 2025
949da0e
cifs: fix double free race when mount fails in cifs_get_root()
PlaidCat Jun 27, 2025
6bd016b
smb: client: fix warning in cifs_smb3_do_mount()
PlaidCat Jun 27, 2025
d8d6896
s390/pci: rename lock member in struct zpci_dev
PlaidCat Jun 27, 2025
2590011
s390/pci: introduce lock to synchronize state of zpci_dev's
PlaidCat Jun 27, 2025
63104b2
s390/pci: remove hotplug slot when releasing the device
PlaidCat Jun 27, 2025
4b0e694
s390/pci: Fix potential double remove of hotplug slot
PlaidCat Jun 27, 2025
223f875
s390/pci: Fix missing check for zpci_create_device() error return
PlaidCat Jun 27, 2025
086841e
s390/pci: Fix duplicate pci_dev_put() in disable_slot() when PF has c…
PlaidCat Jun 27, 2025
07223ca
s390/pci: Remove redundant bus removal and disable from zpci_release_…
PlaidCat Jun 27, 2025
6b2bcc6
s390/pci: Prevent self deletion in disable_slot()
PlaidCat Jun 27, 2025
0eb23c1
s390/pci: Allow re-add of a reserved but not yet removed device
PlaidCat Jun 27, 2025
1e3532b
s390/pci: Serialize device addition and removal
PlaidCat Jun 27, 2025
ac85978
idpf: make virtchnl2.h self-contained
PlaidCat Jun 27, 2025
d6ef534
idpf: Interpret .set_channels() input differently
PlaidCat Jun 27, 2025
7863cd7
idpf: don't enable NAPI and interrupts prior to allocating Rx buffers
PlaidCat Jun 27, 2025
9e1a24d
idpf: stop using macros for accessing queue descriptors
PlaidCat Jun 27, 2025
85049fd
net: remove gfp_mask from napi_alloc_skb()
PlaidCat Jun 27, 2025
c3c1c14
idpf: remove legacy Page Pool Ethtool stats
PlaidCat Jun 27, 2025
27f5fbf
idpf: split &idpf_queue into 4 strictly-typed queue structures
PlaidCat Jun 27, 2025
5e7e557
idpf: avoid bloating &idpf_q_vector with big %NR_CPUS
PlaidCat Jun 27, 2025
aa35c23
idpf: merge singleq and splitq &net_device_ops
PlaidCat Jun 27, 2025
012ac8a
idpf: compile singleq code only under default-n CONFIG_IDPF_SINGLEQ
PlaidCat Jun 27, 2025
05ab4cd
idpf: fix memory leaks and crashes while performing a soft reset
PlaidCat Jun 27, 2025
c64728d
idpf: fix memleak in vport interrupt configuration
PlaidCat Jun 27, 2025
7188d78
idpf: fix UAFs when destroying the queues
PlaidCat Jun 27, 2025
4e139cf
idpf: fix netdev Tx queue stop/wake
PlaidCat Jun 27, 2025
a053968
idpf: avoid vport access in idpf_get_link_ksettings
PlaidCat Jun 27, 2025
d560396
idpf: fix idpf_vc_core_init error path
PlaidCat Jun 27, 2025
0f7c575
idpf: call set_real_num_queues in idpf_open
PlaidCat Jun 27, 2025
e7ce76e
idpf: use actual mbx receive payload length
PlaidCat Jun 27, 2025
cd0ad4b
idpf: deinit virtchnl transaction manager after vport and vectors
PlaidCat Jun 27, 2025
5b6a1ba
idpf: add read memory barrier when checking descriptor done bit
PlaidCat Jun 27, 2025
006feb0
idpf: fix transaction timeouts on reset
PlaidCat Jun 27, 2025
c557981
idpf: Acquire the lock before accessing the xn->salt
PlaidCat Jun 27, 2025
1749269
idpf: convert workqueues to unbound
PlaidCat Jun 27, 2025
dd47c6b
idpf: add more info during virtchnl transaction timeout/salt mismatch
PlaidCat Jun 27, 2025
b228e7d
idpf: fix handling rsc packet with a single segment
PlaidCat Jun 27, 2025
60dd9c3
idpf: fix checksums set in idpf_rx_rsc()
PlaidCat Jun 27, 2025
8bce3d7
idpf: fix adapter NULL pointer dereference on reboot
PlaidCat Jun 27, 2025
09bd574
idpf: fix offloads support for encapsulated packets
PlaidCat Jun 27, 2025
3ac747e
idpf: fix potential memory leak on kcalloc() failure
PlaidCat Jun 27, 2025
cb28197
idpf: protect shutdown from reset
PlaidCat Jun 27, 2025
740c452
idpf: fix null-ptr-deref in idpf_features_check
PlaidCat Jun 27, 2025
f286fee
idpf: fix idpf_vport_splitq_napi_poll()
PlaidCat Jun 27, 2025
de41e80
idpf: fix a race in txq wakeup
PlaidCat Jun 27, 2025
b31692e
idpf: avoid mailbox timeout delays during reset
PlaidCat Jun 27, 2025
b93e9c7
idpf: check error for register_netdev() on init
PlaidCat Jun 27, 2025
6510a3d
net: treat possible_net_t net pointer as an RCU one and add read_pnet…
PlaidCat Jun 27, 2025
c92854d
net: add dev_net_rcu() helper
PlaidCat Jun 27, 2025
59ff24e
ipv6: use RCU protection in ip6_default_advmss()
PlaidCat Jun 27, 2025
77874c7
ndisc: use RCU protection in ndisc_alloc_skb()
PlaidCat Jun 27, 2025
2e416d1
Rebuild rocky8_10 with kernel-4.18.0-553.58.1.el8_10
PlaidCat Jun 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.rhelver
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RHEL_MINOR = 10
#
# Use this spot to avoid future merge conflicts.
# Do not trim this comment.
RHEL_RELEASE = 553.56.1
RHEL_RELEASE = 553.58.1

#
# ZSTREAM
Expand Down
3 changes: 2 additions & 1 deletion arch/s390/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ struct zpci_dev {
struct kref kref;
struct hotplug_slot hotplug_slot;

struct mutex state_lock; /* protect state changes */
enum zpci_state state;
u32 fid; /* function ID, used by sclp */
u32 fh; /* function handle, used by insn's */
Expand All @@ -146,7 +147,6 @@ struct zpci_dev {
u8 reserved : 1;
unsigned int devfn; /* DEVFN part of the RID*/

struct mutex lock;
u8 pfip[CLP_PFIP_NR_SEGMENTS]; /* pci function internal path */
u32 uid; /* user defined id */
u8 util_str[CLP_UTIL_STR_LEN]; /* utility string */
Expand Down Expand Up @@ -182,6 +182,7 @@ struct zpci_dev {
u64 dma_mask; /* DMA address space mask */

/* Function measurement block */
struct mutex fmb_lock;
struct zpci_fmb *fmb;
u16 fmb_update; /* update interval */
u16 fmb_length;
Expand Down
89 changes: 45 additions & 44 deletions arch/s390/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
/* list of all detected zpci devices */
static LIST_HEAD(zpci_list);
static DEFINE_SPINLOCK(zpci_list_lock);
static DEFINE_MUTEX(zpci_add_remove_lock);

static DECLARE_BITMAP(zpci_domain, ZPCI_DOMAIN_BITMAP_SIZE);
static DEFINE_SPINLOCK(zpci_domain_lock);
Expand All @@ -67,6 +68,15 @@ EXPORT_SYMBOL_GPL(zpci_aipb);
struct airq_iv *zpci_aif_sbv;
EXPORT_SYMBOL_GPL(zpci_aif_sbv);

void zpci_zdev_put(struct zpci_dev *zdev)
{
if (!zdev)
return;
mutex_lock(&zpci_add_remove_lock);
kref_put_lock(&zdev->kref, zpci_release_device, &zpci_list_lock);
mutex_unlock(&zpci_add_remove_lock);
}

struct zpci_dev *get_zdev_by_fid(u32 fid)
{
struct zpci_dev *tmp, *zdev = NULL;
Expand Down Expand Up @@ -808,12 +818,12 @@ EXPORT_SYMBOL_GPL(zpci_disable_device);
* equivalent to its state during boot when first probing a driver.
* Consequently after reset the PCI function requires re-initialization via the
* common PCI code including re-enabling IRQs via pci_alloc_irq_vectors()
* and enabling the function via e.g.pci_enablde_device_flags().The caller
* and enabling the function via e.g. pci_enable_device_flags(). The caller
* must guard against concurrent reset attempts.
*
* In most cases this function should not be called directly but through
* pci_reset_function() or pci_reset_bus() which handle the save/restore and
* locking.
* locking - asserted by lockdep.
*
* Return: 0 on success and an error value otherwise
*/
Expand All @@ -822,6 +832,7 @@ int zpci_hot_reset_device(struct zpci_dev *zdev)
u8 status;
int rc;

lockdep_assert_held(&zdev->state_lock);
zpci_dbg(3, "rst fid:%x, fh:%x\n", zdev->fid, zdev->fh);
if (zdev_enabled(zdev)) {
/* Disables device access, DMAs and IRQs (reset state) */
Expand Down Expand Up @@ -885,7 +896,8 @@ struct zpci_dev *zpci_create_device(u32 fid, u32 fh, enum zpci_state state)
goto error;
zdev->state = state;

mutex_init(&zdev->lock);
mutex_init(&zdev->state_lock);
mutex_init(&zdev->fmb_lock);
mutex_init(&zdev->kzdev_lock);

return zdev;
Expand All @@ -911,6 +923,7 @@ int zpci_add_device(struct zpci_dev *zdev)
{
int rc;

mutex_lock(&zpci_add_remove_lock);
zpci_dbg(1, "add fid:%x, fh:%x, c:%d\n", zdev->fid, zdev->fh, zdev->state);
rc = zpci_init_iommu(zdev);
if (rc)
Expand All @@ -924,12 +937,14 @@ int zpci_add_device(struct zpci_dev *zdev)
spin_lock(&zpci_list_lock);
list_add_tail(&zdev->entry, &zpci_list);
spin_unlock(&zpci_list_lock);
mutex_unlock(&zpci_add_remove_lock);
return 0;

error_destroy_iommu:
zpci_destroy_iommu(zdev);
error:
zpci_dbg(0, "add fid:%x, rc:%d\n", zdev->fid, rc);
mutex_unlock(&zpci_add_remove_lock);
return rc;
}

Expand All @@ -946,23 +961,20 @@ bool zpci_is_device_configured(struct zpci_dev *zdev)
* @zdev: the zpci_dev that was reserved
*
* Handle the case that a given zPCI function was reserved by another system.
* After a call to this function the zpci_dev can not be found via
* get_zdev_by_fid() anymore but may still be accessible via existing
* references though it will not be functional anymore.
*/
void zpci_device_reserved(struct zpci_dev *zdev)
{
if (zdev->has_hp_slot)
zpci_exit_slot(zdev);
/*
* Remove device from zpci_list as it is going away. This also
* makes sure we ignore subsequent zPCI events for this device.
*/
spin_lock(&zpci_list_lock);
list_del(&zdev->entry);
spin_unlock(&zpci_list_lock);
lockdep_assert_held(&zdev->state_lock);
/* We may declare the device reserved multiple times */
if (zdev->state == ZPCI_FN_STATE_RESERVED)
return;
zdev->state = ZPCI_FN_STATE_RESERVED;
zpci_dbg(3, "rsv fid:%x\n", zdev->fid);
/*
* The underlying device is gone. Allow the zdev to be freed
* as soon as all other references are gone by accounting for
* the removal as a dropped reference.
*/
zpci_zdev_put(zdev);
}

Expand Down Expand Up @@ -997,6 +1009,10 @@ int zpci_deconfigure_device(struct zpci_dev *zdev)
{
int rc;

lockdep_assert_held(&zdev->state_lock);
if (zdev->state != ZPCI_FN_STATE_CONFIGURED)
return 0;

if (zdev->zbus->bus)
zpci_bus_remove_device(zdev, false);

Expand All @@ -1023,39 +1039,24 @@ int zpci_deconfigure_device(struct zpci_dev *zdev)
void zpci_release_device(struct kref *kref)
{
struct zpci_dev *zdev = container_of(kref, struct zpci_dev, kref);
int ret;

if (zdev->zbus->bus)
zpci_bus_remove_device(zdev, false);
lockdep_assert_held(&zpci_add_remove_lock);
WARN_ON(zdev->state != ZPCI_FN_STATE_RESERVED);
/*
* We already hold zpci_list_lock thanks to kref_put_lock().
* This makes sure no new reference can be taken from the list.
*/
list_del(&zdev->entry);
spin_unlock(&zpci_list_lock);

if (zdev->dma_table)
zpci_dma_exit_device(zdev);
if (zdev_enabled(zdev))
zpci_disable_device(zdev);
if (zdev->has_hp_slot)
zpci_exit_slot(zdev);

switch (zdev->state) {
case ZPCI_FN_STATE_CONFIGURED:
ret = sclp_pci_deconfigure(zdev->fid);
zpci_dbg(3, "deconf fid:%x, rc:%d\n", zdev->fid, ret);
fallthrough;
case ZPCI_FN_STATE_STANDBY:
if (zdev->has_hp_slot)
zpci_exit_slot(zdev);
spin_lock(&zpci_list_lock);
list_del(&zdev->entry);
spin_unlock(&zpci_list_lock);
zpci_dbg(3, "rsv fid:%x\n", zdev->fid);
fallthrough;
case ZPCI_FN_STATE_RESERVED:
if (zdev->has_resources)
zpci_cleanup_bus_resources(zdev);
zpci_bus_device_unregister(zdev);
zpci_destroy_iommu(zdev);
/* fallthrough */
default:
break;
}
if (zdev->has_resources)
zpci_cleanup_bus_resources(zdev);

zpci_bus_device_unregister(zdev);
zpci_destroy_iommu(zdev);
zpci_dbg(3, "rem fid:%x\n", zdev->fid);
kfree(zdev);
}
Expand Down
7 changes: 2 additions & 5 deletions arch/s390/pci/pci_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ int zpci_bus_scan_device(struct zpci_dev *zdev);
void zpci_bus_remove_device(struct zpci_dev *zdev, bool set_error);

void zpci_release_device(struct kref *kref);
static inline void zpci_zdev_put(struct zpci_dev *zdev)
{
if (zdev)
kref_put(&zdev->kref, zpci_release_device);
}

void zpci_zdev_put(struct zpci_dev *zdev);

static inline void zpci_zdev_get(struct zpci_dev *zdev)
{
Expand Down
2 changes: 2 additions & 0 deletions arch/s390/pci/pci_clp.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ static void __clp_add(struct clp_fh_list_entry *entry, void *data)
return;
}
zdev = zpci_create_device(entry->fid, entry->fh, entry->config_state);
if (IS_ERR(zdev))
return;
list_add_tail(&zdev->entry, scan_list);
}

Expand Down
10 changes: 5 additions & 5 deletions arch/s390/pci/pci_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ static int pci_perf_show(struct seq_file *m, void *v)
if (!zdev)
return 0;

mutex_lock(&zdev->lock);
mutex_lock(&zdev->fmb_lock);
if (!zdev->fmb) {
mutex_unlock(&zdev->lock);
mutex_unlock(&zdev->fmb_lock);
seq_puts(m, "FMB statistics disabled\n");
return 0;
}
Expand Down Expand Up @@ -124,7 +124,7 @@ static int pci_perf_show(struct seq_file *m, void *v)
}

pci_sw_counter_show(m);
mutex_unlock(&zdev->lock);
mutex_unlock(&zdev->fmb_lock);
return 0;
}

Expand All @@ -142,7 +142,7 @@ static ssize_t pci_perf_seq_write(struct file *file, const char __user *ubuf,
if (rc)
return rc;

mutex_lock(&zdev->lock);
mutex_lock(&zdev->fmb_lock);
switch (val) {
case 0:
rc = zpci_fmb_disable_device(zdev);
Expand All @@ -151,7 +151,7 @@ static ssize_t pci_perf_seq_write(struct file *file, const char __user *ubuf,
rc = zpci_fmb_enable_device(zdev);
break;
}
mutex_unlock(&zdev->lock);
mutex_unlock(&zdev->fmb_lock);
return rc ? rc : count;
}

Expand Down
33 changes: 31 additions & 2 deletions arch/s390/pci/pci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ static void __zpci_event_error(struct zpci_ccdf_err *ccdf)
zpci_err_hex(ccdf, sizeof(*ccdf));

if (zdev) {
mutex_lock(&zdev->state_lock);
zpci_update_fh(zdev, ccdf->fh);
if (zdev->zbus->bus)
pdev = pci_get_slot(zdev->zbus->bus, zdev->devfn);
Expand Down Expand Up @@ -288,6 +289,8 @@ static void __zpci_event_error(struct zpci_ccdf_err *ccdf)
}
pci_dev_put(pdev);
no_pdev:
if (zdev)
mutex_unlock(&zdev->state_lock);
zpci_zdev_put(zdev);
}

Expand All @@ -314,6 +317,22 @@ static void zpci_event_hard_deconfigured(struct zpci_dev *zdev, u32 fh)
zdev->state = ZPCI_FN_STATE_STANDBY;
}

static void zpci_event_reappear(struct zpci_dev *zdev)
{
lockdep_assert_held(&zdev->state_lock);
/*
* The zdev is in the reserved state. This means that it was presumed to
* go away but there are still undropped references. Now, the platform
* announced its availability again. Bring back the lingering zdev
* to standby. This is safe because we hold a temporary reference
* now so that it won't go away. Account for the re-appearance of the
* underlying device by incrementing the reference count.
*/
zdev->state = ZPCI_FN_STATE_STANDBY;
zpci_zdev_get(zdev);
zpci_dbg(1, "rea fid:%x, fh:%x\n", zdev->fid, zdev->fh);
}

static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
{
struct zpci_dev *zdev = get_zdev_by_fid(ccdf->fid);
Expand All @@ -322,6 +341,10 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)

zpci_dbg(3, "avl fid:%x, fh:%x, pec:%x\n",
ccdf->fid, ccdf->fh, ccdf->pec);

if (existing_zdev)
mutex_lock(&zdev->state_lock);

switch (ccdf->pec) {
case 0x0301: /* Reserved|Standby -> Configured */
if (!zdev) {
Expand All @@ -333,8 +356,10 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
break;
}
} else {
if (zdev->state == ZPCI_FN_STATE_RESERVED)
zpci_event_reappear(zdev);
/* the configuration request may be stale */
if (zdev->state != ZPCI_FN_STATE_STANDBY)
else if (zdev->state != ZPCI_FN_STATE_STANDBY)
break;
zdev->state = ZPCI_FN_STATE_CONFIGURED;
}
Expand All @@ -350,6 +375,8 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
break;
}
} else {
if (zdev->state == ZPCI_FN_STATE_RESERVED)
zpci_event_reappear(zdev);
zpci_update_fh(zdev, ccdf->fh);
}
break;
Expand Down Expand Up @@ -390,8 +417,10 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
default:
break;
}
if (existing_zdev)
if (existing_zdev) {
mutex_unlock(&zdev->state_lock);
zpci_zdev_put(zdev);
}
}

void zpci_event_availability(void *data)
Expand Down
Loading