lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAH2r5muYv=tMkkX2bV0W3OU7Z8GLPwiekh_6D0pPQp+ybhmuMQ@mail.gmail.com>
Date:   Sat, 5 Jun 2021 15:47:07 -0500
From:   Steve French <smfrench@...il.com>
To:     Rikard Falkeborn <rikard.falkeborn@...il.com>
Cc:     CIFS <linux-cifs@...r.kernel.org>,
        samba-technical <samba-technical@...ts.samba.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Samuel Cabrero <scabrero@...e.de>
Subject: Re: [PATCH] cifs: Constify static struct genl_ops

merged into cifs-2.6.git for-next

On Wed, May 26, 2021 at 4:06 PM Rikard Falkeborn
<rikard.falkeborn@...il.com> wrote:
>
> The only usage of cifs_genl_ops[] is to assign its address to the ops
> field in the genl_family struct, which is a pointer to const. Make it
> const to allow the compiler to put it in read-only memory.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@...il.com>
> ---
>  fs/cifs/netlink.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/netlink.c b/fs/cifs/netlink.c
> index 5aaabe4cc0a7..291cb606f149 100644
> --- a/fs/cifs/netlink.c
> +++ b/fs/cifs/netlink.c
> @@ -30,7 +30,7 @@ static const struct nla_policy cifs_genl_policy[CIFS_GENL_ATTR_MAX + 1] = {
>         [CIFS_GENL_ATTR_SWN_RESOURCE_NAME]      = { .type = NLA_STRING},
>  };
>
> -static struct genl_ops cifs_genl_ops[] = {
> +static const struct genl_ops cifs_genl_ops[] = {
>         {
>                 .cmd = CIFS_GENL_CMD_SWN_NOTIFY,
>                 .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
> --
> 2.31.1
>


-- 
Thanks,

Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ