On Thu, Jan 23, 2020 at 05:35:16PM +0100, Steve French wrote: > On Thu, Jan 23, 2020, 10:17 Vincent Whitchurch <vincent.whitchurch@xxxxxxxx> wrote: > > This can be reliably reproduced by adding the below delay to > > cifs_reconnect(), running find(1) on the mount, restarting the samba > > server while find is running, and killing find during the delay: > > > > spin_unlock(&GlobalMid_Lock); > > mutex_unlock(&server->srv_mutex); > > > > + msleep(10000); > > + > > cifs_dbg(FYI, "%s: issuing mid callbacks\n", __func__); > > list_for_each_safe(tmp, tmp2, &retry_list) { > > mid_entry = list_entry(tmp, struct mid_q_entry, qhead); > > > > Fix this by holding a reference to the task struct until the MID is > > freed. > > Cc:stable as well? Yes, I think this bug has been there for a while. Note that the test described above usually triggers a different crash on kernels earlier than v5.4 because abe57073d08c13b95a46ccf48c ("CIFS: Fix retry mid list corruption on reconnects") has not (yet?) been backported to those stable kernels.