Re: [PATCH] ext4: fix error handling in ext4_fill_super()

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

 



On Mon, Feb 25, 2013 at 02:39:49PM -0500, Jeff Mahoney wrote:
> Commit 07aa2ea13814ea60d12f7330b6d5ccfdb0c3ba4d upstream.
> 
> There are some places in ext4_fill_super() where we would not return
> proper error code if something fails. The confusion is caused probably
> due to the fact that we have two "kind-of" return variables 'ret'and
> 'err'.
> 
> 'ret' is used to return error code from ext4_fill_super() where err is
> used to store return values from other functions within ext4_fill_super().
> However some places were missing the obligatory 'ret = err'. We could
> put the assignment where it is missing, but we can have better "future
> proof" solution. Or we could convert the code to use just one, but it
> would require more rewrites.
> 
> This commit fixes the problem by returning value from 'err' variable if
> it is set and 'ret' otherwise in error handling branch of the
> ext4_fill_super(). The reasoning is that 'ret' value is often set to
> default "-EINVAL" or explicit value, where 'err' is used to store
> return value from other functions and should be otherwise zero.
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=48431
> 
> Cc: stable@xxxxxxxxxxxxxxx # 3.7.x

3.7 is now end-of-life, so I can't apply this here, sorry.

But thanks for the other ext4 patches, much appreciated.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]