Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Floris Bos <bos@je-eigen-domein.nl>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] wf111: Add mdev dependency
Date: Wed, 12 Aug 2015 12:29:45 +0200	[thread overview]
Message-ID: <55CB2019.5030304@je-eigen-domein.nl> (raw)
In-Reply-To: <1439277422-26111-1-git-send-email-cdhmanning@gmail.com>

On 08/11/2015 09:17 AM, Charles Manning wrote:
> wf111 really needs mdev

Problem I have seen with mdev in its default configuration is that it 
doesn't just handle firmware load requests, but also takes it upon 
itself to create/delete the device nodes (even when that already is 
being handled by devtmpfs), and does a bad job with that.

It doesn't preserve sequencing by default, and events are processed 
concurrently, and get out-of-order.

Becomes a problem if your software for example does anything that causes 
the kernel to re-read the partition table of your storage.
In that case the kernel sends events to delete all devices nodes of the 
storage device, and add them again, right after each other.
However depending on your luck, they can get processed in reverse order:

==
mdev[598]: 9.191594 ACTION:add SUBSYSTEM:block DEVNAME:mmcblk0p6 
DEVPATH:/devices/platform/soc/3f300000.mmc/mmc_host/mmc0/mmc0:1234/block/mmcblk0/mmcblk0p6
mdev[598]: dev 179,6
[...]
mdev[593]: 9.192168 ACTION:remove SUBSYSTEM:block DEVNAME:mmcblk0p6 
DEVPATH:/devices/platform/soc/3f300000.mmc/mmc_host/mmc0/mmc0:1234/block/mmcblk0/mmcblk0p6
mdev[593]: rule matched, line -1
mdev[593]: unlink: mmcblk0p6
==

Add is processed before remove, with the end result that /dev/mmcblk0p6 
goes missing...


So please don't pull in mdev automatically just for firmware loading, 
because it does more than just that, and can have serious side effects.


Yours sincerely,

Floris Bos

  parent reply	other threads:[~2015-08-12 10:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11  7:17 [Buildroot] [PATCH] wf111: Add mdev dependency Charles Manning
2015-08-11 11:40 ` Baruch Siach
2015-08-11 20:11   ` Charles Manning
2015-08-12  4:38     ` Baruch Siach
2015-08-12  5:16       ` Charles Manning
2015-08-12  5:38         ` Baruch Siach
2015-08-12  5:56           ` Charles Manning
2015-08-12 22:54         ` Floris Bos
2015-08-12 10:29 ` Floris Bos [this message]
2015-08-12 20:49   ` Charles Manning
2015-08-12 21:47     ` Floris Bos
2015-08-18 20:28     ` Thomas Petazzoni

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=55CB2019.5030304@je-eigen-domein.nl \
    --to=bos@je-eigen-domein.nl \
    --cc=buildroot@busybox.net \
    /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