History

Merge tag 'slab-for-6.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab

Pull slab fix from Vlastimil Babka: - Fix for potential infinite loop in kmalloc_nolock() when debugging is enabled for the cache (Vlastimil Babka) * tag 'slab-for-6.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: slab: prevent infinite loop in kmalloc_nolock() with debugging

Linus Torvalds committed 1 year ago

Commit a80abfb2 parents 9dc5206 c379b741 file · +5 −1Browse files

Unified · Split

mm/slub.c+5−1
@@ -4666,8 +4666,12 @@ new_objects: · 4665 unmodified lines
46664666 if (kmem_cache_debug(s)) {
46674667 freelist = alloc_single_from_new_slab(s, slab, orig_size, gfpflags);
46684668
4669− if (unlikely(!freelist))
4669+ if (unlikely(!freelist)) {
4670+ /* This could cause an endless loop. Fail instead. */
4671+ if (!allow_spin)
4672+ return NULL;
46704673 goto new_objects;
4674+ }
46714675
46724676 if (s->flags & SLAB_STORE_USER)
46734677 set_track(s, freelist, TRACK_ALLOC, addr,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t