Commit 048efe1
smb: client: fix oops due to uninitialised var in smb2_unlink()
If SMB2_open_init() or SMB2_close_init() fails (e.g. reconnect), the
iovs set @Rqst will be left uninitialised, hence calling
SMB2_open_free(), SMB2_close_free() or smb2_set_related() on them will
oops.
Fix this by initialising @close_iov and @open_iov before setting them
in @Rqst.
Reported-by: Thiago Becker <tbecker@redhat.com>
Fixes: 1cf9f2a ("smb: client: handle unlink(2) of files open by different clients")
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Cc: David Howells <dhowells@redhat.com>
Cc: linux-cifs@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>1 parent 340cea8 commit 048efe1
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1216 | 1216 | | |
1217 | 1217 | | |
1218 | 1218 | | |
| 1219 | + | |
1219 | 1220 | | |
1220 | 1221 | | |
1221 | 1222 | | |
| |||
1240 | 1241 | | |
1241 | 1242 | | |
1242 | 1243 | | |
| 1244 | + | |
1243 | 1245 | | |
1244 | 1246 | | |
1245 | 1247 | | |
1246 | 1248 | | |
1247 | 1249 | | |
1248 | | - | |
1249 | 1250 | | |
1250 | 1251 | | |
| 1252 | + | |
1251 | 1253 | | |
1252 | 1254 | | |
1253 | 1255 | | |
| |||
0 commit comments