Skip to content

use symbolic constants in generic lseek code

Chris Snook lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2use symbolic constants in generic lseek codefs/read_write.c+6 -60 replies
2/2use use SEEK_MAX to validate user lseek argumentsfs/read_write.c include/linux/fs.h+3 -20 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDavid Howells
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] use symbolic constants in generic lseek code

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