]> git.proxmox.com Git - mirror_spl.git/commit
Fix NULL deref in balance_pgdat()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 1 Nov 2011 20:35:12 +0000 (13:35 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 3 Nov 2011 16:50:22 +0000 (09:50 -0700)
commitb8b6e4c453929596b630fa1cca1ee26a532a2ab4
tree8da18ee0bd93b259a3f0366826f2ee11962adaf9
parent16952a68f25d55da21578f562b3813559fd01c6b
Fix NULL deref in balance_pgdat()

Be careful not to unconditionally clear the PF_MEMALLOC bit in
the task structure.  It may have already been set when entering
kv_alloc() in which case it must remain set on exit.  In
particular the kswapd thread will have PF_MEMALLOC set in
order to prevent it from entering direct reclaim.  By clearing
it we allow the following NULL deref to potentially occur.

  BUG: unable to handle kernel NULL pointer dereference at (null)
  IP: [<ffffffff8109c7ab>] balance_pgdat+0x25b/0x4ff

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes ZFS issue #287
module/spl/spl-kmem.c