Bug 149674 - [patch] sysutils/fusefs-kmod: ftruncate() sycall on FUSE filesystems cause panic
Summary: [patch] sysutils/fusefs-kmod: ftruncate() sycall on FUSE filesystems cause panic
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Beat Gaetzi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-15 15:00 UTC by Dmitrij Tejblum
Modified: 2010-10-14 12:50 UTC (History)
0 users

See Also:


Attachments
file.diff (452 bytes, patch)
2010-08-15 15:00 UTC, Dmitrij Tejblum
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitrij Tejblum 2010-08-15 15:00:04 UTC
At early days of FreeBSD 8.x a field named `fo_truncate' was added `struct fileops' in sys/file.h, and ftruncate() syscall was made to use it. FUSE module has its own instance of `struct fileops', but it was not adapted to this change. 
(It seems that FreeBSD 7.x and earlier aren't affected by this bug.)

Fix: The attached patch can be added to the files/ directory of the sysutils/fusefs-kmod port as patch-fuse_module__fuse_main.c

Patch attached with submission follows:
How-To-Repeat: On a FUSE filesystem (e.g. ntfs-3g) do
dd if=/dev/zero count=1 oseek=1000000 of=SOMEFILE
The system will panic.
Comment 1 amistry 2010-09-03 19:20:23 UTC
Yeah, lets get this committed as it's affecting a bunch of people.

-- 
Anish Mistry
Comment 2 Michiel Overtoom 2010-09-14 02:37:54 UTC
Worked on my 8.1-REL system too, like a charm!

I can use sshfs now again, what a relief.

I will also try this on 9-CURRENT.

Greetings, 

-- 
"The ability of the OSS process to collect and harness 
the collective IQ of thousands of individuals across 
the Internet is simply amazing." - Vinod Valloppillil 
http://www.catb.org/~esr/halloween/halloween4.html
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2010-09-14 19:51:59 UTC
Maintainer of sysutils/fusefs-kmod,

Please note that PR ports/149674 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/149674

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 4 Edwin Groothuis freebsd_committer freebsd_triage 2010-09-14 19:52:02 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 5 amistry 2010-09-15 05:56:16 UTC
Approved.
-- 
Anish Mistry
Comment 6 Philip M. Gollucci freebsd_committer freebsd_triage 2010-09-17 00:39:55 UTC
State Changed
From-To: feedback->open

Maintainer approved
Comment 7 Beat Gaetzi freebsd_committer freebsd_triage 2010-10-14 10:14:27 UTC
Responsible Changed
From-To: freebsd-ports-bugs->beat

I'll take it.
Comment 8 dfilter service freebsd_committer freebsd_triage 2010-10-14 12:44:15 UTC
beat        2010-10-14 11:44:10 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/fusefs-kmod Makefile 
  Added files:
    sysutils/fusefs-kmod/files patch-fuse_module__fuse_main.c 
  Log:
  - Fix panic on FreeBSD 8.x and newer
  - Bump PORTREVISION
  
  PR:             ports/149674
  Submitted by:   Dmitrij Tejblum <dt AT yandex.ru>
  Approved by:    Anish Mistry <amistry AT am-productions.biz> (maintainer)
  
  Revision  Changes    Path
  1.31      +1 -1      ports/sysutils/fusefs-kmod/Makefile
  1.1       +14 -0     ports/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_main.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 9 Beat Gaetzi freebsd_committer freebsd_triage 2010-10-14 12:45:02 UTC
State Changed
From-To: open->closed

Committed. Thanks!