lkml.org 
[lkml]   [2010]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH] bttv: fix mutex use before init
    From
    On Tue, Dec 14, 2010 at 9:56 PM, Torsten Kaiser
    <just.for.lkml@googlemail.com> wrote:
    > Using the card also still works, but I think I found out what was
    > causing sporadic shutdown problems with 37-rc kernels: When I try to
    > exit tvtime it gets stuck in an uninterruptible D state and can't be
    > killed. And that seems to mess up the shutdown.
    >
    > But this happens independent with or without your patch and looks like
    > different problem.
    >
    > SysRQ+W provided this stack trace, maybe someone seens an obvious bug...:
    > [  274.772528]  ffff8800dec69680 0000000000000086 ffffffff81089d73
    > ffff8800729d05a0
    > [  274.778599]  0000000000011480 ffff8800df923fd8 0000000000011480
    > ffff8800df922000
    > [  274.778599]  ffff8800df923fd8 0000000000011480 ffff8800dec69680
    > 0000000000011480
    > [  274.778599] Call Trace:
    > [  274.778599]  [<ffffffff81089d73>] ? free_pcppages_bulk+0x343/0x3b0
    > [  274.778599]  [<ffffffff8156d0e1>] ? __mutex_lock_slowpath+0xe1/0x160
    > [  274.778599]  [<ffffffff8156cd8a>] ? mutex_lock+0x1a/0x40
    > [  274.778599]  [<ffffffff8141ab7f>] ? free_btres_lock.clone.19+0x3f/0x100
    > [  274.778599]  [<ffffffff8141d311>] ? bttv_release+0x1c1/0x1e0
    > [  274.778599]  [<ffffffff813fe4ba>] ? v4l2_release+0x4a/0x70
    > [  274.778599]  [<ffffffff810c5291>] ? fput+0xe1/0x250
    > [  274.778599]  [<ffffffff810c1d59>] ? filp_close+0x59/0x80
    > [  274.778599]  [<ffffffff810c1e0b>] ? sys_close+0x8b/0xe0
    > [  274.778599]  [<ffffffff8100253b>] ? system_call_fastpath+0x16/0x1b

    Hmm:bttv_release() does mutex_lock(&btv->lock), then calls into
    free_btres_lock(...) that also first does mutex_lock(&btv->lock);

    The calls to lock btv->lock in bttv_release() where added as part of
    the BKL removal, but I do not understand enough to fix this.
    Can this be dropped from bttv_release() completely, or would an
    unlocked version of free_btres_lock() be better?

    Torsten
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2010-12-14 22:15    [W:0.042 / U:0.272 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site