lkml.org 
[lkml]   [2020]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/6] exec: Stop open coding mutex_lock_killable of cred_guard_mutex
On Sat, May 09, 2020 at 12:18:06PM -0700, Linus Torvalds wrote:
> On Fri, May 8, 2020 at 11:48 AM Eric W. Biederman <ebiederm@xmission.com> wrote:
> >
> >
> > Oleg modified the code that did
> > "mutex_lock_interruptible(&current->cred_guard_mutex)" to return
> > -ERESTARTNOINTR instead of -EINTR, so that userspace will never see a
> > failure to grab the mutex.
> >
> > Slightly earlier Liam R. Howlett defined mutex_lock_killable for
> > exactly the same situation but it does it a little more cleanly.
>
> mutex_lock_interruptible() and mutex_lock_killable() are completely
> different operations, and the difference has absolutely nothing to do
> with -ERESTARTNOINTR or -EINTR.
>
> [...]
>
> And Kees, what the heck is that "Reviewed-by" for? Worthless review too.

Yeah, I messed that up; apologies. And I know exactly where my brain
misfired on this one. On a related note, I must stop doing code reviews
on Friday night. :)

--
Kees Cook

\
 
 \ /
  Last update: 2020-05-10 22:34    [W:0.110 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site