Skip to content

Commit b4f7f01

Browse files
committed
Merge tag 's390-6.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Heiko Carstens: - Use correct locking in zPCI event code to avoid deadlock - Get rid of irqs_registered flag in zpci_dev structure and restore IRQ unconditionally for zPCI devices. This fixes sit uations where the flag was not correctly updated - Fix potential memory leak kernel page table dumper code - Disable (revert) ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP for s390 again. The optimized hugetlb vmemmap code modifies kernel page tables in a way which does not work on s390 and leads to reproducible kernel crashes due to stale TLB entries. This needs to be addressed with some larger changes. For now simply disable the feature - Update defconfigs * tag 's390-6.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: Disable ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP s390/mm: Fix memory leak in add_marker() when kvrealloc() fails s390/pci: Restore IRQ unconditionally for the zPCI device s390: Update defconfigs s390/pci: Avoid deadlock between PCI error recovery and mlx5 crdump
2 parents b909d77 + 64e2f60 commit b4f7f01

File tree

8 files changed

+29
-36
lines changed

8 files changed

+29
-36
lines changed

arch/s390/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ config S390
158158
select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
159159
select ARCH_WANT_KERNEL_PMD_MKWRITE
160160
select ARCH_WANT_LD_ORPHAN_WARN
161-
select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
162161
select ARCH_WANTS_THP_SWAP
163162
select BUILDTIME_TABLE_SORT
164163
select CLONE_BACKWARDS2

arch/s390/configs/debug_defconfig

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ CONFIG_SLUB_STATS=y
101101
CONFIG_MEMORY_HOTPLUG=y
102102
CONFIG_MEMORY_HOTREMOVE=y
103103
CONFIG_KSM=y
104+
CONFIG_PERSISTENT_HUGE_ZERO_FOLIO=y
104105
CONFIG_TRANSPARENT_HUGEPAGE=y
105106
CONFIG_CMA_DEBUGFS=y
106107
CONFIG_CMA_SYSFS=y
@@ -123,12 +124,12 @@ CONFIG_TLS_DEVICE=y
123124
CONFIG_TLS_TOE=y
124125
CONFIG_XFRM_USER=m
125126
CONFIG_NET_KEY=m
126-
CONFIG_XDP_SOCKETS=y
127-
CONFIG_XDP_SOCKETS_DIAG=m
128-
CONFIG_DIBS=y
129-
CONFIG_DIBS_LO=y
130127
CONFIG_SMC=m
131128
CONFIG_SMC_DIAG=m
129+
CONFIG_DIBS=y
130+
CONFIG_DIBS_LO=y
131+
CONFIG_XDP_SOCKETS=y
132+
CONFIG_XDP_SOCKETS_DIAG=m
132133
CONFIG_INET=y
133134
CONFIG_IP_MULTICAST=y
134135
CONFIG_IP_ADVANCED_ROUTER=y
@@ -472,6 +473,7 @@ CONFIG_SCSI_DH_EMC=m
472473
CONFIG_SCSI_DH_ALUA=m
473474
CONFIG_MD=y
474475
CONFIG_BLK_DEV_MD=y
476+
CONFIG_MD_LLBITMAP=y
475477
# CONFIG_MD_BITMAP_FILE is not set
476478
CONFIG_MD_LINEAR=m
477479
CONFIG_MD_CLUSTER=m
@@ -654,9 +656,12 @@ CONFIG_JFS_POSIX_ACL=y
654656
CONFIG_JFS_SECURITY=y
655657
CONFIG_JFS_STATISTICS=y
656658
CONFIG_XFS_FS=y
659+
CONFIG_XFS_SUPPORT_V4=y
660+
CONFIG_XFS_SUPPORT_ASCII_CI=y
657661
CONFIG_XFS_QUOTA=y
658662
CONFIG_XFS_POSIX_ACL=y
659663
CONFIG_XFS_RT=y
664+
# CONFIG_XFS_ONLINE_SCRUB is not set
660665
CONFIG_XFS_DEBUG=y
661666
CONFIG_GFS2_FS=m
662667
CONFIG_GFS2_FS_LOCKING_DLM=y
@@ -666,7 +671,6 @@ CONFIG_BTRFS_FS_POSIX_ACL=y
666671
CONFIG_BTRFS_DEBUG=y
667672
CONFIG_BTRFS_ASSERT=y
668673
CONFIG_NILFS2_FS=m
669-
CONFIG_FS_DAX=y
670674
CONFIG_EXPORTFS_BLOCK_OPS=y
671675
CONFIG_FS_ENCRYPTION=y
672676
CONFIG_FS_VERITY=y

arch/s390/configs/defconfig

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ CONFIG_SLAB_BUCKETS=y
9494
CONFIG_MEMORY_HOTPLUG=y
9595
CONFIG_MEMORY_HOTREMOVE=y
9696
CONFIG_KSM=y
97+
CONFIG_PERSISTENT_HUGE_ZERO_FOLIO=y
9798
CONFIG_TRANSPARENT_HUGEPAGE=y
9899
CONFIG_CMA_SYSFS=y
99100
CONFIG_CMA_AREAS=7
@@ -114,12 +115,12 @@ CONFIG_TLS_DEVICE=y
114115
CONFIG_TLS_TOE=y
115116
CONFIG_XFRM_USER=m
116117
CONFIG_NET_KEY=m
117-
CONFIG_XDP_SOCKETS=y
118-
CONFIG_XDP_SOCKETS_DIAG=m
119-
CONFIG_DIBS=y
120-
CONFIG_DIBS_LO=y
121118
CONFIG_SMC=m
122119
CONFIG_SMC_DIAG=m
120+
CONFIG_DIBS=y
121+
CONFIG_DIBS_LO=y
122+
CONFIG_XDP_SOCKETS=y
123+
CONFIG_XDP_SOCKETS_DIAG=m
123124
CONFIG_INET=y
124125
CONFIG_IP_MULTICAST=y
125126
CONFIG_IP_ADVANCED_ROUTER=y
@@ -462,6 +463,7 @@ CONFIG_SCSI_DH_EMC=m
462463
CONFIG_SCSI_DH_ALUA=m
463464
CONFIG_MD=y
464465
CONFIG_BLK_DEV_MD=y
466+
CONFIG_MD_LLBITMAP=y
465467
# CONFIG_MD_BITMAP_FILE is not set
466468
CONFIG_MD_LINEAR=m
467469
CONFIG_MD_CLUSTER=m
@@ -644,16 +646,18 @@ CONFIG_JFS_POSIX_ACL=y
644646
CONFIG_JFS_SECURITY=y
645647
CONFIG_JFS_STATISTICS=y
646648
CONFIG_XFS_FS=y
649+
CONFIG_XFS_SUPPORT_V4=y
650+
CONFIG_XFS_SUPPORT_ASCII_CI=y
647651
CONFIG_XFS_QUOTA=y
648652
CONFIG_XFS_POSIX_ACL=y
649653
CONFIG_XFS_RT=y
654+
# CONFIG_XFS_ONLINE_SCRUB is not set
650655
CONFIG_GFS2_FS=m
651656
CONFIG_GFS2_FS_LOCKING_DLM=y
652657
CONFIG_OCFS2_FS=m
653658
CONFIG_BTRFS_FS=y
654659
CONFIG_BTRFS_FS_POSIX_ACL=y
655660
CONFIG_NILFS2_FS=m
656-
CONFIG_FS_DAX=y
657661
CONFIG_EXPORTFS_BLOCK_OPS=y
658662
CONFIG_FS_ENCRYPTION=y
659663
CONFIG_FS_VERITY=y

arch/s390/configs/zfcpdump_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ CONFIG_NET=y
3333
CONFIG_DEVTMPFS=y
3434
CONFIG_DEVTMPFS_SAFE=y
3535
CONFIG_BLK_DEV_RAM=y
36-
# CONFIG_DCSSBLK is not set
3736
# CONFIG_DASD is not set
3837
CONFIG_ENCLOSURE_SERVICES=y
3938
CONFIG_SCSI=y

arch/s390/include/asm/pci.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ struct zpci_dev {
145145
u8 has_resources : 1;
146146
u8 is_physfn : 1;
147147
u8 util_str_avail : 1;
148-
u8 irqs_registered : 1;
149148
u8 tid_avail : 1;
150149
u8 rtr_avail : 1; /* Relaxed translation allowed */
151150
unsigned int devfn; /* DEVFN part of the RID*/

arch/s390/mm/dump_pagetables.c

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -291,16 +291,14 @@ static int ptdump_cmp(const void *a, const void *b)
291291

292292
static int add_marker(unsigned long start, unsigned long end, const char *name)
293293
{
294-
size_t oldsize, newsize;
295-
296-
oldsize = markers_cnt * sizeof(*markers);
297-
newsize = oldsize + 2 * sizeof(*markers);
298-
if (!oldsize)
299-
markers = kvmalloc(newsize, GFP_KERNEL);
300-
else
301-
markers = kvrealloc(markers, newsize, GFP_KERNEL);
302-
if (!markers)
303-
goto error;
294+
struct addr_marker *new;
295+
size_t newsize;
296+
297+
newsize = (markers_cnt + 2) * sizeof(*markers);
298+
new = kvrealloc(markers, newsize, GFP_KERNEL);
299+
if (!new)
300+
return -ENOMEM;
301+
markers = new;
304302
markers[markers_cnt].is_start = 1;
305303
markers[markers_cnt].start_address = start;
306304
markers[markers_cnt].size = end - start;
@@ -312,9 +310,6 @@ static int add_marker(unsigned long start, unsigned long end, const char *name)
312310
markers[markers_cnt].name = name;
313311
markers_cnt++;
314312
return 0;
315-
error:
316-
markers_cnt = 0;
317-
return -ENOMEM;
318313
}
319314

320315
static int pt_dump_init(void)

arch/s390/pci/pci_event.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ static pci_ers_result_t zpci_event_attempt_error_recovery(struct pci_dev *pdev)
188188
* is unbound or probed and that userspace can't access its
189189
* configuration space while we perform recovery.
190190
*/
191-
pci_dev_lock(pdev);
191+
device_lock(&pdev->dev);
192192
if (pdev->error_state == pci_channel_io_perm_failure) {
193193
ers_res = PCI_ERS_RESULT_DISCONNECT;
194194
goto out_unlock;
@@ -257,7 +257,7 @@ static pci_ers_result_t zpci_event_attempt_error_recovery(struct pci_dev *pdev)
257257
driver->err_handler->resume(pdev);
258258
pci_uevent_ers(pdev, PCI_ERS_RESULT_RECOVERED);
259259
out_unlock:
260-
pci_dev_unlock(pdev);
260+
device_unlock(&pdev->dev);
261261
zpci_report_status(zdev, "recovery", status_str);
262262

263263
return ers_res;

arch/s390/pci/pci_irq.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ static int zpci_set_irq(struct zpci_dev *zdev)
107107
else
108108
rc = zpci_set_airq(zdev);
109109

110-
if (!rc)
111-
zdev->irqs_registered = 1;
112-
113110
return rc;
114111
}
115112

@@ -123,9 +120,6 @@ static int zpci_clear_irq(struct zpci_dev *zdev)
123120
else
124121
rc = zpci_clear_airq(zdev);
125122

126-
if (!rc)
127-
zdev->irqs_registered = 0;
128-
129123
return rc;
130124
}
131125

@@ -427,8 +421,7 @@ bool arch_restore_msi_irqs(struct pci_dev *pdev)
427421
{
428422
struct zpci_dev *zdev = to_zpci(pdev);
429423

430-
if (!zdev->irqs_registered)
431-
zpci_set_irq(zdev);
424+
zpci_set_irq(zdev);
432425
return true;
433426
}
434427

0 commit comments

Comments
 (0)