aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ehca/ehca_cq.c
diff options
context:
space:
mode:
authorHoang-Nam Nguyen <hnguyen@de.ibm.com>2008-04-17 00:01:13 -0400
committerRoland Dreier <rolandd@cisco.com>2008-04-17 00:01:13 -0400
commitf4f82994d1ea0cd01058a245985f1eb5e569e6d3 (patch)
tree67244352967536dd4330928cd53c3e37011fa2ec /drivers/infiniband/hw/ehca/ehca_cq.c
parent1e89a1946cfd906d12eff437d2a76b3aa7f5e731 (diff)
IB/ehca: Remove tgid checking
Pavel Emelyanov <xemul@openvz.org> mentioned in <http://lkml.org/lkml/2008/3/17/131> that the task_struct->tgid field is about to become deprecated, so the uses in the ehca driver need to be fixed up. However, all the uses in ehca are for some object ownership checking that is not really needed, and anyway is implementing a policy that should be in common code rather than a low-level driver. So just remove all the checks. Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_cq.c')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_cq.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/ehca_cq.c
index 0467c158d4a9..ec0cfcf3073f 100644
--- a/drivers/infiniband/hw/ehca/ehca_cq.c
+++ b/drivers/infiniband/hw/ehca/ehca_cq.c
@@ -43,8 +43,6 @@
43 * POSSIBILITY OF SUCH DAMAGE. 43 * POSSIBILITY OF SUCH DAMAGE.
44 */ 44 */
45 45
46#include <asm/current.h>
47
48#include "ehca_iverbs.h" 46#include "ehca_iverbs.h"
49#include "ehca_classes.h" 47#include "ehca_classes.h"
50#include "ehca_irq.h" 48#include "ehca_irq.h"
@@ -148,7 +146,6 @@ struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe, int comp_vector,
148 spin_lock_init(&my_cq->task_lock); 146 spin_lock_init(&my_cq->task_lock);
149 atomic_set(&my_cq->nr_events, 0); 147 atomic_set(&my_cq->nr_events, 0);
150 init_waitqueue_head(&my_cq->wait_completion); 148 init_waitqueue_head(&my_cq->wait_completion);
151 my_cq->ownpid = current->tgid;
152 149
153 cq = &my_cq->ib_cq; 150 cq = &my_cq->ib_cq;
154 151
@@ -320,7 +317,6 @@ int ehca_destroy_cq(struct ib_cq *cq)
320 struct ehca_shca *shca = container_of(device, struct ehca_shca, 317 struct ehca_shca *shca = container_of(device, struct ehca_shca,
321 ib_device); 318 ib_device);
322 struct ipz_adapter_handle adapter_handle = shca->ipz_hca_handle; 319 struct ipz_adapter_handle adapter_handle = shca->ipz_hca_handle;
323 u32 cur_pid = current->tgid;
324 unsigned long flags; 320 unsigned long flags;
325 321
326 if (cq->uobject) { 322 if (cq->uobject) {
@@ -329,12 +325,6 @@ int ehca_destroy_cq(struct ib_cq *cq)
329 "user space cq_num=%x", my_cq->cq_number); 325 "user space cq_num=%x", my_cq->cq_number);
330 return -EINVAL; 326 return -EINVAL;
331 } 327 }
332 if (my_cq->ownpid != cur_pid) {
333 ehca_err(device, "Invalid caller pid=%x ownpid=%x "
334 "cq_num=%x",
335 cur_pid, my_cq->ownpid, my_cq->cq_number);
336 return -EINVAL;
337 }
338 } 328 }
339 329
340 /* 330 /*
@@ -374,15 +364,6 @@ int ehca_destroy_cq(struct ib_cq *cq)
374 364
375int ehca_resize_cq(struct ib_cq *cq, int cqe, struct ib_udata *udata) 365int ehca_resize_cq(struct ib_cq *cq, int cqe, struct ib_udata *udata)
376{ 366{
377 struct ehca_cq *my_cq = container_of(cq, struct ehca_cq, ib_cq);
378 u32 cur_pid = current->tgid;
379
380 if (cq->uobject && my_cq->ownpid != cur_pid) {
381 ehca_err(cq->device, "Invalid caller pid=%x ownpid=%x",
382 cur_pid, my_cq->ownpid);
383 return -EINVAL;
384 }
385
386 /* TODO: proper resize needs to be done */ 367 /* TODO: proper resize needs to be done */
387 ehca_err(cq->device, "not implemented yet"); 368 ehca_err(cq->device, "not implemented yet");
388 369