LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Alexandru Ardelean <aardelean@deviqon.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Yang Yingliang <yangyingliang@huawei.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v2 0/2] iio: buffer: allocation and freeing buffers fix and optimization
Date: Wed, 13 Oct 2021 12:49:21 +0300	[thread overview]
Message-ID: <20211013094923.2473-1-andriy.shevchenko@linux.intel.com> (raw)

Yang submitted a fix, but I think the code can be refactored a bit to be more
robust against similar mistakes in the future, if any.

In v2:
- put SoB Yang's patch (it's good for backporting)
- added refactoring patch on top of Yang's fix

Andy Shevchenko (1):
  iio: buffer: Use dedicated variable in
    iio_buffers_alloc_sysfs_and_mask()

Yang Yingliang (1):
  iio: buffer: Fix double-free in iio_buffers_alloc_sysfs_and_mask()

 drivers/iio/industrialio-buffer.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

-- 
2.33.0


             reply	other threads:[~2021-10-13  9:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13  9:49 Andy Shevchenko [this message]
2021-10-13  9:49 ` [PATCH v2 1/2] iio: buffer: Fix double-free in iio_buffers_alloc_sysfs_and_mask() Andy Shevchenko
2021-10-13  9:49 ` [PATCH v2 2/2] iio: buffer: Use dedicated variable " Andy Shevchenko
2021-10-17 14:26 ` [PATCH v2 0/2] iio: buffer: allocation and freeing buffers fix and optimization Jonathan Cameron
2021-11-15 11:12   ` Andy Shevchenko
2021-11-20 14:17     ` Jonathan Cameron

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=20211013094923.2473-1-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=aardelean@deviqon.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yangyingliang@huawei.com \
    --subject='Re: [PATCH v2 0/2] iio: buffer: allocation and freeing buffers fix and optimization' \
    /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

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).