Exemplo n.º 1
0
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);
	if (!valid_handle) {
		mutex_unlock(&client->lock);
		WARN("%s: invalid handle passed to free.\n", __func__);
		return;
	}
	ion_handle_put(handle);
	mutex_unlock(&client->lock);
}
Exemplo n.º 2
0
void ion_free(struct ion_client *client, struct ion_handle *handle)
{
	bool valid_handle;

	/* WARN when the client and handle do not match. Used to be BUG */
	WARN_ON(client != handle->client);

	mutex_lock(&client->lock);
	valid_handle = ion_handle_validate(client, handle);
	if (!valid_handle) {
		mutex_unlock(&client->lock);
		WARN(1, "%s: invalid handle passed to free.\n", __func__);
		return;
	}
	ion_handle_put(handle);
	mutex_unlock(&client->lock);
}
Exemplo n.º 3
0
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);
//120817 [email protected] gpu: ion: Fix race condition with ion_import 
//	mutex_unlock(&client->lock);

	if (!valid_handle) {
		WARN("%s: invalid handle passed to free.\n", __func__);
		mutex_unlock(&client->lock);		
		return;
	}
	ion_handle_put(handle);
	mutex_unlock(&client->lock);		
}