* [PATCH 2/4] irda check error on memcpy_fromiovec (resend)
2004-01-16 22:25 [PATCH 1/4] ax25 " Chris Wright
@ 2004-01-16 22:26 ` Chris Wright
0 siblings, 0 replies; 4+ messages in thread
From: Chris Wright @ 2004-01-16 22:26 UTC (permalink / raw)
To: davem; +Cc: netdev, shemminger
Check the return value on memcpy_fromiovec().
net/irda/af_irda.c | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
===== net/irda/af_irda.c 1.49 vs edited =====
--- 1.49/net/irda/af_irda.c Fri Jan 9 02:10:53 2004
+++ edited/net/irda/af_irda.c Fri Jan 16 14:18:02 2004
@@ -1307,7 +1307,11 @@
skb_reserve(skb, self->max_header_size + 16);
asmptr = skb->h.raw = skb_put(skb, len);
- memcpy_fromiovec(asmptr, msg->msg_iov, len);
+ err = memcpy_fromiovec(asmptr, msg->msg_iov, len);
+ if (err) {
+ kfree_skb(skb);
+ return err;
+ }
/*
* Just send the message to TinyTP, and let it deal with possible
@@ -1550,7 +1554,11 @@
IRDA_DEBUG(4, "%s(), appending user data\n", __FUNCTION__);
asmptr = skb->h.raw = skb_put(skb, len);
- memcpy_fromiovec(asmptr, msg->msg_iov, len);
+ err = memcpy_fromiovec(asmptr, msg->msg_iov, len);
+ if (err) {
+ kfree_skb(skb);
+ return err;
+ }
/*
* Just send the message to TinyTP, and let it deal with possible
@@ -1613,7 +1621,11 @@
IRDA_DEBUG(4, "%s(), appending user data\n", __FUNCTION__);
asmptr = skb->h.raw = skb_put(skb, len);
- memcpy_fromiovec(asmptr, msg->msg_iov, len);
+ err = memcpy_fromiovec(asmptr, msg->msg_iov, len);
+ if (err) {
+ kfree_skb(skb);
+ return err;
+ }
err = irlmp_connless_data_request(self->lsap, skb);
if (err) {
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/4] irda check error on memcpy_fromiovec (resend)
@ 2004-01-17 1:40 Jean Tourrilhes
2004-01-17 1:41 ` Chris Wright
2004-01-20 5:16 ` David S. Miller
0 siblings, 2 replies; 4+ messages in thread
From: Jean Tourrilhes @ 2004-01-17 1:40 UTC (permalink / raw)
To: netdev, Chris Wright
Chris Wright wrote :
> Check the return value on memcpy_fromiovec().
>
> net/irda/af_irda.c | 18 +++++++++++++++---
> 1 files changed, 15 insertions(+), 3 deletions(-)
Oups, I must have missed the first edition. I've added this is
my patch queue in case Dave doesn't pick it up, but as you can see I
now have a bit of backlog :
http://www.hpl.hp.com/personal/Jean_Tourrilhes/IrDA/IrDA.html
Have fun...
Jean
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/4] irda check error on memcpy_fromiovec (resend)
2004-01-17 1:40 [PATCH 2/4] irda check error on memcpy_fromiovec (resend) Jean Tourrilhes
@ 2004-01-17 1:41 ` Chris Wright
2004-01-20 5:16 ` David S. Miller
1 sibling, 0 replies; 4+ messages in thread
From: Chris Wright @ 2004-01-17 1:41 UTC (permalink / raw)
To: jt; +Cc: netdev, Chris Wright
* Jean Tourrilhes (jt@bougret.hpl.hp.com) wrote:
> Oups, I must have missed the first edition. I've added this is
> my patch queue in case Dave doesn't pick it up, but as you can see I
thanks.
-chris
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/4] irda check error on memcpy_fromiovec (resend)
2004-01-17 1:40 [PATCH 2/4] irda check error on memcpy_fromiovec (resend) Jean Tourrilhes
2004-01-17 1:41 ` Chris Wright
@ 2004-01-20 5:16 ` David S. Miller
1 sibling, 0 replies; 4+ messages in thread
From: David S. Miller @ 2004-01-20 5:16 UTC (permalink / raw)
To: jt; +Cc: jt, netdev, chrisw
On Fri, 16 Jan 2004 17:40:05 -0800
Jean Tourrilhes <jt@bougret.hpl.hp.com> wrote:
> Oups, I must have missed the first edition. I've added this is
> my patch queue in case Dave doesn't pick it up, but as you can see I
> now have a bit of backlog :
> http://www.hpl.hp.com/personal/Jean_Tourrilhes/IrDA/IrDA.html
Don't sweat it, I just sucked it into my tree.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-01-20 5:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-17 1:40 [PATCH 2/4] irda check error on memcpy_fromiovec (resend) Jean Tourrilhes
2004-01-17 1:41 ` Chris Wright
2004-01-20 5:16 ` David S. Miller
-- strict thread matches above, loose matches on Subject: below --
2004-01-16 22:25 [PATCH 1/4] ax25 " Chris Wright
2004-01-16 22:26 ` [PATCH 2/4] irda " Chris Wright
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).