[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <278a19c4-c794-8de7-7cb4-1e1da3b80e83@web.de>
Date: Sat, 28 Dec 2019 12:30:42 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Xu Wang <vulab@...as.ac.cn>, kernel-janitors@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Subject: Re: [PATCH] nvmem: core: Fix a potential use after free
> Free the nvmem structure only after we are done using it.
This information can be reasonable.
> This patch just moves the put_device() down a bit to avoid the
> use after free.
I suggest to reconsider such a change because a device reference count
should eventually be decremented before decrementing the reference count
for the module which is managed by this programming interface.
Are you also looking for better software documentation for such an use case?
Regards,
Markus
Powered by blists - more mailing lists