diff options
| author | Jonathan Corbet <corbet@lwn.net> | 2024-09-05 14:01:38 -0600 |
|---|---|---|
| committer | Jonathan Corbet <corbet@lwn.net> | 2024-09-05 14:01:38 -0600 |
| commit | d224338aa105bf3c4c4aa8b2ccdbd675c71ffbfe (patch) | |
| tree | b7b6b8c98595c89f7ad5307120cb3156708991bc /kernel/padata.c | |
| parent | docs: submitting-patches: Advertise b4 (diff) | |
| parent | Linux 6.11-rc6 (diff) | |
| download | linux-d224338aa105bf3c4c4aa8b2ccdbd675c71ffbfe.tar.gz linux-d224338aa105bf3c4c4aa8b2ccdbd675c71ffbfe.zip | |
Merge tag 'v6.11-rc6' into docs-mw
This is done primarily to get a docs build fix merged via another tree so
that "make htmldocs" stops failing.
Diffstat (limited to 'kernel/padata.c')
| -rw-r--r-- | kernel/padata.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/padata.c b/kernel/padata.c index 53f4bc912712..0fa6c2895460 100644 --- a/kernel/padata.c +++ b/kernel/padata.c @@ -517,6 +517,13 @@ void __init padata_do_multithreaded(struct padata_mt_job *job) ps.chunk_size = max(ps.chunk_size, job->min_chunk); ps.chunk_size = roundup(ps.chunk_size, job->align); + /* + * chunk_size can be 0 if the caller sets min_chunk to 0. So force it + * to at least 1 to prevent divide-by-0 panic in padata_mt_helper().` + */ + if (!ps.chunk_size) + ps.chunk_size = 1U; + list_for_each_entry(pw, &works, pw_list) if (job->numa_aware) { int old_node = atomic_read(&last_used_nid); |
