RE: [RESEND v5 3/4] platform/chrome: cros_ec_debugfs: Fix permissions for panicinfo

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

 



> @@ -454,7 +454,7 @@ static int cros_ec_create_panicinfo(struct cros_ec_debugfs *debug_info)
>       debug_info->panicinfo_blob.data = data;
>       debug_info->panicinfo_blob.size = ret;
>
> -     debugfs_create_blob("panicinfo", S_IFREG | 0444, debug_info->dir,
> +     debugfs_create_blob("panicinfo", 0444, debug_info->dir,
>                           &debug_info->panicinfo_blob);
>

This just looks like a bug that S_IFREG was passed in the "mode" argument.

Your change in part 2 doesn't really affect much here.

  debugfs_create_blob()
    debugfs_create_file_unsafe()
      __debugfs_create_file()

which does:

	if (!(mode & S_IFMT))
                	mode |= S_IFREG;
        	BUG_ON(!S_ISREG(mode));

So this is a fine cleanup. But your patch description about ensuring that
the file remains read-only isn't accurate. Your change didn't affect the mode
of this file.

-Tony

	





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux