diff options
author | Christoph Hellwig <hch@lst.de> | 2019-06-26 14:27:08 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-07-02 19:32:44 +0200 |
commit | 1e240e8d4a7d92232b6214e02a0a4197a53afd6c (patch) | |
tree | 79627ced555b058e23eedd971352ee51918e5dcd /drivers/dax/pmem | |
parent | memremap: validate the pagemap type passed to devm_memremap_pages (diff) | |
download | linux-1e240e8d4a7d92232b6214e02a0a4197a53afd6c.tar.xz linux-1e240e8d4a7d92232b6214e02a0a4197a53afd6c.zip |
memremap: move dev_pagemap callbacks into a separate structure
The dev_pagemap is a growing too many callbacks. Move them into a
separate ops structure so that they are not duplicated for multiple
instances, and an attacker can't easily overwrite them.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Tested-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/dax/pmem')
-rw-r--r-- | drivers/dax/pmem/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dax/pmem/core.c b/drivers/dax/pmem/core.c index f9f51786d556..6eb6dfdf19bf 100644 --- a/drivers/dax/pmem/core.c +++ b/drivers/dax/pmem/core.c @@ -16,7 +16,7 @@ struct dev_dax *__dax_pmem_probe(struct device *dev, enum dev_dax_subsys subsys) struct dev_dax *dev_dax; struct nd_namespace_io *nsio; struct dax_region *dax_region; - struct dev_pagemap pgmap = { 0 }; + struct dev_pagemap pgmap = { }; struct nd_namespace_common *ndns; struct nd_dax *nd_dax = to_nd_dax(dev); struct nd_pfn *nd_pfn = &nd_dax->nd_pfn; |