Something went wrong. Try again.
(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Something went wrong. Try again.
net: hsr: constify hsr_ops and prp_ops protocol operation structures
The hsr_ops and prp_ops structures are assigned to hsr->proto_ops during device initialization and are never modified at runtime. Declaring them as const allows the compiler to place these structures in read-only memory, which improves security by preventing accidental or malicious modification of the function pointers they contain. The proto_ops field in struct hsr_priv is also updated to a const pointer to maintain type consistency. Signed-off-by: Luka Gejak <luka.gejak@linux.dev> Reviewed-by: Felix Maurer <fmaurer@redhat.com> Link: https://patch.msgid.link/20260326174600.136232-2-luka.gejak@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Author Luka Gejak Committer Jakub Kicinski Date (Mar 29, 2026, 9:37 PM UTC) Commit
Copy SHA
Parent 686aad83 686aad8353a5a4d3358deaba08b748a6b6e6d6c2