[LU-16291] make kobj_type constant Created: 03/Nov/22 Updated: 29/Nov/23 Resolved: 13/Dec/22 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.16.0, Lustre 2.15.3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Jian Yu | Assignee: | Jian Yu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 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 |
| Comments |
| Comment by Jian Yu [ 03/Nov/22 ] |
|
Hi stancheff, I'm not sure if you already have a patch for this issue. I'm working on it based on your patch series. |
| Comment by Shaun Tancheff [ 03/Nov/22 ] |
|
I did encounter that in I think you will not need a compile test, just add const to the declaration in class_modify_config(). |
| Comment by Jian Yu [ 03/Nov/22 ] |
|
Got it, thank you, Shaun. |
| Comment by Gerrit Updater [ 04/Nov/22 ] |
|
"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49043 |
| Comment by Gerrit Updater [ 10/Nov/22 ] |
|
"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49123 |
| Comment by Gerrit Updater [ 13/Dec/22 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49043/ |
| Comment by Peter Jones [ 13/Dec/22 ] |
|
Landed for 2.16 |
| Comment by Gerrit Updater [ 08/Mar/23 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49123/ |
| Comment by Gerrit Updater [ 28/Nov/23 ] |
|
"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53263 |
| Comment by Gerrit Updater [ 29/Nov/23 ] |
|
"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53277 |