* [2.6 patch] net/9p/trans_virtio.c: kmalloc() enough memory
@ 2008-02-20 0:14 Adrian Bunk
2008-02-20 0:25 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2008-02-20 0:14 UTC (permalink / raw)
To: Eric Van Hensbergen; +Cc: linux-kernel
The Coverity checker spotted that less memory than required was allocated.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
c9a5f66eca8484c302f848bb117b0bdb57e9ec42 diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index 9e3d81c..de7a9f5 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -110,7 +110,7 @@ static struct p9_req_t *p9_lookup_tag(struct virtio_chan *c, u16 tag)
}
for (count = old_max; count < c->max_tag; count++) {
c->reqs[count].status = REQ_STATUS_IDLE;
- c->reqs[count].wq = kmalloc(sizeof(wait_queue_t),
+ c->reqs[count].wq = kmalloc(sizeof(wait_queue_head_t),
GFP_ATOMIC);
if (!c->reqs[count].wq) {
printk(KERN_ERR "Couldn't grow tag array\n");
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [2.6 patch] net/9p/trans_virtio.c: kmalloc() enough memory
2008-02-20 0:14 [2.6 patch] net/9p/trans_virtio.c: kmalloc() enough memory Adrian Bunk
@ 2008-02-20 0:25 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-02-20 0:25 UTC (permalink / raw)
To: bunk; +Cc: ericvh, linux-kernel
From: Adrian Bunk <bunk@kernel.org>
Date: Wed, 20 Feb 2008 02:14:10 +0200
> The Coverity checker spotted that less memory than required was allocated.
>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
Applied, thanks Adrian.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-20 0:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-20 0:14 [2.6 patch] net/9p/trans_virtio.c: kmalloc() enough memory Adrian Bunk
2008-02-20 0:25 ` David Miller
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).