From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: Dennis Dalessandro <dennis.dalessandro@intel.com>
Cc: dledford@redhat.com, linux-rdma@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/5] IB/hfi1: Remove write() and use ioctl() for user access
Date: Thu, 12 May 2016 15:27:09 -0600 [thread overview]
Message-ID: <20160512212709.GB6545@obsidianresearch.com> (raw)
In-Reply-To: <20160512195304.GA10419@phlsvsds.ph.intel.com>
On Thu, May 12, 2016 at 03:53:04PM -0400, Dennis Dalessandro wrote:
> >>Is it really that big of a deal to export a version number?
> >
> >If it isn't needed, don't add it..
>
> For the reason I gave, I think it is needed so unless you are vehemently
> opposed to it I would prefer to leave it.
It represents the opposite of what we want to see in good uapi
design. Linux generally doesn't use versioning, it uses active in-band
discovery (eg via ENOSYS or something)
If you do something that needs versioning then add it, otherwise
assume a design using in-band discovery.
> >Drivers can be removed in other ways, eg pci hot unplug. Do not assume
> >module_exit is the only way and rely on module ref counting for
> >correctness.
>
> Point taken. I'll look into this. So are you perhaps suggesting we do
> something like is done for uverbs_dev in ib_verbs_add_one() where there is a
> kobj for uverbs_dev and the parent of uverbs_dev->cdeb is set to that? In
> our case it would probably be something like hfi1_devdata.
Unconditionally the cdev parent kref must point to the kref that holds
the liftime of the memory containing the struct cdev.
See
commit 35d4a0b63dc0c6d1177d4f532a9deae958f0662c
Author: Yishai Hadas <yishaih@mellanox.com>
Date: Thu Aug 13 18:32:03 2015 +0300
IB/uverbs: Fix race between ib_uverbs_open and remove_one
But I thought there might be more issues with release racing with
remove as some of the release functions were quite complex, and I
didn't see much locking (I did not study it closely). It needs a
careful analysis to show that is OK. Remember unregistering the cdev
is not a fence and open fd's can remain and be released at any time.
Jason
prev parent reply other threads:[~2016-05-12 21:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-12 17:18 [PATCH v2 0/5] IB/hfi1: Remove write() and use ioctl() for user access Dennis Dalessandro
2016-05-12 17:18 ` [PATCH v2 1/5] IB/hfi1: Export drivers user sw version via sysfs Dennis Dalessandro
2016-05-12 17:18 ` [PATCH v2 2/5] IB/hfi1: Remove unused user command Dennis Dalessandro
2016-05-12 17:18 ` [PATCH v2 3/5] IB/hfi1: Add ioctl() interface for user commands Dennis Dalessandro
2016-05-12 17:43 ` Jason Gunthorpe
2016-05-12 18:12 ` Hefty, Sean
2016-05-12 19:27 ` Dennis Dalessandro
2016-05-12 19:40 ` Jason Gunthorpe
2016-05-12 19:48 ` Doug Ledford
2016-05-12 21:28 ` Jason Gunthorpe
2016-05-13 14:33 ` Dennis Dalessandro
2016-05-13 20:54 ` ira.weiny
2016-05-12 17:18 ` [PATCH v2 4/5] IB/hfi1: Remove write(), use ioctl() for user cmds Dennis Dalessandro
2016-05-12 17:18 ` [PATCH v2 5/5] IB/hfi1: Add trace message in user IOCTL handling Dennis Dalessandro
2016-05-12 17:34 ` [PATCH v2 0/5] IB/hfi1: Remove write() and use ioctl() for user access Jason Gunthorpe
2016-05-12 19:07 ` Dennis Dalessandro
2016-05-12 19:25 ` Jason Gunthorpe
2016-05-12 19:53 ` Dennis Dalessandro
2016-05-12 20:31 ` Doug Ledford
2016-05-12 21:27 ` Jason Gunthorpe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160512212709.GB6545@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--cc=dennis.dalessandro@intel.com \
--cc=dledford@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).