lkml.org 
[lkml]   [2012]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[ 26/62] media: drxk: Does not unlock mutex if sanity check failed in scu_command()
    3.3-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Alexey Khoroshilov <khoroshilov@ispras.ru>

    commit e4459e1682c107d7ee1bf102c1ba534230e9b50b upstream.

    If sanity check fails in scu_command(), goto error leads to unlock of
    an unheld mutex. The check should not fail in reality, but it nevertheless
    worth fixing.

    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/media/dvb/frontends/drxk_hard.c | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    --- a/drivers/media/dvb/frontends/drxk_hard.c
    +++ b/drivers/media/dvb/frontends/drxk_hard.c
    @@ -1525,8 +1525,10 @@ static int scu_command(struct drxk_state
    dprintk(1, "\n");

    if ((cmd == 0) || ((parameterLen > 0) && (parameter == NULL)) ||
    - ((resultLen > 0) && (result == NULL)))
    - goto error;
    + ((resultLen > 0) && (result == NULL))) {
    + printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__);
    + return status;
    + }

    mutex_lock(&state->mutex);




    \
     
     \ /
      Last update: 2012-04-25 00:57    [W:0.027 / U:63.512 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site