lkml.org 
[lkml]   [2010]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/1][BUG][TAKE2] KEYRINGS: find_keyring_by_name() can gain the freed keyring
Date
Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com> wrote:

> > Better still, atomic_inc_not_zero(). How about the attached patch?
> Your fix looks good to me. But, if usage count of the keyring is 0,
> I think it better to return -ENOKEY immediately.

The problem with that is that someone else may have created a keyring with the
same name that you can't then reach until the dead keyring is deleted.

David


\
 
 \ /
  Last update: 2010-04-23 17:55    [W:0.070 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site