Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57d8056e authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm: swap: Add null pointer check"

parents 4dc9af7e 3890a7b5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -282,7 +282,7 @@ int free_swap_slot(swp_entry_t entry)

	si = swp_swap_info(entry);
	cache = raw_cpu_ptr(&swp_slots);
	if (!(si->flags & SWP_SYNCHRONOUS_IO) &&
	if ((si && !(si->flags & SWP_SYNCHRONOUS_IO)) &&
				use_swap_slot_cache && cache->slots_ret) {
		spin_lock_irq(&cache->free_lock);
		/* Swap slots cache may be deactivated before acquiring lock */