Re: [RFC PATCH] resource: Fix CXL node not populated issue

Huang, Ying
2024-12-04T02:07:46Z

Hi, Andy,

Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:

> On Tue, Dec 03, 2024 at 02:26:52PM +0800, Huang, Ying wrote:
>> Raghavendra K T <raghavendra.kt@amd.com> writes:
>
> ...
>
>> > git bisect had led to below commit
>> > Fixes: b4afe4183ec7 ("resource: fix region_intersects() vs add_memory_driver_managed()")
>>
>> This breaks you case, sorry about that. But this also fixed a real bug
>> too. So, it's not appropriate just to revert it blindly.
>
> Linus was clear about this recently. Even if it fixes a bug, regression is
> still regression and might (*) lead to a revert.
> https://lwn.net/Articles/990599/
>
> (*) in general fixes are better than reverts, but depends on the timing in
> the release cycle the revert may be the only option.

I don't think that the timing is so tight that we should not work on
proper fix firstly. I'm trying to work with the reporter on this.

BTW, the commit b4afe4183ec7 ("resource: fix region_intersects() vs
add_memory_driver_managed()") fixed a security related bug. The bug
weakened the protection to prevent users read/write system memory via
/dev/mem. So, IMO, we need to be more careful about this.

---
Best Regards,
Huang, Ying