diff options
author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2017-09-09 06:34:20 +0000 |
---|---|---|
committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2017-09-09 06:34:20 +0000 |
commit | 65c5a7a8790850a922b645b3aa365ba4671c33a3 (patch) | |
tree | 06e48a7b879bedc5cb200ecc2dd5534cc23afcbb | |
parent | 6dec7efa83cd0316c268618cdaa9a383e78312ac (diff) | |
download | src-65c5a7a8790850a922b645b3aa365ba4671c33a3.tar.gz src-65c5a7a8790850a922b645b3aa365ba4671c33a3.zip |
Remove unsafe access to the LinuxKPI file structure from ibcore.
selwakeup() is now done by the wake_up() family of functions.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes
Notes:
svn path=/head/; revision=323350
-rw-r--r-- | sys/ofed/drivers/infiniband/core/ucm.c | 2 | ||||
-rw-r--r-- | sys/ofed/drivers/infiniband/core/ucma.c | 2 | ||||
-rw-r--r-- | sys/ofed/drivers/infiniband/core/user_mad.c | 1 | ||||
-rw-r--r-- | sys/ofed/drivers/infiniband/core/uverbs_main.c | 4 |
4 files changed, 0 insertions, 9 deletions
diff --git a/sys/ofed/drivers/infiniband/core/ucm.c b/sys/ofed/drivers/infiniband/core/ucm.c index 8f20e89da0d5..4f69eab862d5 100644 --- a/sys/ofed/drivers/infiniband/core/ucm.c +++ b/sys/ofed/drivers/infiniband/core/ucm.c @@ -378,8 +378,6 @@ static int ib_ucm_event_handler(struct ib_cm_id *cm_id, list_add_tail(&uevent->file_list, &ctx->file->events); list_add_tail(&uevent->ctx_list, &ctx->events); wake_up_interruptible(&ctx->file->poll_wait); - if (ctx->file->filp) - selwakeup(&ctx->file->filp->f_selinfo); mutex_unlock(&ctx->file->file_mutex); return 0; diff --git a/sys/ofed/drivers/infiniband/core/ucma.c b/sys/ofed/drivers/infiniband/core/ucma.c index 4000aa20cd88..90f59262290c 100644 --- a/sys/ofed/drivers/infiniband/core/ucma.c +++ b/sys/ofed/drivers/infiniband/core/ucma.c @@ -287,8 +287,6 @@ static int ucma_event_handler(struct rdma_cm_id *cm_id, list_add_tail(&uevent->list, &ctx->file->event_list); wake_up_interruptible(&ctx->file->poll_wait); - if (ctx->file->filp) - selwakeup(&ctx->file->filp->f_selinfo); out: mutex_unlock(&ctx->file->mut); return ret; diff --git a/sys/ofed/drivers/infiniband/core/user_mad.c b/sys/ofed/drivers/infiniband/core/user_mad.c index cc4a65913b98..d269751af137 100644 --- a/sys/ofed/drivers/infiniband/core/user_mad.c +++ b/sys/ofed/drivers/infiniband/core/user_mad.c @@ -236,7 +236,6 @@ static int queue_packet(struct ib_umad_file *file, packet->mad.hdr.id++) if (agent == __get_agent(file, packet->mad.hdr.id)) { list_add_tail(&packet->list, &file->recv_list); - selwakeup(&file->filp->f_selinfo); wake_up_interruptible(&file->recv_wait); ret = 0; break; diff --git a/sys/ofed/drivers/infiniband/core/uverbs_main.c b/sys/ofed/drivers/infiniband/core/uverbs_main.c index 95e04f5d7055..269ef1c001b7 100644 --- a/sys/ofed/drivers/infiniband/core/uverbs_main.c +++ b/sys/ofed/drivers/infiniband/core/uverbs_main.c @@ -519,8 +519,6 @@ void ib_uverbs_comp_handler(struct ib_cq *cq, void *cq_context) spin_unlock_irqrestore(&file->lock, flags); wake_up_interruptible(&file->poll_wait); - if (file->filp) - selwakeup(&file->filp->f_selinfo); kill_fasync(&file->async_queue, SIGIO, POLL_IN); } @@ -554,8 +552,6 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file, spin_unlock_irqrestore(&file->async_file->lock, flags); wake_up_interruptible(&file->async_file->poll_wait); - if (file->async_file->filp) - selwakeup(&file->async_file->filp->f_selinfo); kill_fasync(&file->async_file->async_queue, SIGIO, POLL_IN); } |