Skip to content
Snippets Groups Projects
Select Git revision
  • 19c6e12c07ceab2ff5d5ec97354b893ab386c41c
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

inode.c

  • Jan Kara's avatar
    f2e95355
    udf: Fix deadlock between writeback and udf_setsize() · f2e95355
    Jan Kara authored
    
    udf_setsize() called truncate_setsize() with i_data_sem held. Thus
    truncate_pagecache() called from truncate_setsize() could lock a page
    under i_data_sem which can deadlock as page lock ranks below
    i_data_sem - e. g. writeback can hold page lock and try to acquire
    i_data_sem to map a block.
    
    Fix the problem by moving truncate_setsize() calls from under
    i_data_sem. It is safe for us to change i_size without holding
    i_data_sem as all the places that depend on i_size being stable already
    hold inode_lock.
    
    CC: stable@vger.kernel.org
    Fixes: 7e49b6f2
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    f2e95355
    History
    udf: Fix deadlock between writeback and udf_setsize()
    Jan Kara authored
    
    udf_setsize() called truncate_setsize() with i_data_sem held. Thus
    truncate_pagecache() called from truncate_setsize() could lock a page
    under i_data_sem which can deadlock as page lock ranks below
    i_data_sem - e. g. writeback can hold page lock and try to acquire
    i_data_sem to map a block.
    
    Fix the problem by moving truncate_setsize() calls from under
    i_data_sem. It is safe for us to change i_size without holding
    i_data_sem as all the places that depend on i_size being stable already
    hold inode_lock.
    
    CC: stable@vger.kernel.org
    Fixes: 7e49b6f2
    Signed-off-by: default avatarJan Kara <jack@suse.cz>