提交 1e1675cc 编写于 作者: J Jan-Bernd Themann 提交者: Jeff Garzik

[PATCH] ehea: kzalloc GFP_ATOMIC fix

This patch fixes kzalloc parameters (GFP_ATOMIC instead of GFP_KERNEL)
Signed-off-by: NJan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 1e7bed08
...@@ -586,8 +586,8 @@ int ehea_sense_port_attr(struct ehea_port *port) ...@@ -586,8 +586,8 @@ int ehea_sense_port_attr(struct ehea_port *port)
u64 hret; u64 hret;
struct hcp_ehea_port_cb0 *cb0; struct hcp_ehea_port_cb0 *cb0;
cb0 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); cb0 = kzalloc(H_CB_ALIGNMENT, GFP_ATOMIC); /* May be called via */
if (!cb0) { if (!cb0) { /* ehea_neq_tasklet() */
ehea_error("no mem for cb0"); ehea_error("no mem for cb0");
ret = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
...@@ -765,8 +765,7 @@ static void ehea_parse_eqe(struct ehea_adapter *adapter, u64 eqe) ...@@ -765,8 +765,7 @@ static void ehea_parse_eqe(struct ehea_adapter *adapter, u64 eqe)
if (EHEA_BMASK_GET(NEQE_PORT_UP, eqe)) { if (EHEA_BMASK_GET(NEQE_PORT_UP, eqe)) {
if (!netif_carrier_ok(port->netdev)) { if (!netif_carrier_ok(port->netdev)) {
ret = ehea_sense_port_attr( ret = ehea_sense_port_attr(port);
port);
if (ret) { if (ret) {
ehea_error("failed resensing port " ehea_error("failed resensing port "
"attributes"); "attributes");
...@@ -1502,7 +1501,7 @@ static void ehea_promiscuous(struct net_device *dev, int enable) ...@@ -1502,7 +1501,7 @@ static void ehea_promiscuous(struct net_device *dev, int enable)
if ((enable && port->promisc) || (!enable && !port->promisc)) if ((enable && port->promisc) || (!enable && !port->promisc))
return; return;
cb7 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); cb7 = kzalloc(H_CB_ALIGNMENT, GFP_ATOMIC);
if (!cb7) { if (!cb7) {
ehea_error("no mem for cb7"); ehea_error("no mem for cb7");
goto out; goto out;
...@@ -1606,7 +1605,7 @@ static void ehea_add_multicast_entry(struct ehea_port* port, u8* mc_mac_addr) ...@@ -1606,7 +1605,7 @@ static void ehea_add_multicast_entry(struct ehea_port* port, u8* mc_mac_addr)
struct ehea_mc_list *ehea_mcl_entry; struct ehea_mc_list *ehea_mcl_entry;
u64 hret; u64 hret;
ehea_mcl_entry = kzalloc(sizeof(*ehea_mcl_entry), GFP_KERNEL); ehea_mcl_entry = kzalloc(sizeof(*ehea_mcl_entry), GFP_ATOMIC);
if (!ehea_mcl_entry) { if (!ehea_mcl_entry) {
ehea_error("no mem for mcl_entry"); ehea_error("no mem for mcl_entry");
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册