mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
Merge "mm: swap: Add null pointer check"
This commit is contained in:
commit
57d8056ef9
1 changed files with 1 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue