public inbox for kernelnewbies@kernelnewbies.org
 help / color / mirror / Atom feed
From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: jim.cromie@gmail.com
Cc: Constantine Shulyupin <constantine.shulyupin@gmail.com>,
	kernelnewbies@kernelnewbies.org,
	Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Subject: Re: unmap memory mapped with devm_ioremap_resource
Date: Fri, 09 Dec 2022 15:35:54 -0500	[thread overview]
Message-ID: <408767.1670618154@turing-police> (raw)
In-Reply-To: <CAJfuBxz+8oXHET_h=e8psCg6AF7Ni7pMfqat_e40ftjWNoOD7g@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 892 bytes --]

On Fri, 09 Dec 2022 12:58:20 -0700, jim.cromie@gmail.com said:
> On Fri, Dec 9, 2022 at 9:14 AM Adrian Fiergolski <adrian.fiergolski@fastree3d.com> wrote:
> > Does the community have any other ideas? Or I am wrong, and devm_iounmap is enough?

> I dunno, but it says you asked ~4 hrs ago.
> I bet you could just try it and get an answer faster.
> Do feel free to report back.

Note that it *is* possible for something to *look* like it works, but it leaves
dangling pointers or other hidden corruption that takes a while to surface.  I
once had to troubleshoot a userspace bug that worked fine on one system but
blew up on another with a different malloc() - some 6 million malloc calls
after the bug hit.

Fortunately, the vast majority of kernel functions will return an error code if
anything at all fishy happened, so just checking return codes on *everything* is
usually good enough...


[-- Attachment #1.2: Type: application/pgp-signature, Size: 494 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2022-12-09 20:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 17:24 unmap memory mapped with devm_ioremap_resource Adrian Fiergolski
2022-12-02 18:01 ` Constantine Shulyupin
2022-12-06 21:23   ` Adrian Fiergolski
2022-12-09 16:14     ` Adrian Fiergolski
2022-12-09 19:58       ` jim.cromie
2022-12-09 20:35         ` Valdis Klētnieks [this message]
2022-12-09 22:52           ` Adrian Fiergolski
2022-12-10  6:53             ` Constantine Shulyupin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=408767.1670618154@turing-police \
    --to=valdis.kletnieks@vt.edu \
    --cc=adrian.fiergolski@fastree3d.com \
    --cc=constantine.shulyupin@gmail.com \
    --cc=jim.cromie@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox