Bug 61355 - tmpfs does not honor O_TRUNC in 2.4.18-0.4
tmpfs does not honor O_TRUNC in 2.4.18-0.4
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: kernel (Show other bugs)
1.0
i386 Linux
high Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-03-18 09:09 EST by Michael Tokarev
Modified: 2007-03-26 23:51 EDT (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description Michael Tokarev 2002-03-18 09:09:59 EST
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:

Always.

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:

1
34567

Expected Results:

1

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 09:13:22 EST
Sorry a typo -- not shmfs but tmpfs.
Comment 2 Michael K. Johnson 2002-03-28 18:15:34 EST
We recommend against using tmpfs for /tmp, despite the name.
Comment 3 Alan Cox 2002-03-28 18:31:59 EST
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 07:46:40 EDT
should be fixed in 2.4.18-0.13 (skipjack2) or 2.4.18-0.18 (rawhide)
Comment 5 Michael Tokarev 2002-04-21 03:57:09 EDT
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 05:00:36 EDT
thanks for verifying!

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