X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fnet%2Fppp_synctty.c;h=ce64032a465af512dae7b961ce80f1cc2203a4de;hb=fb391599f2eaf22197e3e914187c957ef7eeb4c5;hp=33255fe8031ef43292f1419065218786b5396b74;hpb=2e9abdd9bad485970b37cd53a82f92702054984c;p=linux-2.6 diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c index 33255fe803..ce64032a46 100644 --- a/drivers/net/ppp_synctty.c +++ b/drivers/net/ppp_synctty.c @@ -6,7 +6,7 @@ * * Complete PPP frames without encoding/decoding are exchanged between * the channel driver and the device driver. - * + * * The async map IOCTL codes are implemented to keep the user mode * applications happy if they call them. Synchronous PPP does not use * the async maps. @@ -207,13 +207,12 @@ ppp_sync_open(struct tty_struct *tty) struct syncppp *ap; int err; - ap = kmalloc(sizeof(*ap), GFP_KERNEL); + ap = kzalloc(sizeof(*ap), GFP_KERNEL); err = -ENOMEM; if (ap == 0) goto out; /* initialize the syncppp structure */ - memset(ap, 0, sizeof(*ap)); ap->tty = tty; ap->mru = PPP_MRU; spin_lock_init(&ap->xmit_lock); @@ -594,7 +593,8 @@ ppp_sync_txmunge(struct syncppp *ap, struct sk_buff *skb) return NULL; } skb_reserve(npkt,2); - memcpy(skb_put(npkt,skb->len), skb->data, skb->len); + skb_copy_from_linear_data(skb, + skb_put(npkt, skb->len), skb->len); kfree_skb(skb); skb = npkt; }