[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <87d18g5v6s.fsf@linux.vnet.ibm.com>
Date: Mon, 31 Jul 2017 15:15:55 -0300
From: Thiago Jung Bauermann <bauerman@...ux.vnet.ibm.com>
To: Ram Pai <linuxram@...ibm.com>
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, linux-mm@...ck.org, x86@...nel.org,
linux-doc@...r.kernel.org, linux-kselftest@...r.kernel.org,
arnd@...db.de, corbet@....net, mhocko@...nel.org,
dave.hansen@...el.com, mingo@...hat.com, paulus@...ba.org,
aneesh.kumar@...ux.vnet.ibm.com, akpm@...ux-foundation.org,
khandual@...ux.vnet.ibm.com
Subject: Re: [RFC v6 13/62] powerpc: track allocation status of all pkeys
Ram Pai <linuxram@...ibm.com> writes:
> static inline int mm_pkey_free(struct mm_struct *mm, int pkey)
> {
> - return -EINVAL;
> + if (!pkey_inited)
> + return -1;
Sorry, I missed this earlier but the pkey_free syscall will pass this
value to userspace so it needs to be an errno as well (-EINVAL?).
> +
> + if (!mm_pkey_is_allocated(mm, pkey))
> + return -EINVAL;
> +
> + mm_set_pkey_free(mm, pkey);
> +
> + return 0;
> }
--
Thiago Jung Bauermann
IBM Linux Technology Center
Powered by blists - more mailing lists