diff options
author | David S. Miller <davem@davemloft.net> | 2017-04-20 16:35:33 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-20 16:35:33 +0200 |
commit | 7b9f6da175f9387ebfc202f35e0d39514899ab19 (patch) | |
tree | a884c05aaeff40d8f80831549cccc820dcdd0f4f /drivers/nvdimm/claim.c | |
parent | net: cx89x0: move attribute declaration before struct keyword (diff) | |
parent | sh_eth: unmap DMA buffers when freeing rings (diff) | |
download | linux-7b9f6da175f9387ebfc202f35e0d39514899ab19.tar.xz linux-7b9f6da175f9387ebfc202f35e0d39514899ab19.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
A function in kernel/bpf/syscall.c which got a bug fix in 'net'
was moved to kernel/bpf/verifier.c in 'net-next'.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/nvdimm/claim.c')
-rw-r--r-- | drivers/nvdimm/claim.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/nvdimm/claim.c b/drivers/nvdimm/claim.c index b3323c0697f6..ca6d572c48fc 100644 --- a/drivers/nvdimm/claim.c +++ b/drivers/nvdimm/claim.c @@ -243,7 +243,15 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns, } if (unlikely(is_bad_pmem(&nsio->bb, sector, sz_align))) { - if (IS_ALIGNED(offset, 512) && IS_ALIGNED(size, 512)) { + /* + * FIXME: nsio_rw_bytes() may be called from atomic + * context in the btt case and nvdimm_clear_poison() + * takes a sleeping lock. Until the locking can be + * reworked this capability requires that the namespace + * is not claimed by btt. + */ + if (IS_ALIGNED(offset, 512) && IS_ALIGNED(size, 512) + && (!ndns->claim || !is_nd_btt(ndns->claim))) { long cleared; cleared = nvdimm_clear_poison(&ndns->dev, offset, size); |