Re: [PATCH] dax: Release PMD lock even when there is no PMD support in DAX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/18/2018 03:07 PM, Matthew Wilcox wrote:
> On Thu, Jan 18, 2018 at 02:38:39PM +0100, Jan H. Schönherr wrote:
>> The function follow_pte_pmd() can theoretically return after having
>> acquired a PMD lock, even when DAX was not compiled with
>> CONFIG_FS_DAX_PMD.
> 
> I don't think it can.  How would a PMD entry get into a DAX VMA if we
> compiled the kernel without CONFIG_FS_DAX_PMD?
> 

Maybe it can not in happy cases. But the PMD parts in follow_pte_pmd() are compiled in
unconditionally. So, if there's an issue elsewhere, and for some weird reason we get a PMD entry
in the page table, it would screw the lock balance.

I haven't run into an actual issue with this, it's just supposed to be defensive.

Regards
Jan






[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux