linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Wei Yongjun <weiyongjun1@huawei.com>,
	Bamvor Jian Zhang <bamv2005@gmail.com>,
	linux-gpio <linux-gpio@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] gpio: mockup: add missing single_release()
Date: Mon, 9 Sep 2019 10:08:39 +0200	[thread overview]
Message-ID: <CAMpxmJVyYVd-B=6x2sNk3Qa1TTsOHju7TKAG=_8h3Bo1zXxDzw@mail.gmail.com> (raw)
In-Reply-To: <CAMpxmJWJr0uBCs_oGX+h1uFmQ2f7Axo1iqtD6rzwgT-bbZdD6g@mail.gmail.com>

śr., 4 wrz 2019 o 16:54 Bartosz Golaszewski
<bgolaszewski@baylibre.com> napisał(a):
>
> śr., 4 wrz 2019 o 16:00 Wei Yongjun <weiyongjun1@huawei.com> napisał(a):
> >
> > When using single_open() for opening, single_release() should be
> > used instead of seq_release(), otherwise there is a memory leak.
> >
> > Fixes: 2a9e27408e12 ("gpio: mockup: rework debugfs interface")
> > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> > ---
> >  drivers/gpio/gpio-mockup.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpio/gpio-mockup.c b/drivers/gpio/gpio-mockup.c
> > index f1a9c0544e3f..213aedc97dc2 100644
> > --- a/drivers/gpio/gpio-mockup.c
> > +++ b/drivers/gpio/gpio-mockup.c
> > @@ -309,6 +309,7 @@ static const struct file_operations gpio_mockup_debugfs_ops = {
> >         .read = gpio_mockup_debugfs_read,
> >         .write = gpio_mockup_debugfs_write,
> >         .llseek = no_llseek,
> > +       .release = single_release,
> >  };
> >
> >  static void gpio_mockup_debugfs_setup(struct device *dev,
> >
> >
> >
>
> Good catch!
>
> Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>
> Linus: can you pick it up for your last pull-requests with fixes for v5.3?
>
> Bart

Nevermind - I applied it to my tree and will send it with two other
fixes in a PR.

Bart

      reply	other threads:[~2019-09-09  8:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 14:18 [PATCH] gpio: mockup: add missing single_release() Wei Yongjun
2019-09-04 14:54 ` Bartosz Golaszewski
2019-09-09  8:08   ` Bartosz Golaszewski [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='CAMpxmJVyYVd-B=6x2sNk3Qa1TTsOHju7TKAG=_8h3Bo1zXxDzw@mail.gmail.com' \
    --to=bgolaszewski@baylibre.com \
    --cc=bamv2005@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=weiyongjun1@huawei.com \
    /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).