openwrt/package/kernel/mwlwifi/patches/001-remove-vfs_write.patch
Hauke Mehrtens 0b8629c0e3 mwlwifi: downgrade to version 10.3.4.0-20180118
Some people reported problems with the current development version, so
go back to the latests more or less release.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-02-13 23:21:12 +01:00

41 lines
1.0 KiB
Diff

--- a/debugfs.c
+++ b/debugfs.c
@@ -87,7 +87,6 @@ static void core_dump_file(u8 *valbuf, u
u32 append, u32 totallen, bool textmode)
{
struct file *filp_core = NULL;
- mm_segment_t oldfs;
char file_name[40];
u8 *buf = kmalloc(length * 3, GFP_KERNEL);
u8 *data_p = buf;
@@ -100,9 +99,6 @@ static void core_dump_file(u8 *valbuf, u
sprintf(file_name, "/dev/shm/coredump-%x-%x",
region, (region + totallen));
- oldfs = get_fs();
- set_fs(KERNEL_DS);
-
if (append)
filp_core = filp_open(file_name, O_RDWR | O_APPEND, 0);
else
@@ -125,15 +121,15 @@ static void core_dump_file(u8 *valbuf, u
}
data_p = buf + j;
data_p += sprintf(data_p, "\n");
- vfs_write(filp_core, buf, strlen(buf),
- &filp_core->f_pos);
+ kernel_write(filp_core, buf, strlen(buf),
+ &filp_core->f_pos);
} else
- vfs_write(filp_core, valbuf, length, &filp_core->f_pos);
+ kernel_write(filp_core, valbuf, length,
+ &filp_core->f_pos);
filp_close(filp_core, current->files);
}
- set_fs(oldfs);
kfree(buf);
}