lkml.org 
[lkml]   [2008]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[2.6 patch] net/9p/trans_virtio.c: kmalloc() enough memory
    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");


    \
     
     \ /
      Last update: 2008-02-20 01:19    [W:0.043 / U:0.020 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site