* [PATCH 1/1] Fix Kernel Panic due to dereference of the invalid handle. First validate the handle and then derefer it in BUG_ON.
@ 2015-01-17 6:12 Shailendra Verma
2015-01-17 14:05 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Shailendra Verma @ 2015-01-17 6:12 UTC (permalink / raw)
To: Greg Kroah-Hartman, John Stultz, Mitchel Humpherys,
Paul E. McKenney
Cc: linux-kernel, Shailendra Verma
Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com>
---
drivers/staging/android/ion/ion.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index 296d347..9e56d32 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -536,8 +536,6 @@ void ion_free(struct ion_client *client, struct ion_handle *handle)
{
bool valid_handle;
- BUG_ON(client != handle->client);
-
mutex_lock(&client->lock);
valid_handle = ion_handle_validate(client, handle);
@@ -547,6 +545,7 @@ void ion_free(struct ion_client *client, struct ion_handle *handle)
return;
}
mutex_unlock(&client->lock);
+ BUG_ON(client != handle->client);
ion_handle_put(handle);
}
EXPORT_SYMBOL(ion_free);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] Fix Kernel Panic due to dereference of the invalid handle. First validate the handle and then derefer it in BUG_ON.
2015-01-17 6:12 [PATCH 1/1] Fix Kernel Panic due to dereference of the invalid handle. First validate the handle and then derefer it in BUG_ON Shailendra Verma
@ 2015-01-17 14:05 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2015-01-17 14:05 UTC (permalink / raw)
To: Shailendra Verma
Cc: John Stultz, Mitchel Humpherys, Paul E. McKenney, linux-kernel
On Sat, Jan 17, 2015 at 11:42:41AM +0530, Shailendra Verma wrote:
>
> Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com>
> ---
> drivers/staging/android/ion/ion.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Something went wrong with your subject line, please fix it up and
resend.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-17 14:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-17 6:12 [PATCH 1/1] Fix Kernel Panic due to dereference of the invalid handle. First validate the handle and then derefer it in BUG_ON Shailendra Verma
2015-01-17 14:05 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox