Re: [PATCH 05/39] libext2fs: don't memcpy identical pointers when writing a cache block

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

 



On Sat, Oct 25, 2014 at 01:56:55PM -0700, Darrick J. Wong wrote:
> Sami Liedes found a scenario where we could memcpy incorrectly:
> 
> If a block read fails during an e2fsck run, the UNIX IO manager will
> call the io->read_error routine with a pointer to the internal block
> cache.  The e2fsck read error handler immediately tries to write the
> buffer back out to disk(!), at which point the block write code will
> try to copy the buffer contents back into the block cache.  Normally
> this is fine, but not when the write buffer is the cache itself!
> 
> So, plumb in a trivial check for this condition.  A more thorough
> solution would pass a duplicated buffer to the IO error handlers, but
> I don't know if that happens frequently enough to be worth the extra
> point of failure.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> Reported-by: Sami Liedes <sami.liedes@xxxxxx>

Applied, thanks.

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




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux