xfs
[Top] [All Lists]

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

To: Utako Kusaka <utako@xxxxxxxxxxxxxx>
Subject: Re: [PATCH] Fix segmentation fault when using xfs_quota state command.
From: Nathan Scott <nscott@xxxxxxxxxx>
Date: Fri, 27 Apr 2007 13:58:22 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <200704270240.AA05279@xxxxxxxxxxxxxxxxxxxxxxxx>
Organization: Aconex
References: <200704270240.AA05279@xxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: nscott@xxxxxxxxxx
Sender: xfs-bounce@xxxxxxxxxxx
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>