lkml.org 
[lkml]   [2010]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] signals: check_kill_permission: don't check creds if same_thread_group()
Date
Oleg Nesterov <oleg@redhat.com> wrote:

> Yes, but both current_cred() and same_thread_group(current, t) call
> get_current(), and gcc doesn't cache the result because we call
> audit_signal_info() in between.

Sorry, yes. I was reading get_current() as current_cred() for some reason.

However, you are _still_ calling get_current() twice... So that bit of your
changelog isn't really correct.

In fact, get_current() should be __attribute_const__ since it can't change
whilst you're looking at it, except within switch_to(), probably in a piece of
assembly code, so gcc should be free to cache it as long as it likes.

David


\
 
 \ /
  Last update: 2010-05-18 15:55    [W:0.066 / U:2.264 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site