Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36c99a16 authored by Dominique Martinet's avatar Dominique Martinet Committed by Greg Kroah-Hartman
Browse files

9p: clear dangling pointers in p9stat_free

[ Upstream commit 62e3941776fea8678bb8120607039410b1b61a65 ]

p9stat_free is more of a cleanup function than a 'free' function as it
only frees the content of the struct; there are chances of use-after-free
if it is improperly used (e.g. p9stat_free called twice as it used to be
possible to)

Clearing dangling pointers makes the function idempotent and safer to use.

Link: http://lkml.kernel.org/r/1535410108-20650-2-git-send-email-asmadeus@codewreck.org


Signed-off-by: default avatarDominique Martinet <dominique.martinet@cea.fr>
Reported-by: default avatar <syzbot+d4252148d198410b864f@syzkaller.appspotmail.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7e0a5da5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment