From: Tomer Samara <tomersamara98@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Arve Hjønnevåg" <arve@android.com>,
"Riley Andrews" <riandrews@android.com>,
"Laura Abbott" <labbott@redhat.com>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Todd Kjos" <tkjos@android.com>,
"Martijn Coenen" <maco@android.com>,
"Joel Fernandes" <joel@joelfernandes.org>,
"Christian Brauner" <christian@brauner.io>,
"Hridya Valsaraju" <hridya@google.com>,
"Suren Baghdasaryan" <surenb@google.com>,
devel@driverdev.osuosl.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/4] staging: android: Add error handling to ion_page_pool_shrink
Date: Sun, 16 Aug 2020 22:24:22 +0300 [thread overview]
Message-ID: <73d1b8b904ae867f59e7ada14c3fb90e27f12bbb.1597602783.git.tomersamara98@gmail.com> (raw)
In-Reply-To: <cover.1597602783.git.tomersamara98@gmail.com>
Add error check to ion_page_pool_shrink after calling
ion_page_pool_remove, due to converting BUG_ON to WARN_ON.
Signed-off-by: Tomer Samara <tomersamara98@gmail.com>
---
drivers/staging/android/ion/ion_page_pool.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c
index c1b9eda35c96..031550473000 100644
--- a/drivers/staging/android/ion/ion_page_pool.c
+++ b/drivers/staging/android/ion/ion_page_pool.c
@@ -128,6 +128,8 @@ int ion_page_pool_shrink(struct ion_page_pool *pool, gfp_t gfp_mask,
break;
}
mutex_unlock(&pool->mutex);
+ if (!page)
+ break;
ion_page_pool_free_pages(pool, page);
freed += (1 << pool->order);
}
--
2.25.1
next prev parent reply other threads:[~2020-08-16 19:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-16 18:40 [PATCH v2 0/4] Replace BUG/BUG_ON to WARN/WARN_ON Tomer Samara
2020-08-16 19:23 ` [PATCH v2 1/4] staging: android: Replace BUG_ON with WARN_ON Tomer Samara
2020-08-18 14:11 ` Greg Kroah-Hartman
2020-08-18 14:19 ` Tomer Samara
2020-08-18 14:27 ` Greg Kroah-Hartman
2020-08-16 19:24 ` Tomer Samara [this message]
2020-08-18 14:10 ` [PATCH v2 2/4] staging: android: Add error handling to ion_page_pool_shrink Greg Kroah-Hartman
2020-08-16 19:30 ` [PATCH v2 3/4] staging: android: Convert BUG to WARN Tomer Samara
2020-08-18 14:11 ` Greg Kroah-Hartman
2020-08-16 19:31 ` [PATCH v2 4/4] staging: android: Add error handling to order_to_index callers Tomer Samara
2020-08-18 14:12 ` Greg Kroah-Hartman
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=73d1b8b904ae867f59e7ada14c3fb90e27f12bbb.1597602783.git.tomersamara98@gmail.com \
--to=tomersamara98@gmail.com \
--cc=arve@android.com \
--cc=christian@brauner.io \
--cc=devel@driverdev.osuosl.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=hridya@google.com \
--cc=joel@joelfernandes.org \
--cc=labbott@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maco@android.com \
--cc=riandrews@android.com \
--cc=sumit.semwal@linaro.org \
--cc=surenb@google.com \
--cc=tkjos@android.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
all inboxes | Powered by JetHome®