Skip to content
Commit d3292dae authored by Dmitry Osipenko's avatar Dmitry Osipenko
Browse files

dma-buf: Make locking consistent in dma_buf_detach()



The dma_buf_detach() locks attach->dmabuf->resv and then unlocks
dmabuf->resv, which could be a two different locks from a static
code checker perspective. In particular this triggers Smatch to
report the "double unlock" error. Make the locking pointers consistent.

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/dri-devel/Y1fLfsccW3AS%2Fo+%2F@kili/
Fixes: 809d9c72

 ("dma-buf: Move dma_buf_attach() to dynamic locking specification")
Signed-off-by: default avatarDmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221030154412.8320-2-dmitry.osipenko@collabora.com
parent 38765993
  • mirror @mirror

    mentioned in commit 58998d50cb8ea1f54d9f9abb5d75b63e6ee161b3

    ·

    mentioned in commit 58998d50cb8ea1f54d9f9abb5d75b63e6ee161b3

    Toggle commit list
  • mirror @mirror

    mentioned in commit 7210be6fc7cba11adc20f7547667f09db6706ab1

    ·

    mentioned in commit 7210be6fc7cba11adc20f7547667f09db6706ab1

    Toggle commit list
  • mirror @mirror

    mentioned in commit 369ee0e61bc58ebc1a53fb9bf62725fe0b3c28d3

    ·

    mentioned in commit 369ee0e61bc58ebc1a53fb9bf62725fe0b3c28d3

    Toggle commit list
  • mirror @mirror

    mentioned in commit 592bdcb26e3da7004f92c25962e81bf81ecd32c7

    ·

    mentioned in commit 592bdcb26e3da7004f92c25962e81bf81ecd32c7

    Toggle commit list
  • mirror @mirror

    mentioned in commit 08841ac8953de2d77019c2280eff49d9f2bb6a66

    ·

    mentioned in commit 08841ac8953de2d77019c2280eff49d9f2bb6a66

    Toggle commit list
  • mirror @mirror

    mentioned in commit 954eb57c33efc5787b11ee32a29fbf57d4c07a9a

    ·

    mentioned in commit 954eb57c33efc5787b11ee32a29fbf57d4c07a9a

    Toggle commit list
  • mirror @mirror

    mentioned in commit e68866bd459b9ae408ff6b729481dd5ae54b8e12

    ·

    mentioned in commit e68866bd459b9ae408ff6b729481dd5ae54b8e12

    Toggle commit list
  • mirror @mirror

    mentioned in commit 45bfe00063d723f6853de8bfdddd43c811e22d13

    ·

    mentioned in commit 45bfe00063d723f6853de8bfdddd43c811e22d13

    Toggle commit list
  • mirror @mirror

    mentioned in commit 4ff0226c9a85e779e5aea3275e7c19fd3073aa3f

    ·

    mentioned in commit 4ff0226c9a85e779e5aea3275e7c19fd3073aa3f

    Toggle commit list
  • mirror @mirror

    mentioned in commit d3c5d788178a01be30adfee86858a7eed77a773c

    ·

    mentioned in commit d3c5d788178a01be30adfee86858a7eed77a773c

    Toggle commit list
  • mirror @mirror

    mentioned in commit 5a9a37e3

    ·

    mentioned in commit 5a9a37e3

    Toggle commit list
  • mirror @mirror

    mentioned in commit adc75b6b00548c331d74d062ff23e2af7271695a

    ·

    mentioned in commit adc75b6b00548c331d74d062ff23e2af7271695a

    Toggle commit list
  • mirror @mirror

    mentioned in commit 55ab497d2840f276560571a3adf4882f59dd6d74

    ·

    mentioned in commit 55ab497d2840f276560571a3adf4882f59dd6d74

    Toggle commit list
  • mirror @mirror

    mentioned in commit e5424f695971122cac70b7f82651b69f71774c1d

    ·

    mentioned in commit e5424f695971122cac70b7f82651b69f71774c1d

    Toggle commit list
  • mirror @mirror

    mentioned in commit 6b2e1c611ac514197c1007f3afc6264df291e055

    ·

    mentioned in commit 6b2e1c611ac514197c1007f3afc6264df291e055

    Toggle commit list
  • mirror @mirror

    mentioned in commit 842785f4aeb1aba260c4a5ff603a1126efca7384

    ·

    mentioned in commit 842785f4aeb1aba260c4a5ff603a1126efca7384

    Toggle commit list
  • mirror @mirror

    mentioned in commit 3ee975cc181642f99f34718dea902c4bfabbc9ae

    ·

    mentioned in commit 3ee975cc181642f99f34718dea902c4bfabbc9ae

    Toggle commit list
  • mirror @mirror

    mentioned in commit b009b08cb92f02d692f617e37d7376dfd181f2fa

    ·

    mentioned in commit b009b08cb92f02d692f617e37d7376dfd181f2fa

    Toggle commit list
  • mirror @mirror

    mentioned in commit d5badeb81b177c818253f3246c250f225cfc2bf5

    ·

    mentioned in commit d5badeb81b177c818253f3246c250f225cfc2bf5

    Toggle commit list
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment