mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 09:31:50 +00:00
CIFS: Fix problem with 3.0-rc1 null user mount failure
Figured it out: it was broken by b946845a9d
commit - "cifs: cifs_parse_mount_options: do not tokenize mount options in-place". So, as a quick fix I suggest to apply this patch.
[PATCH] CIFS: Fix kfree() with constant string in a null user case
Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
parent
2992c4bd57
commit
446b23a758
@ -2937,7 +2937,11 @@ int cifs_setup_volume_info(struct smb_vol **pvolume_info, char *mount_data,
|
|||||||
|
|
||||||
if (volume_info->nullauth) {
|
if (volume_info->nullauth) {
|
||||||
cFYI(1, "null user");
|
cFYI(1, "null user");
|
||||||
volume_info->username = "";
|
volume_info->username = kzalloc(1, GFP_KERNEL);
|
||||||
|
if (volume_info->username == NULL) {
|
||||||
|
rc = -ENOMEM;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
} else if (volume_info->username) {
|
} else if (volume_info->username) {
|
||||||
/* BB fixme parse for domain name here */
|
/* BB fixme parse for domain name here */
|
||||||
cFYI(1, "Username: %s", volume_info->username);
|
cFYI(1, "Username: %s", volume_info->username);
|
||||||
|
Loading…
Reference in New Issue
Block a user