From: Alexey Dobriyan <adobriyan@gmail.com>
To: mcroce@redhat.com
Cc: linux-kernel@vger.kernel.org, keescook@chromium.org,
atomlin@redhat.com, akpm@linux-foundation.org
Subject: Re: [PATCH] proc/sysctl: add shared variables for range check
Date: Tue, 2 Jul 2019 20:12:48 +0300 [thread overview]
Message-ID: <20190702170228.GA4404@avx2> (raw)
> -static long zero;
> static long long_max = LONG_MAX;
>
> struct ctl_table epoll_table[] = {
> @@ -301,7 +300,7 @@ struct ctl_table epoll_table[] = {
> .maxlen = sizeof(max_user_watches),
> .mode = 0644,
> .proc_handler = proc_doulongvec_minmax,
> - .extra1 = &zero,
> + .extra1 = SYSCTL_ZERO,
> .extra2 = &long_max,
This looks wrong: proc_doulongvec_minmax() expects "long"s.
The whole patch needs rechecking.
> +/* shared constants to be used in various sysctls */
> +const =======>int<========== sysctl_vals[] = { 0, 1, INT_MAX };
> +EXPORT_SYMBOL(sysctl_vals);
next reply other threads:[~2019-07-02 17:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-02 17:12 Alexey Dobriyan [this message]
2019-07-02 17:21 ` Matteo Croce
2019-07-02 20:13 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190702170228.GA4404@avx2 \
--to=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=atomlin@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcroce@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®