Re: [PATCH 1/5] xfsprogs: libxcmd: don't clobber fs_table on realloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 28, 2011 at 05:57:08AM -0500, Alex Elder wrote:
> In fs_table_insert(), realloc() is called to resize the global
> fs_table.  If it fails, it overwrites a previously valid fs_table
> pointer with NULL.
> 
> Instead, assign the return value to a local temporary and overwrite
> fs_table only if the realloc() call succeeds.  The only defined
> errno value for a realloc() failure is ENOMEM, so return that
> explicitly in the event it fails.

Looks good.  Did you encounter this issue in real life?

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux