Char/Misc driver fixes for 4.17-rc8
Here are 4 small bugfixes for some char/misc drivers. Well, really 3 fixes and one fix for one of those fixes due to problems found by 0-day. This resolves some reported issues with the hwtracing drivers, and a reported regression for the thunderbolt subsystem. All of these have been in linux-next for a while now with no reported problems. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCWxKMCw8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+ymK2wCdEsDr7v19XalCGEUwrUlTiVM8Du0An2MkgogQ EzZn7+QsxTgLMYG4N9gl =Z00b -----END PGP SIGNATURE----- Merge tag 'char-misc-4.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are four small bugfixes for some char/misc drivers. Well, really three fixes and one fix for one of those fixes due to problems found by 0-day. This resolves some reported issues with the hwtracing drivers, and a reported regression for the thunderbolt subsystem. All of these have been in linux-next for a while now with no reported problems" * tag 'char-misc-4.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: hwtracing: stm: fix build error on some arches intel_th: Use correct device when freeing buffers stm class: Use vmalloc for the master map thunderbolt: Handle NULL boot ACL entries properly
This commit is contained in:
commit
6ac9f42cda
|
@ -733,8 +733,8 @@ err_nomem:
|
|||
/* Reset the page to write-back before releasing */
|
||||
set_memory_wb((unsigned long)win->block[i].bdesc, 1);
|
||||
#endif
|
||||
dma_free_coherent(msc_dev(msc), size, win->block[i].bdesc,
|
||||
win->block[i].addr);
|
||||
dma_free_coherent(msc_dev(msc)->parent->parent, size,
|
||||
win->block[i].bdesc, win->block[i].addr);
|
||||
}
|
||||
kfree(win);
|
||||
|
||||
|
@ -769,7 +769,7 @@ static void msc_buffer_win_free(struct msc *msc, struct msc_window *win)
|
|||
/* Reset the page to write-back before releasing */
|
||||
set_memory_wb((unsigned long)win->block[i].bdesc, 1);
|
||||
#endif
|
||||
dma_free_coherent(msc_dev(win->msc), PAGE_SIZE,
|
||||
dma_free_coherent(msc_dev(win->msc)->parent->parent, PAGE_SIZE,
|
||||
win->block[i].bdesc, win->block[i].addr);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <linux/stm.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include "stm.h"
|
||||
|
||||
#include <uapi/linux/stm.h>
|
||||
|
@ -674,7 +675,7 @@ static void stm_device_release(struct device *dev)
|
|||
{
|
||||
struct stm_device *stm = to_stm_device(dev);
|
||||
|
||||
kfree(stm);
|
||||
vfree(stm);
|
||||
}
|
||||
|
||||
int stm_register_device(struct device *parent, struct stm_data *stm_data,
|
||||
|
@ -691,7 +692,7 @@ int stm_register_device(struct device *parent, struct stm_data *stm_data,
|
|||
return -EINVAL;
|
||||
|
||||
nmasters = stm_data->sw_end - stm_data->sw_start + 1;
|
||||
stm = kzalloc(sizeof(*stm) + nmasters * sizeof(void *), GFP_KERNEL);
|
||||
stm = vzalloc(sizeof(*stm) + nmasters * sizeof(void *));
|
||||
if (!stm)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -744,7 +745,7 @@ err_device:
|
|||
/* matches device_initialize() above */
|
||||
put_device(&stm->dev);
|
||||
err_free:
|
||||
kfree(stm);
|
||||
vfree(stm);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -1255,7 +1255,7 @@ static int icm_ar_get_boot_acl(struct tb *tb, uuid_t *uuids, size_t nuuids)
|
|||
/* Map empty entries to null UUID */
|
||||
uuid[0] = 0;
|
||||
uuid[1] = 0;
|
||||
} else {
|
||||
} else if (uuid[0] != 0 || uuid[1] != 0) {
|
||||
/* Upper two DWs are always one's */
|
||||
uuid[2] = 0xffffffff;
|
||||
uuid[3] = 0xffffffff;
|
||||
|
|
Loading…
Reference in New Issue