svn commit: r323350 - head/sys/ofed/drivers/infiniband/core

Hans Petter Selasky hselasky at FreeBSD.org
Sat Sep 9 06:34:21 UTC 2017


Author: hselasky
Date: Sat Sep  9 06:34:20 2017
New Revision: 323350
URL: https://svnweb.freebsd.org/changeset/base/323350

Log:
  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

Modified:
  head/sys/ofed/drivers/infiniband/core/ucm.c
  head/sys/ofed/drivers/infiniband/core/ucma.c
  head/sys/ofed/drivers/infiniband/core/user_mad.c
  head/sys/ofed/drivers/infiniband/core/uverbs_main.c

Modified: head/sys/ofed/drivers/infiniband/core/ucm.c
==============================================================================
--- head/sys/ofed/drivers/infiniband/core/ucm.c	Sat Sep  9 06:29:29 2017	(r323349)
+++ head/sys/ofed/drivers/infiniband/core/ucm.c	Sat Sep  9 06:34:20 2017	(r323350)
@@ -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;
 

Modified: head/sys/ofed/drivers/infiniband/core/ucma.c
==============================================================================
--- head/sys/ofed/drivers/infiniband/core/ucma.c	Sat Sep  9 06:29:29 2017	(r323349)
+++ head/sys/ofed/drivers/infiniband/core/ucma.c	Sat Sep  9 06:34:20 2017	(r323350)
@@ -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;

Modified: head/sys/ofed/drivers/infiniband/core/user_mad.c
==============================================================================
--- head/sys/ofed/drivers/infiniband/core/user_mad.c	Sat Sep  9 06:29:29 2017	(r323349)
+++ head/sys/ofed/drivers/infiniband/core/user_mad.c	Sat Sep  9 06:34:20 2017	(r323350)
@@ -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;

Modified: head/sys/ofed/drivers/infiniband/core/uverbs_main.c
==============================================================================
--- head/sys/ofed/drivers/infiniband/core/uverbs_main.c	Sat Sep  9 06:29:29 2017	(r323349)
+++ head/sys/ofed/drivers/infiniband/core/uverbs_main.c	Sat Sep  9 06:34:20 2017	(r323350)
@@ -519,8 +519,6 @@ void ib_uverbs_comp_handler(struct ib_cq *cq, void *cq
 	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_f
 	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);
 }
 


More information about the svn-src-all mailing list