Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 61355

Summary: tmpfs does not honor O_TRUNC in 2.4.18-0.4
Product: [Retired] Red Hat Raw Hide Reporter: Michael Tokarev <mjt>
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: high    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-04-21 07:57:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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:

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 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!