Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm

Pull libnvdimm fix from Dan Williams:
"We expanded the device-dax fs type in 4.12 to be a generic provider of
a struct dax_device with an embedded inode. However, Sasha found some
basic negative testing was not run to verify that this fs cleanly
handles being mounted directly.

Note that the fresh rebase was done to remove an unnecessary Cc:
<stable> tag, but this commit otherwise had a build success
notification from the 0day robot."

* 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
device-dax: fix 'dax' device filesystem inode destruction crash

+7 -2
+7 -2
drivers/dax/super.c
··· 210 210 static struct inode *dax_alloc_inode(struct super_block *sb) 211 211 { 212 212 struct dax_device *dax_dev; 213 + struct inode *inode; 213 214 214 215 dax_dev = kmem_cache_alloc(dax_cache, GFP_KERNEL); 215 - return &dax_dev->inode; 216 + inode = &dax_dev->inode; 217 + inode->i_rdev = 0; 218 + return inode; 216 219 } 217 220 218 221 static struct dax_device *to_dax_dev(struct inode *inode) ··· 230 227 231 228 kfree(dax_dev->host); 232 229 dax_dev->host = NULL; 233 - ida_simple_remove(&dax_minor_ida, MINOR(inode->i_rdev)); 230 + if (inode->i_rdev) 231 + ida_simple_remove(&dax_minor_ida, MINOR(inode->i_rdev)); 234 232 kmem_cache_free(dax_cache, dax_dev); 235 233 } 236 234 ··· 427 423 struct dax_device *dax_dev = _dax_dev; 428 424 struct inode *inode = &dax_dev->inode; 429 425 426 + memset(dax_dev, 0, sizeof(*dax_dev)); 430 427 inode_init_once(inode); 431 428 } 432 429