All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Rajnoha <prajnoha@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] libdm: fix races with udev
Date: Thu, 19 Sep 2013 10:15:42 +0200	[thread overview]
Message-ID: <523AB2AE.3020103@redhat.com> (raw)
In-Reply-To: <alpine.LRH.2.02.1309161523010.9077@file01.intranet.prod.int.rdu2.redhat.com>

On 09/16/2013 09:23 PM, Mikulas Patocka wrote:
> libdm: fix races with udev
> 
> On newer systems (Debian 6 and newer), udev manages nodes in /dev/mapper
> directory. It creates, deletes and renames the nodes according to the
> state of the kernel driver.
> 
> dmsetup tries to manage nodes in /dev/mapper too, so it can race with
> udev. dmsetup checks if the node was created/deleted/renamed with the stat
> syscall, and skips the operation if it was. However, if udev
> creates/deletes/renames the node after the stat syscall and before the
> mknod/unlink/rename syscall, dmsetup reports an error.
> 

These checks are performed after udev is synchronized (the dm_udev_wait call)
and after the udev processing is complete, so we normally shouldn't get into this
problem unless there is some bug in certain version of lvm2/udev rules.

Is this reproducible with upstream code as well or was that with some older version only
that is currently in Debian?

Peter



  reply	other threads:[~2013-09-19  8:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-16 19:23 [PATCH] libdm: fix races with udev Mikulas Patocka
2013-09-19  8:15 ` Peter Rajnoha [this message]
2013-09-23 18:07   ` Mikulas Patocka

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=523AB2AE.3020103@redhat.com \
    --to=prajnoha@redhat.com \
    --cc=lvm-devel@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.