* [PATCHv2] iw_cxgb4: in send_flowc(), handle a skb return from get_skb()
@ 2014-06-16 18:53 Nicholas Krause
0 siblings, 0 replies; 4+ messages in thread
From: Nicholas Krause @ 2014-06-16 18:53 UTC (permalink / raw)
To: swise; +Cc: roland, sean.hefty, hal.rosenstock, linux-rdma, linux-kernel
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 5e153f6..e0c43a3 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -457,6 +457,10 @@ static void send_flowc(struct c4iw_ep *ep, struct sk_buff *skb)
int i;
skb = get_skb(skb, flowclen, GFP_KERNEL);
+ if (!skb) {
+ pr_warn(MOD "%s failed to allocate skb.\n", __func__);
+ return;
+ }
flowc = (struct fw_flowc_wr *)__skb_put(skb, flowclen);
flowc->op_to_nparams = cpu_to_be32(FW_WR_OP(FW_FLOWC_WR) |
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCHv2] iw_cxgb4: in send_flowc(), handle a skb return from get_skb()
@ 2014-06-16 18:58 Nicholas Krause
0 siblings, 0 replies; 4+ messages in thread
From: Nicholas Krause @ 2014-06-16 18:58 UTC (permalink / raw)
To: swise; +Cc: roland, sean.hefty, hal.rosenstock, linux-rdma, linux-kernel
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 5e153f6..e0c43a3 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -457,6 +457,10 @@ static void send_flowc(struct c4iw_ep *ep, struct sk_buff *skb)
int i;
skb = get_skb(skb, flowclen, GFP_KERNEL);
+ if (!skb) {
+ pr_warn(MOD "%s failed to allocate skb.\n", __func__);
+ return;
+ }
flowc = (struct fw_flowc_wr *)__skb_put(skb, flowclen);
flowc->op_to_nparams = cpu_to_be32(FW_WR_OP(FW_FLOWC_WR) |
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCHv2] iw_cxgb4: in send_flowc(), handle a skb return from get_skb()
@ 2014-06-16 18:51 Nicholas Krause
0 siblings, 0 replies; 4+ messages in thread
From: Nicholas Krause @ 2014-06-16 18:51 UTC (permalink / raw)
To: swise; +Cc: roland, sean.hefty, hal.rosenstock, linux-rdma, linux-kernel
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 5e153f6..e0c43a3 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -457,6 +457,10 @@ static void send_flowc(struct c4iw_ep *ep, struct sk_buff *skb)
int i;
skb = get_skb(skb, flowclen, GFP_KERNEL);
+ if (!skb) {
+ pr_warn(MOD "%s failed to allocate skb.\n", __func__);
+ return;
+ }
flowc = (struct fw_flowc_wr *)__skb_put(skb, flowclen);
flowc->op_to_nparams = cpu_to_be32(FW_WR_OP(FW_FLOWC_WR) |
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCHv2] iw_cxgb4: in send_flowc(), handle a skb return from get_skb()
@ 2014-06-16 18:47 Nicholas Krause
0 siblings, 0 replies; 4+ messages in thread
From: Nicholas Krause @ 2014-06-16 18:47 UTC (permalink / raw)
To: swise; +Cc: roland, sean.hefty, hal.rosenstock, linux-rdma, linux-kernel
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 5e153f6..e0c43a3 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -457,6 +457,10 @@ static void send_flowc(struct c4iw_ep *ep, struct sk_buff *skb)
int i;
skb = get_skb(skb, flowclen, GFP_KERNEL);
+ if (!skb) {
+ kfree_skb();
+ pr_warn(MOD "%s failed to allocate skb.\n", __func__);
+ }
flowc = (struct fw_flowc_wr *)__skb_put(skb, flowclen);
flowc->op_to_nparams = cpu_to_be32(FW_WR_OP(FW_FLOWC_WR) |
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-16 18:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-16 18:53 [PATCHv2] iw_cxgb4: in send_flowc(), handle a skb return from get_skb() Nicholas Krause
-- strict thread matches above, loose matches on Subject: below --
2014-06-16 18:58 Nicholas Krause
2014-06-16 18:51 Nicholas Krause
2014-06-16 18:47 Nicholas Krause
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).