linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH 1/9] NVMe: Merge issue on character device bring-up
Date: Thu, 5 Sep 2013 17:23:33 -0600 (MDT)	[thread overview]
Message-ID: <alpine.LRH.2.03.1309051651040.1857@AMR> (raw)
In-Reply-To: <8A51900D08212F40B3DE22453052F698EE5F77@wdscexmb02.sc.wdc.com>

On Thu, 5 Sep 2013, John Utz wrote:
> OH HECK. I am on outlook, so I have no quoting mechanism. I gotta come up with a different MUA that speaks exchange.....
>
> Grrrr.....
>
> Comments crudely inserted inline

Sometimes I have no choice but to use outlook so I feel your pain. :)

Depending on which version you're using, there should be something like
"Options" -> "Mail", and you set "When replying to a message" with
"Prefix each line of original message with". I set that option to '>'
like how my linux email client does replies.

> On Thu, 5 Sep 2013, John Utz wrote:
>> What will happen when you go to create_cdev: if the character device already exists?
>>
>> Harmless? Or Not?
>>
>> Just curious.
>>
>> Tnx!
>>
>> johnu
>
> Hi John,
>
> The character device is created at the end of this pci_driver's 'probe'
> routine and deleted on 'remove', so I don't think it is possible for the
> character device to exist prior to the 'goto', right?
>
> JLUIII-> If the character device has been created and then the driver dies
> prior to the remove executing, you would be faced with an existing chardev
> when you restarted the driver.

I'm not sure how to make that kind of situation happen without creating
a more catastrophic problem. Can a pci driver be unloaded without all
the devices the driver claims be removed and still have a sane system?
The nvme_dev structure encapsulating the misc_dev it is associated with no
longer exists, right? Accessing the old character device handle probably
causes a page fault or worse.

Anyway, I tried to force the situation by skipping the misc_deregister
in the 'remove' function; it's not a good idea to leave the misc_dev up
and then reload the driver. You'll get "sysfs: cannot create duplicate
filename" and "kobject_add_internal failed with -EEXIST" warnings. Opening
the character device causes a "BUG: unable to handle kernel paging
request at ..." in this scenario.

  reply	other threads:[~2013-09-05 23:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-05 20:45 [PATCH 0/9] NVMe: Error handling Keith Busch
2013-09-05 20:45 ` [PATCH 1/9] NVMe: Merge issue on character device bring-up Keith Busch
2013-09-05 21:23   ` John Utz
2013-09-05 22:21     ` Keith Busch
2013-09-05 22:47       ` John Utz
2013-09-05 23:23         ` Keith Busch [this message]
2013-09-05 20:45 ` [PATCH 2/9] NVMe: Differentiate commands not completed Keith Busch
2013-09-05 20:45 ` [PATCH 3/9] NVMe: Fail device if unresponsive during init Keith Busch
2013-09-19 20:29   ` Matthew Wilcox
2013-09-19 21:25     ` Keith Busch
2013-09-05 20:45 ` [PATCH 4/9] NVMe: Reset failed controller Keith Busch
2013-09-05 20:45 ` [PATCH 5/9] NVMe: Abort timed out commands Keith Busch
2013-09-05 20:45 ` [PATCH 6/9] NVMe: User initiated controller reset Keith Busch
2013-09-05 20:45 ` [PATCH 7/9] NVMe: Add shutdown pci callback Keith Busch
2013-09-05 20:45 ` [PATCH 8/9] NVMe: Set queue db only when queue is initialized Keith Busch
2013-09-05 20:45 ` [PATCH 9/9] NVMe: Don't wait for delete queues to complete Keith Busch

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=alpine.LRH.2.03.1309051651040.1857@AMR \
    --to=keith.busch@intel.com \
    /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).