Commit c71f8fb4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'v6.12-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - Fix init module error caseb

 - Fix memory allocation error path (for passwords) in mount

* tag 'v6.12-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: fix warning when destroy 'cifs_io_request_pool'
  smb: client: Handle kstrdup failures for passwords
parents 81dcc797 2ce1007f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1780,7 +1780,7 @@ static int cifs_init_netfs(void)
nomem_subreqpool:
	kmem_cache_destroy(cifs_io_subrequest_cachep);
nomem_subreq:
	mempool_destroy(&cifs_io_request_pool);
	mempool_exit(&cifs_io_request_pool);
nomem_reqpool:
	kmem_cache_destroy(cifs_io_request_cachep);
nomem_req:
+7 −0
Original line number Diff line number Diff line
@@ -920,8 +920,15 @@ static int smb3_reconfigure(struct fs_context *fc)
	else  {
		kfree_sensitive(ses->password);
		ses->password = kstrdup(ctx->password, GFP_KERNEL);
		if (!ses->password)
			return -ENOMEM;
		kfree_sensitive(ses->password2);
		ses->password2 = kstrdup(ctx->password2, GFP_KERNEL);
		if (!ses->password2) {
			kfree_sensitive(ses->password);
			ses->password = NULL;
			return -ENOMEM;
		}
	}
	STEAL_STRING(cifs_sb, ctx, domainname);
	STEAL_STRING(cifs_sb, ctx, nodename);