From owner-svn-src-stable@freebsd.org Thu Feb 15 09:12:09 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E54FCF0ACB3; Thu, 15 Feb 2018 09:12:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 97EE66C3A5; Thu, 15 Feb 2018 09:12:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 92F961CC2A; Thu, 15 Feb 2018 09:12:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1F9C8a3091824; Thu, 15 Feb 2018 09:12:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1F9C8g7091820; Thu, 15 Feb 2018 09:12:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201802150912.w1F9C8g7091820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 15 Feb 2018 09:12:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r329310 - stable/11/sys/ofed/drivers/infiniband/core X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 329310 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Feb 2018 09:12:09 -0000 Author: hselasky Date: Thu Feb 15 09:12:07 2018 New Revision: 329310 URL: https://svnweb.freebsd.org/changeset/base/329310 Log: MFC r323350: Remove unsafe access to the LinuxKPI file structure from ibcore. selwakeup() is now done by the wake_up() family of functions. Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ucm.c stable/11/sys/ofed/drivers/infiniband/core/ucma.c stable/11/sys/ofed/drivers/infiniband/core/user_mad.c stable/11/sys/ofed/drivers/infiniband/core/uverbs_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ucm.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ucm.c Thu Feb 15 09:09:42 2018 (r329309) +++ stable/11/sys/ofed/drivers/infiniband/core/ucm.c Thu Feb 15 09:12:07 2018 (r329310) @@ -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: stable/11/sys/ofed/drivers/infiniband/core/ucma.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ucma.c Thu Feb 15 09:09:42 2018 (r329309) +++ stable/11/sys/ofed/drivers/infiniband/core/ucma.c Thu Feb 15 09:12:07 2018 (r329310) @@ -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: stable/11/sys/ofed/drivers/infiniband/core/user_mad.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/user_mad.c Thu Feb 15 09:09:42 2018 (r329309) +++ stable/11/sys/ofed/drivers/infiniband/core/user_mad.c Thu Feb 15 09:12:07 2018 (r329310) @@ -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: stable/11/sys/ofed/drivers/infiniband/core/uverbs_main.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/uverbs_main.c Thu Feb 15 09:09:42 2018 (r329309) +++ stable/11/sys/ofed/drivers/infiniband/core/uverbs_main.c Thu Feb 15 09:12:07 2018 (r329310) @@ -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); }