aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorTilman Schmidt <tilman@imap.cc>2009-10-06 08:18:31 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-07 01:20:58 -0400
commitee239d9901c13040598f6c46d5017869c6d14e2e (patch)
treeda17fe435e47009304ebb3a5052eedf7aeae8249 /drivers/isdn
parent3305adffc556f7998b40c31afcef4c8755ce919a (diff)
gigaset: linearize skb
The code of the Gigaset driver assumes that sk_buff-s coming from the ISDN4Linux subsystem are always linear. Explicitly calling skb_linearize() is cheap if they are, but much more robust in case they ever aren't. Impact: robustness improvement Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/gigaset/i4l.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/isdn/gigaset/i4l.c b/drivers/isdn/gigaset/i4l.c
index 9b22f9cf2f33..322f16ebc6ec 100644
--- a/drivers/isdn/gigaset/i4l.c
+++ b/drivers/isdn/gigaset/i4l.c
@@ -51,6 +51,12 @@ static int writebuf_from_LL(int driverID, int channel, int ack,
51 return -ENODEV; 51 return -ENODEV;
52 } 52 }
53 bcs = &cs->bcs[channel]; 53 bcs = &cs->bcs[channel];
54
55 /* can only handle linear sk_buffs */
56 if (skb_linearize(skb) < 0) {
57 dev_err(cs->dev, "%s: skb_linearize failed\n", __func__);
58 return -ENOMEM;
59 }
54 len = skb->len; 60 len = skb->len;
55 61
56 gig_dbg(DEBUG_LLDATA, 62 gig_dbg(DEBUG_LLDATA,