Displaying 3 results from an estimated 3 matches for "nr_client".
Did you mean:
hr_client
2014 Mar 26
2
nouveau.c
Hi, I am inspecting the file nouveau.c...
In the function nouveau_client_new there is the
following:
for (i = 0; i < nvdev->nr_client; i++) {
but "nr_client" has no previous assignment
so it has scrambled data. Is this expected behaviour
or am I missing something (the most probable :)?
And someone please tell me where do I find that ffs function.
Thanks in advance!!
-------------- next part --------------
An HTML at...
2014 Mar 13
2
[PATCH] nouveau: safen up nouveau_device list usage against concurrent access
...x_destroy(&nvdev->lock);
free(nvdev);
*pdev = NULL;
}
@@ -191,6 +198,8 @@ nouveau_client_new(struct nouveau_device *dev, struct nouveau_client **pclient)
int id = 0, i, ret = -ENOMEM;
uint32_t *clients;
+ pthread_mutex_lock(&nvdev->lock);
+
for (i = 0; i < nvdev->nr_client; i++) {
id = ffs(nvdev->client[i]) - 1;
if (id >= 0)
@@ -199,7 +208,7 @@ nouveau_client_new(struct nouveau_device *dev, struct nouveau_client **pclient)
clients = realloc(nvdev->client, sizeof(uint32_t) * (i + 1));
if (!clients)
- return ret;
+ goto unlock;
nvdev->client...
2014 Apr 08
0
[PATCH] libdrm/nouveau: safen up nouveau libdrm against concurrent access
...oy(&nvdev->lock);
free(nvdev);
*pdev = NULL;
}
@@ -191,6 +198,8 @@ nouveau_client_new(struct nouveau_device *dev, struct nouveau_client **pclient)
int id = 0, i, ret = -ENOMEM;
uint32_t *clients;
+ pthread_mutex_lock(&nvdev->lock);
+
for (i = 0; i < nvdev->nr_client; i++) {
id = ffs(nvdev->client[i]) - 1;
if (id >= 0)
@@ -199,7 +208,7 @@ nouveau_client_new(struct nouveau_device *dev, struct nouveau_client **pclient)
clients = realloc(nvdev->client, sizeof(uint32_t) * (i + 1));
if (!clients)
- return ret;
+ goto unlock;
nvdev->...