public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* umount crashes when trying to umount a non-mountpoint
@ 2013-03-22 21:54 Mantas Mikulėnas
  2013-03-25  8:18 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Mantas Mikulėnas @ 2013-03-22 21:54 UTC (permalink / raw)
  To: util-linux

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>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: umount crashes when trying to umount a non-mountpoint
  2013-03-22 21:54 umount crashes when trying to umount a non-mountpoint Mantas Mikulėnas
@ 2013-03-25  8:18 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2013-03-25  8:18 UTC (permalink / raw)
  To: Mantas Mikulėnas; +Cc: util-linux

On Fri, Mar 22, 2013 at 11:54:52PM +0200, Mantas Mikulėnas wrote:
> 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:

 Fixed. Thanks!

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-25  8:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-22 21:54 umount crashes when trying to umount a non-mountpoint Mantas Mikulėnas
2013-03-25  8:18 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox