lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <16be9b63-5325-771f-25dd-7fd9e0c67866@oracle.com>
Date:   Sat, 25 Mar 2017 14:35:53 -0700
From:   Mike Kravetz <mike.kravetz@...cle.com>
To:     Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc:     dvyukov@...gle.com, mhocko@...e.com, hillf.zj@...baba-inc.com,
        dave.hansen@...ux.intel.com, akpm@...ux-foundation.org
Subject: Re: [PATCH] hugetlbfs: initialize shared policy as part of inode
 allocation

On 03/24/2017 05:54 PM, Tetsuo Handa wrote:
> Mike Kravetz wrote:
>> Any time after inode allocation, destroy_inode can be called.  The
>> hugetlbfs inode contains a shared_policy structure, and
>> mpol_free_shared_policy is unconditionally called as part of
>> hugetlbfs_destroy_inode.  Initialize the policy as part of inode
>> allocation so that any quick (error path) calls to destroy_inode
>> will be handed an initialized policy.
> 
> I think you can as well do
> 
> -		struct hugetlbfs_inode_info *info;
> -		info = HUGETLBFS_I(inode);
> -		mpol_shared_policy_init(&info->policy, NULL);
> 
> in hugetlbfs_get_root().

Thank you.  You are correct.
After doing shared policy initialization at inode allocation time,
it is redundant here.

I will send v2 patch with this modification.

-- 
Mike Kravetz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ