• Avadhut Naik's avatar
    platform/chrome: cros_ec_debugfs: Fix permissions for panicinfo · 0706526e
    Avadhut Naik authored
    The debugfs_create_blob() function has been used to create read-only binary
    blobs in debugfs. The function filters out permissions, other than S_IRUSR,
    S_IRGRP and S_IROTH, provided while creating the blobs.
    
    The very behavior though is being changed through previous patch in the
    series (fs: debugfs: Add write functionality to debugfs blobs) which makes
    the binary blobs writable by owners. Thus, all permissions provided while
    creating the blobs, except S_IRUSR,S_IWUSR, S_IRGRP, S_IROTH, will be
    filtered by debugfs_create_blob().
    
    As such, rectify the permissions of panicinfo file since the S_IFREG flag
    was anyways being filtered out by debugfs_create_blob(). Moreover, the
    very flag will always be set be set for the panicinfo file through
    __debugfs_create_file().
    Signed-off-by: default avatarAvadhut Naik <Avadhut.Naik@amd.com>
    Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Reviewed-by: default avatarTony Luck <tony.luck@intel.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    0706526e
cros_ec_debugfs.c 14.8 KB