zfs/module
Brian Behlendorf f32ec2346b Linux bcopy() requires word aligned memory, use memcpy()
Much to my surprise bcopy() under Linux appears to copy the data in
word sized chunks.  It does the right thing but if you buffer is not
a multiple of the word size you will be reading past the end of your
buffer.  Or at least that is what valgrind is reporting.  We should
be using mempcy() anyway on Linux so replace bcopy() with memcpy()
to resolve the issue.

==305== Thread 211:
==305== Invalid read of size 8
==305==    at 0x3BCD28357D: _wordcopy_fwd_dest_aligned (in /lib64/libc-2.11.1.so)
==305==    by 0x3BCD282B05: bcopy (in /lib64/libc-2.11.1.so)
==305==    by 0x58D7FEF: dmu_write (dmu.c:730)
==305==    by 0x591C942: spa_history_write (spa_history.c:165)
==305==    by 0x591D255: spa_history_log_sync (spa_history.c:277)
==305==    by 0x591D545: log_internal (spa_history.c:450)
==305==    by 0x591D5EC: spa_history_log_internal (spa_history.c:475)
==305==    by 0x5902319: dsl_prop_set_sync (dsl_prop.c:707)
==305==    by 0x5906A7D: dsl_sync_task_group_sync (dsl_synctask.c:199)
==305==    by 0x58FF4EC: dsl_pool_sync (dsl_pool.c:376)
==305==    by 0x591744C: spa_sync (spa.c:5365)
==305==    by 0x5922C85: txg_sync_thread (txg.c:414)
2010-06-28 11:26:20 -07:00
..
avl Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-05-28 15:46:10 -07:00
nvpair Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-05-28 15:46:10 -07:00
unicode Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-03-11 14:08:51 -07:00
zcommon Merge commit 'refs/top-bases/linux-kernel-disk' into linux-kernel-disk 2010-06-14 15:52:11 -07:00
zfs Linux bcopy() requires word aligned memory, use memcpy() 2010-06-28 11:26:20 -07:00
.gitignore Add .gitignore files to exclude build products 2010-01-08 11:35:17 -08:00
Makefile.in Include all headers regardless of depth 2010-03-09 10:20:34 -08:00