public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: "Mantas Mikulėnas" <grawity@gmail.com>
To: util-linux@vger.kernel.org
Subject: umount crashes when trying to umount a non-mountpoint
Date: Fri, 22 Mar 2013 23:54:52 +0200	[thread overview]
Message-ID: <kiijva$3gc$1@ger.gmane.org> (raw)

If I run `umount /foo` where /foo is an existing directory, but not a
mountpoint, `umount` (v2.23-rc1) crashes in mnt_copy_fs() instead of
printing the usual "not mounted" message:

> Program terminated with signal 11, Segmentation fault.
> #0  mnt_copy_fs (dest=0x1fd2ea0, src=0x2) at libmount/src/fs.c:140
> 140		dest->id         = src->id;
> (gdb) bt
> #0  mnt_copy_fs (dest=0x1fd2ea0, src=0x2) at libmount/src/fs.c:140
>         org = 0x1fd2ea0
> #1  0x00007f5adb9a8a70 in lookup_umount_fs (cxt=0x1fd2da0)
>     at libmount/src/context_umount.c:212
>         tgt = 0x1fd2f70 "\200@\375\001"
>         fs = 0x2
>         rc = 1
> #2  mnt_context_prepare_umount (cxt=cxt@entry=0x1fd2da0)
>     at libmount/src/context_umount.c:684
>         rc = <optimized out>
>         __PRETTY_FUNCTION__ = "mnt_context_prepare_umount"
> #3  0x00007f5adb9a9e48 in mnt_context_umount (cxt=cxt@entry=0x1fd2da0)
>     at libmount/src/context_umount.c:839
>         rc = <optimized out>
>         __PRETTY_FUNCTION__ = "mnt_context_umount"
> #4  0x00000000004035a5 in umount_one (cxt=0x1fd2da0, spec=<optimized out>)
>     at sys-utils/umount.c:296
>         rc = <optimized out>
> #5  0x0000000000402c58 in main (argc=<optimized out>, argv=<optimized out>)
>     at sys-utils/umount.c:627
> ...
> (gdb) p dest
> $1 = (struct libmnt_fs *) 0x608ea0
> (gdb) p src
> $2 = (const struct libmnt_fs *) 0x2

-- 
Mantas Mikulėnas <grawity@gmail.com>


             reply	other threads:[~2013-03-22 21:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 21:54 Mantas Mikulėnas [this message]
2013-03-25  8:18 ` umount crashes when trying to umount a non-mountpoint Karel Zak

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='kiijva$3gc$1@ger.gmane.org' \
    --to=grawity@gmail.com \
    --cc=util-linux@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