Remove no longer needed linux_poll_wakeup() calls. This is now handled by
"wake_up()" in the LinuxKPI. Accessing the file pointer directly might cause use after free issues. Sponsored by: Mellanox Technologies
This commit is contained in:
parent
526f596179
commit
c4b28ce0b9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/bsd_rdma_4_9/; revision=323651
@ -370,7 +370,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);
|
||||
linux_poll_wakeup(ctx->file->filp);
|
||||
mutex_unlock(&ctx->file->file_mutex);
|
||||
return 0;
|
||||
|
||||
|
@ -353,7 +353,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);
|
||||
linux_poll_wakeup(ctx->file->filp);
|
||||
if (event->event == RDMA_CM_EVENT_DEVICE_REMOVAL)
|
||||
ucma_removal_event_handler(cm_id);
|
||||
out:
|
||||
|
@ -105,7 +105,6 @@ struct ib_umad_device {
|
||||
struct ib_umad_file {
|
||||
struct mutex mutex;
|
||||
struct ib_umad_port *port;
|
||||
struct file *filp;
|
||||
struct list_head recv_list;
|
||||
struct list_head send_list;
|
||||
struct list_head port_list;
|
||||
@ -173,7 +172,6 @@ static int queue_packet(struct ib_umad_file *file,
|
||||
if (agent == __get_agent(file, packet->mad.hdr.id)) {
|
||||
list_add_tail(&packet->list, &file->recv_list);
|
||||
wake_up_interruptible(&file->recv_wait);
|
||||
linux_poll_wakeup(file->filp);
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
@ -952,7 +950,6 @@ static int ib_umad_open(struct inode *inode, struct file *filp)
|
||||
init_waitqueue_head(&file->recv_wait);
|
||||
|
||||
file->port = port;
|
||||
file->filp = filp;
|
||||
filp->private_data = file;
|
||||
|
||||
list_add_tail(&file->port_list, &port->file_list);
|
||||
|
@ -529,7 +529,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);
|
||||
linux_poll_wakeup(file->filp);
|
||||
kill_fasync(&file->async_queue, SIGIO, POLL_IN);
|
||||
}
|
||||
|
||||
@ -564,7 +563,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);
|
||||
linux_poll_wakeup(file->async_file->filp);
|
||||
kill_fasync(&file->async_file->async_queue, SIGIO, POLL_IN);
|
||||
}
|
||||
|
||||
@ -662,7 +660,6 @@ struct file *ib_uverbs_alloc_event_file(struct ib_uverbs_file *uverbs_file,
|
||||
if (IS_ERR(filp))
|
||||
goto err_put_refs;
|
||||
filp->private_data = ev_file;
|
||||
ev_file->filp = filp;
|
||||
|
||||
mutex_lock(&uverbs_file->device->lists_mutex);
|
||||
list_add_tail(&ev_file->list,
|
||||
@ -1315,7 +1312,6 @@ static void ib_uverbs_free_hw_resources(struct ib_uverbs_device *uverbs_dev,
|
||||
}
|
||||
|
||||
wake_up_interruptible(&event_file->poll_wait);
|
||||
linux_poll_wakeup(event_file->filp);
|
||||
kill_fasync(&event_file->async_queue, SIGIO, POLL_IN);
|
||||
}
|
||||
mutex_unlock(&uverbs_dev->lists_mutex);
|
||||
|
@ -106,7 +106,6 @@ struct ib_uverbs_device {
|
||||
|
||||
struct ib_uverbs_event_file {
|
||||
struct kref ref;
|
||||
struct file *filp;
|
||||
int is_async;
|
||||
struct ib_uverbs_file *uverbs_file;
|
||||
spinlock_t lock;
|
||||
|
Loading…
Reference in New Issue
Block a user