public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* What protects f_pos?
@ 2000-11-04 22:16 David Wragg
  2000-11-11 23:54 ` tytso
  0 siblings, 1 reply; 6+ messages in thread
From: David Wragg @ 2000-11-04 22:16 UTC (permalink / raw)
  To: linux-kernel

Since f_pos of struct file is a loff_t, on 32-bit architectures it
needs a lock to make accesses atomic (or some more sophisticated form
of protection).  But looking in 2.4.0-test10, there doesn't seem to be
any such lock.

The llseek op is called with the Big Kernel Lock, but unlike in 2.2,
the read and write ops are called without any locks held, and so
generic_file_{read|write} make unprotected accesses to f_pos (through
their ppos argument).

Is this something for Ted's todo list?

David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

end of thread, other threads:[~2000-11-13 15:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-04 22:16 What protects f_pos? David Wragg
2000-11-11 23:54 ` tytso
2000-11-12  1:56   ` David Wragg
2000-11-12 22:27     ` David Schwartz
2000-11-13 15:22       ` David Wragg
2000-11-13 15:44         ` Richard B. Johnson

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