Re: [V2] perf/x86/intel/uncore: Fix iounmap() leak on global_init failure

Markus Elfring
2026-01-16T17:30:27Z

…
>> 3. Which text part of your change description does contain “orders to
>> the codebase to change its behaviour”?
>
> OK, I see your point. Yes, it's good to add one sentence to describe
> what the patches does.

I became curious somehow if further contributors would be willing to care
a bit more also for this wording requirement.

> But I guess this patch is simple enough.

But it seems that several technical details triggered special communication challenges.

> I don’t think this change alone justifies a separate patch, as it would
> add review overhead without providing much practical benefit.

Will any other contributors dare to add related insights?

>> The corresponding change recombination can occasionally become more interesting
>> for selected development ideas.
>
>
> Are you suggesting putting this into a separate patch?

Yes.

I propose a stricter distinction between a “quick” fix and subsequent refinements
at the discussed source code places.

> My impression is that the change is simple and closely related, though I
> may be missing something. I understand others may see it differently.

It seems that we are struggling according to recurring factors of change resistance.

> @@ -273,21 +274,23 @@ static int __parse_discovery_table(struct
> uncore_discovery_domain *domain,
>
> /* Read Global Discovery State */
> memcpy_fromio(&global, io_addr, sizeof(struct
> uncore_global_discovery));
> + iounmap(io_addr);
> +
> if (uncore_discovery_invalid_unit(global)) {
> pr_info("Invalid Global Discovery State: 0x%llx 0x%llx
> 0x%llx\n",
> global.table1, global.ctl, global.table3);
> - iounmap(io_addr);
> return -EINVAL;
> }
> - iounmap(io_addr);

Regards,
Markus