aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/fm.c
diff options
context:
space:
mode:
authorTim Chase <[email protected]>2013-12-19 00:30:56 -0600
committerBrian Behlendorf <[email protected]>2013-12-20 13:52:33 -0800
commit5d862cb0d9a4b6dcc97a88fa0d5a7a717566e5ab (patch)
treebb1a7e397921e57af9e82187c042b951b0134a94 /module/zfs/fm.c
parentac0340970c8f548a97f3c3c1e9c6fc7b60efd824 (diff)
Properly handle updates of variably-sized SA entries.
During the update process in sa_modify_attrs(), the sizes of existing variably-sized SA entries are obtained from sa_lengths[]. The case where a variably-sized SA was being replaced neglected to increment the index into sa_lengths[], so subsequent variable-length SAs would be rewritten with the wrong length. This patch adds the missing increment operation so all variably-sized SA entries are stored with their correct lengths. Previously, a size-changing update of a variably-sized SA that occurred when there were other variably-sized SAs in the bonus buffer would cause the subsequent SAs to be corrupted. The most common case in which this would occur is when a mode change caused the ZPL_DACL_ACES entry to change size when a ZPL_DXATTR (SA xattr) entry already existed. The following sequence would have caused a failure when xattr=sa was in force and would corrupt the bonus buffer: open(filename, O_WRONLY | O_CREAT, 0600); ... lsetxattr(filename, ...); /* create xattr SA */ chmod(filename, 0650); /* enlarges the ACL */ Signed-off-by: Chris Dunlop <[email protected]> Signed-off-by: Ned Bass <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1978
Diffstat (limited to 'module/zfs/fm.c')
0 files changed, 0 insertions, 0 deletions