• Abhijith Das's avatar
    GFS2: Fix writing to non-page aligned gfs2_quota structures · a03167ae
    Abhijith Das authored
    commit 7e619bc3 upstream.
    
    This is the upstream fix for this bug. This patch differs
    from the RHEL5 fix (Red Hat bz #555754) which simply writes to the 8-byte
    value field of the quota. In upstream quota code, we're
    required to write the entire quota (88 bytes) which can be split
    across a page boundary. We check for such quotas, and read/write
    the two parts from/to the corresponding pages holding these parts.
    
    With this patch, I don't see the bug anymore using the reproducer
    in Red Hat bz 555754. I successfully ran a couple of simple tests/mounts/
    umounts and it doesn't seem like this patch breaks anything else.
    Signed-off-by: default avatarAbhi Das <adas@redhat.com>
    Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
    [Backported to 2.6.32 by dann frazier <dannf@debian.org>]
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    a03167ae
quota.c 31.4 KB