All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Chris Snook" <csnook@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, dhowells@redhat.com, jeffpc@josefsipek.net,
	csnook@redhat.com
Subject: [PATCH 0/2] use symbolic constants in generic lseek code
Date: Tue, 20 Feb 2007 16:57:50 -0500	[thread overview]
Message-ID: <20070220.waF.48959600@egw.corp.redhat.com> (raw)

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


             reply	other threads:[~2007-02-20 21:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-20 21:57 Chris Snook [this message]
2007-02-20 22:01 ` [PATCH 1/2] use symbolic constants in generic lseek code 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070220.waF.48959600@egw.corp.redhat.com \
    --to=csnook@redhat.com \
    --cc=akpm@osdl.org \
    --cc=dhowells@redhat.com \
    --cc=jeffpc@josefsipek.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.