All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sheng Yong <shengyong1@huawei.com>
To: Richard Weinberger <richard@nod.at>,
	Michael Niarchos <michael.niarchos@gmail.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: Cannot mount ubifs partition
Date: Thu, 14 May 2015 11:45:47 +0800	[thread overview]
Message-ID: <55541A6B.6060406@huawei.com> (raw)
In-Reply-To: <5553174C.6000000@nod.at>

Hi, folks,

On 5/13/2015 5:20 PM, Richard Weinberger wrote:
> Am 13.05.2015 um 11:06 schrieb Michael Niarchos:
>>
>>
>> On 05/13/2015 11:59 AM, Richard Weinberger wrote:
>>> Am 13.05.2015 um 10:56 schrieb Michael Niarchos:
>>>> Volume ID:   0 (on ubi0)
>>>> Type:        dynamic
>>>> Alignment:   1
>>>> Size:        3964 LEBs (503332864 bytes, 480.0 MiB)
>>>> State:       OK
>>>> Name:        ubi-rootfs
>>>> Character device major/minor: 246:1
>>>
>>> Is the device node present?
>>>
>>> Thanks,
>>> //richard
>>>
>> Yes, it is present
>>
>> root@zx3-pm3-zynq7:~# find /dev -name "ubi*"
>> /dev/ubi0_0
>> /dev/ubi0
>> /dev/ubi_ctrl
> 
> BTW: Have you created the nodes by hand? Do major/minor numbers match?
If we create the dev node by hand, it is hard for kernel to notice that.

UBI (and even driver base) seems doesn't know and doesn't care if device
nodes already exist. UBI just checks the ubi_devices, registers devices,
and tells udev to make node. Although everything seems ok, `mount' will
fail because of wrong device node. However, the "device node" is removed
when detaching without any warning or error message. In this way, UBI
could delete the file without user's permission.

Is this appropriate? Shall we add some code in ubidetach to detect whether
the "device node" to be removed is correct?

thanks,
Sheng

> 
> Thanks,
> //richard
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 
> 

  parent reply	other threads:[~2015-05-14  3:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5552EE30.8060203@gmail.com>
2015-05-13  6:25 ` Cannot mount ubifs partition Michael Niarchos
2015-05-13  6:49   ` Richard Weinberger
2015-05-13  8:48     ` Michael Niarchos
2015-05-13  8:50       ` Richard Weinberger
2015-05-13  8:56         ` Michael Niarchos
2015-05-13  8:59           ` Richard Weinberger
2015-05-13  9:06             ` Michael Niarchos
2015-05-13  9:10               ` Richard Weinberger
2015-05-13  9:27                 ` Michael Niarchos
2015-05-13  9:20               ` Richard Weinberger
2015-05-13  9:43                 ` Michael Niarchos
2015-05-13 10:16                   ` Richard Weinberger
     [not found]                     ` <5553286E.2090303@gmail.com>
     [not found]                       ` <55532AA2.5020808@nod.at>
2015-05-13 10:58                         ` Michael Niarchos
2015-05-13 10:59                           ` Richard Weinberger
2015-05-13 11:19                             ` Michael Niarchos
2015-05-14  3:45                 ` Sheng Yong [this message]
2015-05-14  7:58                   ` Richard Weinberger
2015-05-14  8:24                     ` Sheng Yong
2015-05-14  8:42                       ` Richard Weinberger
     [not found] <mailman.43705.1431478462.22890.linux-mtd@lists.infradead.org>
2015-05-13  1:57 ` Bean Huo 霍斌斌 (beanhuo)
2015-05-13  6:29   ` Michael Niarchos
2015-05-12 19:38 Michael N
2015-05-13  3:05 ` Brian Norris

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=55541A6B.6060406@huawei.com \
    --to=shengyong1@huawei.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=michael.niarchos@gmail.com \
    --cc=richard@nod.at \
    /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.