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>,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH v2] gpio: cdev: sanitize the label before requesting the interrupt
Date: Fri, 22 Mar 2024 19:18:35 +0800 [thread overview]
Message-ID: <20240322111835.GA24228@rigel> (raw)
In-Reply-To: <20240322090209.13384-1-brgl@bgdev.pl>
On Fri, Mar 22, 2024 at 10:02:08AM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> @@ -2198,12 +2216,18 @@ static int lineevent_create(struct gpio_device *gdev, void __user *ip)
> if (ret)
> goto out_free_le;
>
> + label = make_irq_label(le->label);
> + if (!label) {
> + ret = -ENOMEM;
> + goto out_free_le;
> + }
> +
> /* Request a thread to read the events */
> ret = request_threaded_irq(irq,
> lineevent_irq_handler,
> lineevent_irq_thread,
> irqflags,
> - le->label,
> + label,
> le);
> if (ret)
> goto out_free_le;
Leaks label if the request_threaded_irq() fails.
Cheers,
Kent.
next prev parent reply other threads:[~2024-03-22 11:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-22 9:02 [PATCH v2] gpio: cdev: sanitize the label before requesting the interrupt Bartosz Golaszewski
2024-03-22 11:18 ` Kent Gibson [this message]
2024-03-22 11:52 ` Bartosz Golaszewski
2024-03-22 11:57 ` Kent Gibson
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=20240322111835.GA24228@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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.