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: <20200417150350.GI17661@paulmck-ThinkPad-P72>
Date:   Fri, 17 Apr 2020 08:03:50 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Marco Elver <elver@...gle.com>
Cc:     Wei Yongjun <weiyongjun1@...wei.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        kasan-dev <kasan-dev@...glegroups.com>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH -next] kcsan: Use GFP_ATOMIC under spin lock

On Fri, Apr 17, 2020 at 11:23:05AM +0200, Marco Elver wrote:
> On Fri, 17 Apr 2020 at 04:56, Wei Yongjun <weiyongjun1@...wei.com> wrote:
> >
> > A spin lock is taken here so we should use GFP_ATOMIC.
> >
> > Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
> 
> Good catch, thank you!
> 
> Reviewed-by: Marco Elver <elver@...gle.com>

Queued and pushed, thank you both!

							Thanx, Paul

> > ---
> >  kernel/kcsan/debugfs.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/kernel/kcsan/debugfs.c b/kernel/kcsan/debugfs.c
> > index 1a08664a7fab..023e49c58d55 100644
> > --- a/kernel/kcsan/debugfs.c
> > +++ b/kernel/kcsan/debugfs.c
> > @@ -230,7 +230,7 @@ static ssize_t insert_report_filterlist(const char *func)
> >                 /* initial allocation */
> >                 report_filterlist.addrs =
> >                         kmalloc_array(report_filterlist.size,
> > -                                     sizeof(unsigned long), GFP_KERNEL);
> > +                                     sizeof(unsigned long), GFP_ATOMIC);
> >                 if (report_filterlist.addrs == NULL) {
> >                         ret = -ENOMEM;
> >                         goto out;
> > @@ -240,7 +240,7 @@ static ssize_t insert_report_filterlist(const char *func)
> >                 size_t new_size = report_filterlist.size * 2;
> >                 unsigned long *new_addrs =
> >                         krealloc(report_filterlist.addrs,
> > -                                new_size * sizeof(unsigned long), GFP_KERNEL);
> > +                                new_size * sizeof(unsigned long), GFP_ATOMIC);
> >
> >                 if (new_addrs == NULL) {
> >                         /* leave filterlist itself untouched */
> >
> >
> >
> >
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ