Bug 61355 - tmpfs does not honor O_TRUNC in 2.4.18-0.4
Summary: tmpfs does not honor O_TRUNC in 2.4.18-0.4
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: kernel (Show other bugs)
(Show other bugs)
Version: 1.0
Hardware: i386 Linux
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2002-03-18 14:09 UTC by Michael Tokarev
Modified: 2007-03-27 03:51 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-04-21 07:57:13 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Michael Tokarev 2002-03-18 14:09:59 UTC
Description of Problem:

shmfs/tmpfs ignores O_TRUNC flag at open time

Version-Release number of selected component (if applicable):

Rawhide kernel-2.4.18-0.4, built locally.  tmpfs mounted in /tmp.

How Reproducible:


Steps to Reproduce:

1. mount tmpfs as /tmp
2. echo 1234567 > /tmp/test
3. echo 1 > /tmp/test
4. cat /tmp/test or ls -l /tmp/test -- file should contain 2 bytes

Actual Results:


Expected Results:


Additional Information:
This is a very serious issue.  It broke many apps (I discovered this
first for patch(1) program that produces garbage as a result).  All
previous kernel versions as I know of was ok.

Comment 1 Michael Tokarev 2002-03-18 14:13:22 UTC
Sorry a typo -- not shmfs but tmpfs.

Comment 2 Michael K. Johnson 2002-03-28 23:15:34 UTC
We recommend against using tmpfs for /tmp, despite the name.

Comment 3 Alan Cox 2002-03-28 23:31:59 UTC
Looks like -0.4 picked up a bug fixed in later -ac. You'll find I also broke
permission/owner setting. Should be fixed in our build tree if Arjan is on the
ball 8)

Comment 4 Arjan van de Ven 2002-04-10 11:46:40 UTC
should be fixed in 2.4.18-0.13 (skipjack2) or 2.4.18-0.18 (rawhide)

Comment 5 Michael Tokarev 2002-04-21 07:57:09 UTC
Yes, indicated kernels, and 2.4.18-0.22, seems to be ok.
I'm sorry for long delay - had no chance to test this earlier (it is
very difficult to make any rpm from current rawhide -- way too much
bload/dependances... ;).  I think this bug may be closed now.  Should
I do that?

Comment 6 Arjan van de Ven 2002-04-21 09:00:36 UTC
thanks for verifying!

Note You need to log in before you can comment on or make changes to this bug.