[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-xfs
Subject:    Re: [PATCH] Fix segmentation fault when using xfs_quota state
From:       Utako Kusaka <utako () tnes ! nec ! co ! jp>
Date:       2007-04-27 7:42:27
Message-ID: 200704270742.AA05287 () TNESG9305 ! tnes ! nec ! co ! jp
[Download RAW message or body]

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 list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic