On 10/08/2024 06:55, Dan Williams wrote:
> Dan Williams wrote:
> [..]
>> @@ -2036,12 +2038,10 @@ static struct device **scan_labels(struct nd_region
>> *nd_region)
>
> ...of course you would also need something like:
>
> if (!count) {
> kfree(devs);
> return NULL;
> }
It seems we
(Just back from the summer holiday)
Sorry for the late reply.
On 10/08/2024 06:38, Dan Williams wrote:
> I notice this patch is not upstream yet. Let's try to get it over the
> goal line.
>
> Li Zhijian wrote:
>> The leakage would happen when create_namespace_pmem() meets an invalid
>> label wh
Dan Williams wrote:
[..]
> @@ -2036,12 +2038,10 @@ static struct device **scan_labels(struct nd_region
> *nd_region)
...of course you would also need something like:
if (!count) {
kfree(devs);
return NULL;
}
...here, I'll leave that to you to fix up and test.
> return d
I notice this patch is not upstream yet. Let's try to get it over the
goal line.
Li Zhijian wrote:
> The leakage would happend when create_namespace_pmem() meets an invalid
> label which gets failure in validating isetcookie.
I would rewrite this as:
"scan_labels() leaks memory when label scanni
On 26/07/2024 21:37, Ira Weiny wrote:
> Li Zhijian wrote:
>> The leakage would happend when create_namespace_pmem() meets an invalid
>> label which gets failure in validating isetcookie.
>>
>> Try to resuse the devs that may have already been allocated with size
>> (2 * sizeof(dev)) previously.
>
Li Zhijian wrote:
> The leakage would happend when create_namespace_pmem() meets an invalid
> label which gets failure in validating isetcookie.
>
> Try to resuse the devs that may have already been allocated with size
> (2 * sizeof(dev)) previously.
>
> A kmemleak reports:
> unreferenced object
The leakage would happend when create_namespace_pmem() meets an invalid
label which gets failure in validating isetcookie.
Try to resuse the devs that may have already been allocated with size
(2 * sizeof(dev)) previously.
A kmemleak reports:
unreferenced object 0x88800dda1980 (size 16):
co
7 matches
Mail list logo