From: akpm@osdl.org
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, akpm@osdl.org, fmalita@gmail.com,
samuel@sortiz.org
Subject: [patch 14/17] irda: missing allocation result check in irlap_change_speed()
Date: Thu, 01 Jun 2006 20:32:34 -0700 [thread overview]
Message-ID: <200606020328.k523SFGT028844@shell0.pdx.osdl.net> (raw)
From: Florin Malita <fmalita@gmail.com>
The skb allocation may fail, which can result in a NULL pointer dereference
in irlap_queue_xmit().
Coverity CID: 434.
davem: "If the allocation fails we should probably do something more
interesting here, such as schedule a timer to try again later. Otherwise the
speed change will silently never occur."
Signed-off-by: Florin Malita <fmalita@gmail.com>
Cc: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
net/irda/irlap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -puN net/irda/irlap.c~irda-missing-allocation-result-check-in-irlap_change_speed net/irda/irlap.c
--- devel/net/irda/irlap.c~irda-missing-allocation-result-check-in-irlap_change_speed 2006-06-01 20:31:50.000000000 -0700
+++ devel-akpm/net/irda/irlap.c 2006-06-01 20:31:50.000000000 -0700
@@ -884,7 +884,8 @@ static void irlap_change_speed(struct ir
if (now) {
/* Send down empty frame to trigger speed change */
skb = dev_alloc_skb(0);
- irlap_queue_xmit(self, skb);
+ if (skb)
+ irlap_queue_xmit(self, skb);
}
}
_
reply other threads:[~2006-06-02 3:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200606020328.k523SFGT028844@shell0.pdx.osdl.net \
--to=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=fmalita@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=samuel@sortiz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox