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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Apr 2020 17:52:09 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Dejin Zheng <zhengdejin5@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Thomas Gleixner <tglx@...utronix.de>, FlorianSchandinat@....de,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Ralf Baechle <ralf@...ux-mips.org>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        linux-fbdev@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] console: console: Complete exception handling in newport_probe()

On Thu, Apr 23, 2020 at 5:26 PM Dejin Zheng <zhengdejin5@...il.com> wrote:
>
> A call of the function ¡°do_take_over_console¡± can fail here.
> The corresponding system resources were not released then.
> Thus add a call of the function ¡°iounmap¡± together with the check
> of a failure predicate.

...

> CC: Andy Shevchenko <andy.shevchenko@...il.com>

Use Cc: Better to read.

...

> v1 -> v2:
>         - modify the commit comments by Markus'suggestion.

What suggestion? You need to be clear in changelog what exactly has
been done without looking to any previous mail.

...

>         console_lock();
>         err = do_take_over_console(&newport_con, 0, MAX_NR_CONSOLES - 1, 1);
>         console_unlock();
> +
> +       if (err)
> +               iounmap((void *)npregs);
>         return err;
>  }

I have briefly looked at the code (it is actually quite old one!), and
I think this is half-baked solution, besides the fact of missed
__iomem annotation and useless explicit casting.
The proper one seems to switch to memremap() and do memunmap() here.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ