mbox series

[5.4,0/5] CIFS DFS fixes for 5.4

Message ID 20230623213406.5596-1-risbhat@amazon.com (mailing list archive)
Headers show
Series CIFS DFS fixes for 5.4 | expand

Message

Rishabh Bhatnagar June 23, 2023, 9:34 p.m. UTC
We are seeing deadlock in cifs code while updating volume in
cifs_reconnect. There are few fixes available in stable trees
already. This series backports some patches back to 5.4 stable.

 __schedule+0x268/0x6e0
 schedule+0x2f/0xa0
 schedule_preempt_disabled+0xa/0x10
 __mutex_lock.isra.7+0x20b/0x470
 ? dfs_cache_update_vol+0x45/0x2a0 [cifs]
 dfs_cache_update_vol+0x45/0x2a0 [cifs]
 cifs_reconnect+0x6f2/0xef0 [cifs]
 cifs_handle_standard+0x18d/0x1b0 [cifs]
 cifs_demultiplex_thread+0xa5c/0xc90 [cifs]
 ? cifs_handle_standard+0x1b0/0x1b0 [cifs]

Paulo Alcantara (SUSE) (5):
  cifs: Clean up DFS referral cache
  cifs: Get rid of kstrdup_const()'d paths
  cifs: Introduce helpers for finding TCP connection
  cifs: Merge is_path_valid() into get_normalized_path()
  cifs: Fix potential deadlock when updating vol in cifs_reconnect()

 fs/cifs/dfs_cache.c | 701 +++++++++++++++++++++++---------------------
 1 file changed, 372 insertions(+), 329 deletions(-)

Comments

Paulo Alcantara June 23, 2023, 10:08 p.m. UTC | #1
Rishabh Bhatnagar <risbhat@amazon.com> writes:

> We are seeing deadlock in cifs code while updating volume in
> cifs_reconnect. There are few fixes available in stable trees
> already. This series backports some patches back to 5.4 stable.
>
>  __schedule+0x268/0x6e0
>  schedule+0x2f/0xa0
>  schedule_preempt_disabled+0xa/0x10
>  __mutex_lock.isra.7+0x20b/0x470
>  ? dfs_cache_update_vol+0x45/0x2a0 [cifs]
>  dfs_cache_update_vol+0x45/0x2a0 [cifs]
>  cifs_reconnect+0x6f2/0xef0 [cifs]
>  cifs_handle_standard+0x18d/0x1b0 [cifs]
>  cifs_demultiplex_thread+0xa5c/0xc90 [cifs]
>  ? cifs_handle_standard+0x1b0/0x1b0 [cifs]
>
> Paulo Alcantara (SUSE) (5):
>   cifs: Clean up DFS referral cache
>   cifs: Get rid of kstrdup_const()'d paths
>   cifs: Introduce helpers for finding TCP connection
>   cifs: Merge is_path_valid() into get_normalized_path()
>   cifs: Fix potential deadlock when updating vol in cifs_reconnect()
>
>  fs/cifs/dfs_cache.c | 701 +++++++++++++++++++++++---------------------
>  1 file changed, 372 insertions(+), 329 deletions(-)

Looks good, thanks.
Greg KH June 24, 2023, 2:10 p.m. UTC | #2
On Fri, Jun 23, 2023 at 07:08:22PM -0300, Paulo Alcantara wrote:
> Rishabh Bhatnagar <risbhat@amazon.com> writes:
> 
> > We are seeing deadlock in cifs code while updating volume in
> > cifs_reconnect. There are few fixes available in stable trees
> > already. This series backports some patches back to 5.4 stable.
> >
> >  __schedule+0x268/0x6e0
> >  schedule+0x2f/0xa0
> >  schedule_preempt_disabled+0xa/0x10
> >  __mutex_lock.isra.7+0x20b/0x470
> >  ? dfs_cache_update_vol+0x45/0x2a0 [cifs]
> >  dfs_cache_update_vol+0x45/0x2a0 [cifs]
> >  cifs_reconnect+0x6f2/0xef0 [cifs]
> >  cifs_handle_standard+0x18d/0x1b0 [cifs]
> >  cifs_demultiplex_thread+0xa5c/0xc90 [cifs]
> >  ? cifs_handle_standard+0x1b0/0x1b0 [cifs]
> >
> > Paulo Alcantara (SUSE) (5):
> >   cifs: Clean up DFS referral cache
> >   cifs: Get rid of kstrdup_const()'d paths
> >   cifs: Introduce helpers for finding TCP connection
> >   cifs: Merge is_path_valid() into get_normalized_path()
> >   cifs: Fix potential deadlock when updating vol in cifs_reconnect()
> >
> >  fs/cifs/dfs_cache.c | 701 +++++++++++++++++++++++---------------------
> >  1 file changed, 372 insertions(+), 329 deletions(-)
> 
> Looks good, thanks.

All now queued up, thanks.

greg k-h