2016-11-24 8:43 GMT-08:00 Aurélien Aptel <aaptel@xxxxxxxx>: > Hi Pavel, > > Pavel Shilovsky <piastryyy@xxxxxxxxx> writes: >> 2016-11-10 15:31 GMT-08:00 Pavel Shilovsky <piastryyy@xxxxxxxxx>: >>> We can not unlock/lock cifs_tcp_ses_lock while walking through ses >>> and tcon lists because it can corrupt list iterator pointers and >>> a tcon structure can be released if we don't hold an extra reference. >>> Fix it by moving a reconnect process to a separate delayed work >>> and acquiring a reference to every tcon that needs to be reconnected. >>> Also do not send an echo request on newly established connections. > > I don't fully understand what's going on here but I've successfully > tested your patch. > > I've applied your patch and triggered a reconnexion on a smb2 mount by > virtually unplugging/waiting/replugging the network cable (via qemu > set_link <name> on/off). I did not notice any issues. > > Let us know if you have a better scenario to test this or a way to > reproduce the previous issue. > > Tested-by: Aurelien Aptel <aaptel@xxxxxxxx> > > -- > Aurélien Aptel / SUSE Labs Samba Team > GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3 > SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany > GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Thank you for testing this! I don't have a scripted reproducer but sending something wrong to the server during mounting was triggering this issue. For example, if we send a wrong SMB2 header on Create request the kernel crashes after several mount attempts. -- Best regards, Pavel Shilovsky -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html