xfs
[Top] [All Lists]

Re: [PATCH] Fix segmentation fault when using xfs_quota state command.

To: nscott@xxxxxxxxxx
Subject: Re: [PATCH] Fix segmentation fault when using xfs_quota state command.
From: Utako Kusaka <utako@xxxxxxxxxxxxxx>
Date: Fri, 27 Apr 2007 16:42:27 +0900
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1177646302.6273.386.camel@edge>
References: <1177646302.6273.386.camel@edge>
Sender: xfs-bounce@xxxxxxxxxxx
Thanks for your comment.
I thought processes after fopen_write_secure() is not necessary
when the path list is empty.
But is creating an empty file necessary when specifying -f option?
This option isn't written in man page:)

--
Utako

Fri, 27 Apr 2007 13:58:22 +1000 Nathan Scott wrote:
>On Fri, 2007-04-27 at 11:40 +0900, Utako Kusaka wrote:
>> +    if (!fs_count)
>> +            return 0;
>> +
>
>Is the segfault due to this line in state.c?
>237             else if (fs_path->fs_flags & FS_MOUNT_POINT)
>
>If so, a fix that is more clear to the reader might be:
>
>- else if (fs_path->fs_flags & FS_MOUNT_POINT)
>+ else if (fs_path && fs_path->fs_flags & FS_MOUNT_POINT)
>
>This keeps the fix alongside the problematic access to fs_path.
>
>cheers.
>
>-- 
>Nathan


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