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: <20111226184122.GA4277@oc1711230544.ibm.com>
Date:	Mon, 26 Dec 2011 16:41:22 -0200
From:	Thadeu Lima de Souza Cascardo <cascardo@...ux.vnet.ibm.com>
To:	Karen Xie <kxie@...lsio.com>
Cc:	linux-scsi@...r.kernel.org, netdev@...r.kernel.org,
	michaelc@...wisc.edu, davem@...emloft.net,
	JBottomley@...allels.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] libcxgbi: do not print a message when memory allocation
 fails

On Wed, Dec 14, 2011 at 04:52:42PM -0800, Karen Xie wrote:
> The patch looks fine to me.
> 
> Thanks,
> Karen
> 

Hi, Karen.

Thanks for your quick response.

Care to send a proper Acked-by? It seems this patch has not yet catch up
in James' tree.

Regards.
Cascardo.


> -----Original Message-----
> From: Thadeu Lima de Souza Cascardo [mailto:cascardo@...ux.vnet.ibm.com]
> 
> Sent: Wednesday, December 14, 2011 7:46 AM
> To: linux-scsi@...r.kernel.org
> Cc: netdev@...r.kernel.org; Karen Xie; michaelc@...wisc.edu;
> davem@...emloft.net; JBottomley@...allels.com;
> linux-kernel@...r.kernel.org; Thadeu Lima de Souza Cascardo
> Subject: [PATCH] libcxgbi: do not print a message when memory allocation
> fails
> 
> In alloc_pdu, libcxgbi tries to allocate a skb with GFP_ATOMIC, which
> may potentially fail. When it happens, the current code prints a warning
> message.
> 
> When the system is under IO stress, this failure may happen lots of
> times and it usually scares users.
> 
> Instead of printing the warning message, the code now increases the
> tx_dropped statistics for the ethernet interface wich is doing the iscsi
> task.
> 
> Signed-off-by: Thadeu Lima de Souza Cascardo
> <cascardo@...ux.vnet.ibm.com>
> ---
>  drivers/scsi/cxgbi/libcxgbi.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/cxgbi/libcxgbi.c
> b/drivers/scsi/cxgbi/libcxgbi.c
> index c10f74a..3422bc2 100644
> --- a/drivers/scsi/cxgbi/libcxgbi.c
> +++ b/drivers/scsi/cxgbi/libcxgbi.c
> @@ -1862,8 +1862,9 @@ int cxgbi_conn_alloc_pdu(struct iscsi_task *task,
> u8 opcode)
>  
>  	tdata->skb = alloc_skb(cdev->skb_tx_rsvd + headroom,
> GFP_ATOMIC);
>  	if (!tdata->skb) {
> -		pr_warn("alloc skb %u+%u, opcode 0x%x failed.\n",
> -			cdev->skb_tx_rsvd, headroom, opcode);
> +		struct cxgbi_sock *csk = cconn->cep->csk;
> +		struct net_device *ndev = cdev->ports[csk->port_id];
> +		ndev->stats.tx_dropped++;
>  		return -ENOMEM;
>  	}
>  
> -- 
> 1.7.4.4
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ