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, 10 Jan 2019 23:40:01 +0000
From:   "Chen, Tim C" <tim.c.chen@...el.com>
To:     Andrew Morton <akpm@...ux-foundation.org>,
        Yang Shi <yang.shi@...ux.alibaba.com>
CC:     "Huang, Ying" <ying.huang@...el.com>,
        "minchan@...nel.org" <minchan@...nel.org>,
        "daniel.m.jordan@...cle.com" <daniel.m.jordan@...cle.com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [v5 PATCH 1/2] mm: swap: check if swap backing device is
 congested or not

> >
> > +	if (si->flags & (SWP_BLKDEV | SWP_FS)) {
> 
> I re-read your discussion with Tim and I must say the reasoning behind this
> test remain foggy.

I was worried that the dereference

inode = si->swap_file->f_mapping->host;

is not always safe for corner cases.

So the test makes sure that the dereference is valid.

> 
> What goes wrong if we just remove it?

If the dereference to get inode is always safe, we can remove it.


Thanks.

Tim

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ