xfs
[Top] [All Lists]

Re: [PATCH 1/2]segmentation fault in xfs_io mread/mwrite command

To: Utako Kusaka <utako@xxxxxxxxxxxxxx>
Subject: Re: [PATCH 1/2]segmentation fault in xfs_io mread/mwrite command
From: Nathan Scott <nscott@xxxxxxxxxx>
Date: Thu, 30 Nov 2006 09:22:41 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <200611290026.AA04738@TNESG9305.tnes.nec.co.jp>
Organization: Aconex
References: <200611290026.AA04738@TNESG9305.tnes.nec.co.jp>
Reply-to: nscott@xxxxxxxxxx
Sender: xfs-bounce@xxxxxxxxxxx
On Wed, 2006-11-29 at 09:26 +0900, Utako Kusaka wrote:
> Hi,
> 
> I found the following issues in xfs_io.
>  mread command:
>   a) Causes a segmentation fault.
>      Because "length"+1 bytes data is copied to buffer in read_mapping(),
>      but buffer size is "length".
>   b) Reads from wrong offset.
>   c) The first byte of dump data is incorrect when length > page size.
>  mwrite command:
>   d) Data placement is incorrect when -r option is specified
>      because of wrong for-loop counter.
> 
> This patch fixes them.
> 

Looks OK - could you send explicit test cases that demonstrate each
problem please?  (i.e. actual xfs_io invocations).  Particularly the
segfault should be easy to show, something like:
xfs_io -f -c 'mmap ...' -c 'mread ...' /tmp/foo)

That way they can be added to the regression test suite to ensure these
things don't spontaneously break themselves in the future.

thanks!

-- 
Nathan


<Prev in Thread] Current Thread [Next in Thread>