Set bpo->bpo_object = 0 on close to allow retry
During spa_load the spl->spa_deferred_bpobj maybe be opened and closed multiple times. It's critical that when the object is closed the bpo->bpo_object is set to zero to indicate the object is closed. If it's not during spl_load_retry the spl->spa_deferred_bpobj can be closes twice resulting in a NULL deref. This appears to have been fixed upstream the same way.
This commit is contained in:
parent
b3c82b1b18
commit
3253b39fa6
|
@ -0,0 +1,10 @@
|
|||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Subject: [PATCH] fix bpobj_close
|
||||
|
||||
During spa_load the spl->spa_deferred_bpobj maybe be opened and closed
|
||||
multiple times. It's critical that when the object is closed the
|
||||
bpo->bpo_object is set to zero to indicate the object is closed.
|
||||
If it's not during spl_load_retry the spl->spa_deferred_bpobj can
|
||||
be closes twice resulting in a NULL deref.
|
||||
|
||||
This appears to have been fixed upstream the same way.
|
|
@ -140,6 +140,7 @@ bpobj_close(bpobj_t *bpo)
|
|||
bpo->bpo_dbuf = NULL;
|
||||
bpo->bpo_phys = NULL;
|
||||
bpo->bpo_cached_dbuf = NULL;
|
||||
bpo->bpo_object = 0;
|
||||
|
||||
mutex_destroy(&bpo->bpo_lock);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue