Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-16291

make kobj_type constant

    XMLWordPrintable

Details

    • 3
    • 9223372036854775807

    Description

      Kernel v5.16-rc2-28-gee6d3dd4ed48:

      commit ee6d3dd4ed48ab24b74bab3c3977b8218518247d
      Author:     Wedson Almeida Filho <wedsonaf@google.com>
      AuthorDate: Fri Dec 24 23:13:45 2021 +0000
      Commit:     Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      CommitDate: Mon Dec 27 10:40:00 2021 +0100
      
          driver core: make kobj_type constant.
          
          This way instances of kobj_type (which contain function pointers) can be
          stored in .rodata, which means that they cannot be [easily/accidentally]
          modified at runtime.
          
          Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
          Link: https://lore.kernel.org/r/20211224231345.777370-1-wedsonaf@google.com
          Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      

      Lustre build failed:

      lustre/obdclass/obd_config.c: In function 'class_modify_config':
      lustre/obdclass/obd_config.c:1639:13: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
      13:36:52  1639 |         typ = get_ktype(kobj);
      13:36:52       |             ^
      13:36:52 cc1: all warnings being treated as errors
      

      Attachments

        Issue Links

          Activity

            People

              yujian Jian Yu
              yujian Jian Yu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: