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]
Date:   Mon, 19 Sep 2016 14:05:08 +0000
From:   "Bounine, Alexandre" <Alexandre.Bounine@....com>
To:     Andrew Morton <akpm@...ux-foundation.org>
CC:     Alexey Khoroshilov <khoroshilov@...ras.ru>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/1] rapidio/rio_cm: avoid GFP_KERNEL in atomic context

On Fri, Sep 16, 2016 6:08 PM Andrew Morton <akpm@...ux-foundation.org> wrote:

> >
> > +	if (!list_empty(&list))
> > +		list_for_each_entry(ch, &list, ch_node)
> > +			riocm_send_close(ch);
> > +
> >  	return NOTIFY_DONE;
> >  }
> 
> Fair enough.
> 
> Can we remove the !list_empty() test?

Sure. This check is not needed.

> 
> --- a/drivers/rapidio/rio_cm.c~rapidio-rio_cm-avoid-gfp_kernel-in-
> atomic-context-fix
> +++ a/drivers/rapidio/rio_cm.c
> @@ -2268,9 +2268,8 @@ static int rio_cm_shutdown(struct notifi
>  	}
>  	spin_unlock_bh(&idr_lock);
> 
> -	if (!list_empty(&list))
> -		list_for_each_entry(ch, &list, ch_node)
> -			riocm_send_close(ch);
> +	list_for_each_entry(ch, &list, ch_node)
> +		riocm_send_close(ch);
> 
>  	return NOTIFY_DONE;
>  }
> _

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ