lkml.org 
[lkml]   [2015]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] locks: fix fasync_struct memory leak in lease upgrade/downgrade handling
Hi Jeff,

On 03/05/2015 01:06 AM, Jeff Layton wrote:
> Commit 8634b51f6ca2 (locks: convert lease handling to file_lock_context)
> introduced a regression in the handling of lease upgrade/downgrades.
>
> In the event that we already have a lease on a file and are going to
> either upgrade or downgrade it, we skip doing any list insertion or
> deletion and skip to re-calling lm_setup on the existing lease.
>
> As of commit 8634b51f6ca2 however, we end up calling lm_setup on the
> lease that was passed in, instead of on the existing lease. This causes
> us to leak the fasync_struct that was allocated in the event that there
> was not already an existing one (as it always appeared that there
> wasn't one).
>
> Fixes: 8634b51f6ca2 (locks: convert lease handling to file_lock_context)

Yes, that fixes the problem. Thanks!

> Reported-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
> Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>

Tested-by: Daniel Wagner <daniel.wagner@bmw-carit.de>


cheers,
daniel


\
 
 \ /
  Last update: 2015-03-05 08:21    [W:0.048 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site