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]
Message-ID: <2dccf9e6-d9d7-200e-f689-56c962ea5e7e@deltatee.com>
Date:   Mon, 7 Jan 2019 18:16:02 -0700
From:   Logan Gunthorpe <logang@...tatee.com>
To:     Joey Zhang <joey.zhang@...rochip.com>, jdmason@...zu.us,
        dave.jiang@...el.com, allenbh@...il.com,
        linux-ntb@...glegroups.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] NTB: ntb_transport: Free MWs in
 ntb_transport_link_cleanup()



On 06/01/19 08:12 PM, Joey Zhang wrote:
> If NTB peer host crashes or reboots, the NTB transport link will be
> down and the MWs of NTB transport will be invalid. But the
> ntb_transport_link_cleanup() does not free these invalid MWs. When
> the NTB peer host is recovered later, NTB transport link will be
> up and the ntb_set_mw() will not reset up MWs. Because the MWs of
> NTB transport are invalid, the NTB transport will not work.
> 
> We can fix it by freeing MWs when NTB transport link is down, then
> the ntb_set_mw() will reset up MWs when NTB transport link is up.
> 
> Signed-off-by: Joey Zhang <joey.zhang@...rochip.com>

Looks ok to me.

Reviewed By: Logan Gunthorpe <logang@...tatee.com>

> ---
>  drivers/ntb/ntb_transport.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c
> index 3bfdb45..6e8902d 100644
> --- a/drivers/ntb/ntb_transport.c
> +++ b/drivers/ntb/ntb_transport.c
> @@ -862,6 +862,9 @@ static void ntb_transport_link_cleanup(struct ntb_transport_ctx *nt)
>  	if (!nt->link_is_up)
>  		cancel_delayed_work_sync(&nt->link_work);
>  
> +	for (i = 0; i < nt->mw_count; i++)
> +		ntb_free_mw(nt, i);
> +
>  	/* The scratchpad registers keep the values if the remote side
>  	 * goes down, blast them now to give them a sane value the next
>  	 * time they are accessed
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ