1
0
Fork 0

staging: set msi_domain_ops as __ro_after_init

Marked msi_domain_ops structs as __ro_after_init when called only during init.
This protects the data structure from accidental corruption.

Suggested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jess Frazelle <me@jessfraz.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
Jess Frazelle 2017-02-10 17:37:57 -08:00 committed by Greg Kroah-Hartman
parent fac103e0ab
commit 76b94eb1eb
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ static int its_fsl_mc_msi_prepare(struct irq_domain *msi_domain,
return msi_info->ops->msi_prepare(msi_domain->parent, dev, nvec, info);
}
static struct msi_domain_ops its_fsl_mc_msi_ops = {
static struct msi_domain_ops its_fsl_mc_msi_ops __ro_after_init = {
.msi_prepare = its_fsl_mc_msi_prepare,
};