]> git.baikalelectronics.ru Git - kernel.git/commit
mm/madvise: fix memory leak from process_madvise
authorEric Dumazet <edumazet@google.com>
Sun, 22 Nov 2020 06:16:58 +0000 (22:16 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 22 Nov 2020 18:48:22 +0000 (10:48 -0800)
commitf5a5c586be9969cc6a5289ba8c2b7318e967bd57
tree327fe48fc8f1a993669f3b3d86ac0cda59063e85
parent47343b3b32286c8865ef9c908bb94c6fe45953cb
mm/madvise: fix memory leak from process_madvise

The early return in process_madvise() will produce a memory leak.

Fix it.

Fixes: c5a294b9e6e1 ("mm/madvise: introduce process_madvise() syscall: an external memory hinting API")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Link: https://lkml.kernel.org/r/20201116155132.GA3805951@google.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/madvise.c