[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87le0zmhdp.fsf@nvdebian.thelocal>
Date: Wed, 14 Aug 2024 22:08:23 +1000
From: Alistair Popple <apopple@...dia.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Christoph Hellwig <hch@...radead.org>, Max Ramanouski
<max8rr8@...il.com>, x86@...nel.org, dave.hansen@...ux.intel.com,
luto@...nel.org, peterz@...radead.org, linux-kernel@...r.kernel.org,
jniethe@...dia.com, jhubbard@...dia.com, linux-mm@...ck.org
Subject: Re: [PATCH v2] x86/ioremap: Use is_ioremap_addr() in iounmap()
Thomas Gleixner <tglx@...utronix.de> writes:
> On Tue, Aug 13 2024 at 21:28, Christoph Hellwig wrote:
>> Modulo the fixes discussion (and any commit log adjustments related to
>> that), is_ioremap_addr is the right interface to check for an
>> ioremap address. So for the actual code change:
>
> I'm not opposed to use is_ioremap_addr() as it restricts the check to
> the actual ioremp region.
>
> That said, I'm wondering why iounmap() silently bails out when invoked
> with an address which is outside of the ioremap region. I'd say, any
> invocation with an address outside of it, is broken, but I might be
> missing something as always.
I would tend to agree and had the same thought when we found this. At
least some kind of message (WARN_ON, WARN_ON_ONCE, printk, etc) would
have made the issue we were debugging much more obvious. FWIW I have
tested running with a WARN_ON() there and it never fired except in the
bug scenario.
- Alistair
> Thanks,
>
> tglx
Powered by blists - more mailing lists