linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] security/tomoyo: convert put_page() to put_user_page*()
@ 2019-08-05  2:26 john.hubbard
  2019-08-05 10:01 ` Tetsuo Handa
  0 siblings, 1 reply; 3+ messages in thread
From: john.hubbard @ 2019-08-05  2:26 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Christoph Hellwig, Ira Weiny, Jan Kara, Jason Gunthorpe,
	Jerome Glisse, LKML, linux-mm, linux-fsdevel, John Hubbard,
	Kentaro Takeda, Tetsuo Handa, linux-security-module

From: John Hubbard <jhubbard@nvidia.com>

For pages that were retained via get_user_pages*(), release those pages
via the new put_user_page*() routines, instead of via put_page() or
release_pages().

This is part a tree-wide conversion, as described in commit fc1d8e7cca2d
("mm: introduce put_user_page*(), placeholder versions").

Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: linux-security-module@vger.kernel.org
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
---
 security/tomoyo/domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/tomoyo/domain.c b/security/tomoyo/domain.c
index 8526a0a74023..6887beecfb6e 100644
--- a/security/tomoyo/domain.c
+++ b/security/tomoyo/domain.c
@@ -931,7 +931,7 @@ bool tomoyo_dump_page(struct linux_binprm *bprm, unsigned long pos,
 	}
 	/* Same with put_arg_page(page) in fs/exec.c */
 #ifdef CONFIG_MMU
-	put_page(page);
+	put_user_page(page);
 #endif
 	return true;
 }
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] security/tomoyo: convert put_page() to put_user_page*()
  2019-08-05  2:26 [PATCH] security/tomoyo: convert put_page() to put_user_page*() john.hubbard
@ 2019-08-05 10:01 ` Tetsuo Handa
  2019-08-05 17:48   ` John Hubbard
  0 siblings, 1 reply; 3+ messages in thread
From: Tetsuo Handa @ 2019-08-05 10:01 UTC (permalink / raw)
  To: john.hubbard, Andrew Morton; +Cc: John Hubbard, linux-security-module

On 2019/08/05 11:26, john.hubbard@gmail.com wrote:
> From: John Hubbard <jhubbard@nvidia.com>
> 
> For pages that were retained via get_user_pages*(), release those pages
> via the new put_user_page*() routines, instead of via put_page() or
> release_pages().
> 
> This is part a tree-wide conversion, as described in commit fc1d8e7cca2d
> ("mm: introduce put_user_page*(), placeholder versions").
> 
> Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Cc: linux-security-module@vger.kernel.org
> Signed-off-by: John Hubbard <jhubbard@nvidia.com>

Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>

Sending to Andrew Morton means you expect this patch to go via -mm tree, don't you?
Andrew, please take this patch. Thank you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] security/tomoyo: convert put_page() to put_user_page*()
  2019-08-05 10:01 ` Tetsuo Handa
@ 2019-08-05 17:48   ` John Hubbard
  0 siblings, 0 replies; 3+ messages in thread
From: John Hubbard @ 2019-08-05 17:48 UTC (permalink / raw)
  To: Tetsuo Handa, john.hubbard, Andrew Morton; +Cc: linux-security-module

On 8/5/19 3:01 AM, Tetsuo Handa wrote:
> On 2019/08/05 11:26, john.hubbard@gmail.com wrote:
>> From: John Hubbard <jhubbard@nvidia.com>
>>
>> For pages that were retained via get_user_pages*(), release those pages
>> via the new put_user_page*() routines, instead of via put_page() or
>> release_pages().
>>
>> This is part a tree-wide conversion, as described in commit fc1d8e7cca2d
>> ("mm: introduce put_user_page*(), placeholder versions").
>>
>> Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
>> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
>> Cc: linux-security-module@vger.kernel.org
>> Signed-off-by: John Hubbard <jhubbard@nvidia.com>
> 
> Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> 
> Sending to Andrew Morton means you expect this patch to go via -mm tree, don't you?

Yes, exactly.

thanks,
-- 
John Hubbard
NVIDIA

> Andrew, please take this patch. Thank you.
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-05 17:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-05  2:26 [PATCH] security/tomoyo: convert put_page() to put_user_page*() john.hubbard
2019-08-05 10:01 ` Tetsuo Handa
2019-08-05 17:48   ` John Hubbard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).