All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] use symbolic constants in generic lseek code
@ 2007-02-20 21:57 Chris Snook
  2007-02-20 22:01 ` [PATCH 1/2] " Chris Snook
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Snook @ 2007-02-20 21:57 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, dhowells, jeffpc, csnook

The generic lseek code in fs/read_write.c uses hardcoded values for
SEEK_{SET,CUR,END}.

Patch 1 fixes the case statements to use the symbolic constants in
include/linux/fs.h, and should not be at all controversial.

Patch 2 adds a SEEK_MAX and uses it to validate user arguments.  This makes
the code a little cleaner and also enables future extensions (such as
SEEK_DATA and SEEK_HOLE).  If anyone has a problem with this, please speak up.

-- Chris


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

end of thread, other threads:[~2007-02-21 11:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-20 21:57 [PATCH 0/2] use symbolic constants in generic lseek code Chris Snook
2007-02-20 22:01 ` [PATCH 1/2] " Chris Snook
2007-02-20 22:05 ` [PATCH 2/2] use use SEEK_MAX to validate user lseek arguments Chris Snook
2007-02-21 11:38 ` [PATCH 0/2] use symbolic constants in generic lseek code David Howells

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.