linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kent Gibson <warthog618@gmail.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alexey Dobriyan <adobriyan@gmail.com>,
	stable@vger.kernel.org, Stefan Wahren <wahrenst@gmx.net>,
	Naresh Kamboju <naresh.kamboju@linaro.org>,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
	Linux Kernel Functional Testing <lkft@linaro.org>
Subject: Re: [PATCH] gpio: cdev: check for NULL labels when sanitizing them for irqs
Date: Wed, 3 Apr 2024 18:32:49 +0800	[thread overview]
Message-ID: <20240403103249.GA8220@rigel> (raw)
In-Reply-To: <CAMRc=MePwq_rnWZUA6skVqiqjxTKNLXR7cdfrrVeeaxz8Osxmg@mail.gmail.com>

On Wed, Apr 03, 2024 at 11:47:21AM +0200, Bartosz Golaszewski wrote:
> On Wed, Apr 3, 2024 at 11:42 AM Kent Gibson <warthog618@gmail.com> wrote:
> >
> >
> > It occurred to me that none of my tests cover this case, as they always
> > request edges with the consumer set, so I added some and can confirm both
> > the problem and the fix.
> >
> > In the process I found another bug - we overlooked setting up the irq
> > label in debounce_setup() - the alternate path in edge_detector_setup()
> > that performs sw debounce.  That results in a double free of the
> > req->label and memory corruption hilarity follows.
> >
> > I've got a patch for that - the unfortunate part being that
> > debounce_setup() is earlier in the file than make_irq_label() and
> > free_irq_label().  Those will need to be pushed earlier, so it is
> > sure to conflict with this patch.
> > How would you prefer to proceed?
>
> Can you take my patch and just make it part of your series?
>

Will do.

Cheers,
Kent.

      reply	other threads:[~2024-04-03 10:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02 11:41 [PATCH] gpio: cdev: check for NULL labels when sanitizing them for irqs Bartosz Golaszewski
2024-04-02 14:37 ` Anders Roxell
2024-04-03  9:42 ` Kent Gibson
2024-04-03  9:47   ` Bartosz Golaszewski
2024-04-03 10:32     ` Kent Gibson [this message]

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=20240403103249.GA8220@rigel \
    --to=warthog618@gmail.com \
    --cc=adobriyan@gmail.com \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkft@linaro.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=stable@vger.kernel.org \
    --cc=wahrenst@gmx.net \
    /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;
as well as URLs for NNTP newsgroup(s).