All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Michal Hocko <mhocko@suse.com>
Cc: Kees Cook <keescook@chromium.org>,
	Xiaoming Ni <nixiaoming@huawei.com>,
	linux-kernel@vger.kernel.org, mcgrof@kernel.org,
	yzaikin@google.com, adobriyan@gmail.com,
	linux-fsdevel@vger.kernel.org, vbabka@suse.cz,
	wangle6@huawei.com
Subject: Re: [PATCH v2] proc_sysctl: fix oops caused by incorrect command parameters.
Date: Fri, 8 Jan 2021 17:50:08 -0800	[thread overview]
Message-ID: <20210108175008.da3c60a6e402f5f1ddab2a65@linux-foundation.org> (raw)
In-Reply-To: <20210108201025.GA17019@dhcp22.suse.cz>

On Fri, 8 Jan 2021 21:10:25 +0100 Michal Hocko <mhocko@suse.com> wrote:

> > > Why would that matter? A missing value is clearly a error path and it
> > > should be reported.
> > 
> > This test is in the correct place. I think it's just a question of the
> > return values.
> 
> I was probably not clear. The test for val is at the right place. I
> would just expect -EINVAL and have the generic code to report.

It does seem a bit screwy that process_sysctl_arg() returns zero in all
situations (parse_args() is set up to handle an error return from it). 
But this patch is consistent with all the other error handling in
process_sysctl_arg().

  reply	other threads:[~2021-01-09  1:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08  2:33 [PATCH v2] proc_sysctl: fix oops caused by incorrect command parameters Xiaoming Ni
2021-01-08  9:21 ` Michal Hocko
2021-01-08 10:01   ` Xiaoming Ni
2021-01-08 11:47     ` Michal Hocko
2021-01-08 19:56       ` Kees Cook
2021-01-08 20:10         ` Michal Hocko
2021-01-09  1:50           ` Andrew Morton [this message]
2021-01-11  3:48             ` Xiaoming Ni
2021-01-11 14:21               ` Michal Hocko
2021-01-11 19:50                 ` Kees Cook
     [not found] ` <CAHp75Vfdyh1ad7p_-uqYZPyF78tOB96HKNQVXkOv_yrReo2Mcg@mail.gmail.com>
2021-01-11  3:14   ` Xiaoming Ni

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=20210108175008.da3c60a6e402f5f1ddab2a65@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=adobriyan@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=mhocko@suse.com \
    --cc=nixiaoming@huawei.com \
    --cc=vbabka@suse.cz \
    --cc=wangle6@huawei.com \
    --cc=yzaikin@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.