diff options
| author | Jeff Layton <[email protected]> | 2015-03-04 22:34:32 +0000 |
|---|---|---|
| committer | Jeff Layton <[email protected]> | 2015-03-04 22:34:32 +0000 |
| commit | 0164bf0239777811bdc3e01f45501174dc6db19d (patch) | |
| tree | ab038158e85748e6769dea13004c5a9591d10f1a /net/switchdev/switchdev.c | |
| parent | Merge tag 'dma-buf-for-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/... (diff) | |
| download | kernel-0164bf0239777811bdc3e01f45501174dc6db19d.tar.gz kernel-0164bf0239777811bdc3e01f45501174dc6db19d.zip | |
locks: fix fasync_struct memory leak in lease upgrade/downgrade handling
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 simply re-call 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)
Reported-and-Tested-by: Daniel Wagner <[email protected]>
Signed-off-by: Jeff Layton <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions
