diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-02 13:05:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-02 13:05:45 -0400 |
commit | 6ac9f42cda9449dbd7f07a0bf7819d1dccd46ae8 (patch) | |
tree | 6b0b27d38e4824a9238fcd1d46fe3f4a4a84e0cc | |
parent | 34a8e640d1eaaea99d79bb7f75bc3d7e336da167 (diff) | |
parent | 806e30873f0e74d9d41b0ef761bd4d3e55c7d510 (diff) |
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
-rw-r--r-- | drivers/hwtracing/intel_th/msu.c | 6 | ||||
-rw-r--r-- | drivers/hwtracing/stm/core.c | 7 | ||||
-rw-r--r-- | drivers/thunderbolt/icm.c | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c index ede388309376..634f58042c77 100644 --- a/drivers/hwtracing/intel_th/msu.c +++ b/drivers/hwtracing/intel_th/msu.c | |||
@@ -733,8 +733,8 @@ err_nomem: | |||
733 | /* Reset the page to write-back before releasing */ | 733 | /* Reset the page to write-back before releasing */ |
734 | set_memory_wb((unsigned long)win->block[i].bdesc, 1); | 734 | set_memory_wb((unsigned long)win->block[i].bdesc, 1); |
735 | #endif | 735 | #endif |
736 | dma_free_coherent(msc_dev(msc), size, win->block[i].bdesc, | 736 | dma_free_coherent(msc_dev(msc)->parent->parent, size, |
737 | win->block[i].addr); | 737 | win->block[i].bdesc, win->block[i].addr); |
738 | } | 738 | } |
739 | kfree(win); | 739 | kfree(win); |
740 | 740 | ||
@@ -769,7 +769,7 @@ static void msc_buffer_win_free(struct msc *msc, struct msc_window *win) | |||
769 | /* Reset the page to write-back before releasing */ | 769 | /* Reset the page to write-back before releasing */ |
770 | set_memory_wb((unsigned long)win->block[i].bdesc, 1); | 770 | set_memory_wb((unsigned long)win->block[i].bdesc, 1); |
771 | #endif | 771 | #endif |
772 | dma_free_coherent(msc_dev(win->msc), PAGE_SIZE, | 772 | dma_free_coherent(msc_dev(win->msc)->parent->parent, PAGE_SIZE, |
773 | win->block[i].bdesc, win->block[i].addr); | 773 | win->block[i].bdesc, win->block[i].addr); |
774 | } | 774 | } |
775 | 775 | ||
diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c index 05386b76465e..10bcb5d73f90 100644 --- a/drivers/hwtracing/stm/core.c +++ b/drivers/hwtracing/stm/core.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/stm.h> | 19 | #include <linux/stm.h> |
20 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/vmalloc.h> | ||
22 | #include "stm.h" | 23 | #include "stm.h" |
23 | 24 | ||
24 | #include <uapi/linux/stm.h> | 25 | #include <uapi/linux/stm.h> |
@@ -674,7 +675,7 @@ static void stm_device_release(struct device *dev) | |||
674 | { | 675 | { |
675 | struct stm_device *stm = to_stm_device(dev); | 676 | struct stm_device *stm = to_stm_device(dev); |
676 | 677 | ||
677 | kfree(stm); | 678 | vfree(stm); |
678 | } | 679 | } |
679 | 680 | ||
680 | int stm_register_device(struct device *parent, struct stm_data *stm_data, | 681 | 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, | |||
691 | return -EINVAL; | 692 | return -EINVAL; |
692 | 693 | ||
693 | nmasters = stm_data->sw_end - stm_data->sw_start + 1; | 694 | nmasters = stm_data->sw_end - stm_data->sw_start + 1; |
694 | stm = kzalloc(sizeof(*stm) + nmasters * sizeof(void *), GFP_KERNEL); | 695 | stm = vzalloc(sizeof(*stm) + nmasters * sizeof(void *)); |
695 | if (!stm) | 696 | if (!stm) |
696 | return -ENOMEM; | 697 | return -ENOMEM; |
697 | 698 | ||
@@ -744,7 +745,7 @@ err_device: | |||
744 | /* matches device_initialize() above */ | 745 | /* matches device_initialize() above */ |
745 | put_device(&stm->dev); | 746 | put_device(&stm->dev); |
746 | err_free: | 747 | err_free: |
747 | kfree(stm); | 748 | vfree(stm); |
748 | 749 | ||
749 | return err; | 750 | return err; |
750 | } | 751 | } |
diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c index 2d2ceda9aa26..500911f16498 100644 --- a/drivers/thunderbolt/icm.c +++ b/drivers/thunderbolt/icm.c | |||
@@ -1255,7 +1255,7 @@ static int icm_ar_get_boot_acl(struct tb *tb, uuid_t *uuids, size_t nuuids) | |||
1255 | /* Map empty entries to null UUID */ | 1255 | /* Map empty entries to null UUID */ |
1256 | uuid[0] = 0; | 1256 | uuid[0] = 0; |
1257 | uuid[1] = 0; | 1257 | uuid[1] = 0; |
1258 | } else { | 1258 | } else if (uuid[0] != 0 || uuid[1] != 0) { |
1259 | /* Upper two DWs are always one's */ | 1259 | /* Upper two DWs are always one's */ |
1260 | uuid[2] = 0xffffffff; | 1260 | uuid[2] = 0xffffffff; |
1261 | uuid[3] = 0xffffffff; | 1261 | uuid[3] = 0xffffffff; |