]> git.baikalelectronics.ru Git - kernel.git/commit
mm/swap: don't BUG_ON() due to uninitialized swap slot cache
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Mar 2017 02:00:47 +0000 (19:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Mar 2017 02:00:47 +0000 (19:00 -0700)
commite9028eccc7d8ca5c1971fe0e9c46e8b1ddc549e6
tree6a16a4ba7501718b26fc68ac16570272908dbbb5
parent68f41e61cc6718abcd26fb37e8402be77ce74948
mm/swap: don't BUG_ON() due to uninitialized swap slot cache

This BUG_ON() triggered for me once at shutdown, and I don't see a
reason for the check.  The code correctly checks whether the swap slot
cache is usable or not, so an uninitialized swap slot cache is not
actually problematic afaik.

I've temporarily just switched the BUG_ON() to a WARN_ON_ONCE(), since
I'm not sure why that seemingly pointless check was there.  I suspect
the real fix is to just remove it entirely, but for now we'll warn about
it but not bring the machine down.

Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/swap_slots.c