lkml.org 
[lkml]   [2012]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[ 033/108] [media] dvb-core: Release semaphore on error path dvb_register_device()
    3.2-stable review patch.  If anyone has any objections, please let me know.

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

    From: Santosh Nayak <santoshprasadnayak@gmail.com>

    commit 82163edcdfa4eb3d74516cc8e9f38dd3d039b67d upstream.

    There is a missing "up_write()" here. Semaphore should be released
    before returning error value.

    Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    drivers/media/dvb/dvb-core/dvbdev.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c
    index 00a6732..39eab73 100644
    --- a/drivers/media/dvb/dvb-core/dvbdev.c
    +++ b/drivers/media/dvb/dvb-core/dvbdev.c
    @@ -243,6 +243,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
    if (minor == MAX_DVB_MINORS) {
    kfree(dvbdevfops);
    kfree(dvbdev);
    + up_write(&minor_rwsem);
    mutex_unlock(&dvbdev_register_lock);
    return -EINVAL;
    }



    \
     
     \ /
      Last update: 2012-07-23 04:41    [W:5.850 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site