Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8a33273 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull char/misc driver fixes from Greg KH:
 "Here are some small char and misc driver fixes for 4.17-rc3

  A variety of small things that have fallen out after 4.17-rc1 was out.
  Some vboxguest fixes for systems with lots of memory, amba bus fixes,
  some MAINTAINERS updates, uio_hv_generic driver fixes, and a few other
  minor things that resolve problems that people reported.

  The amba bus fixes took twice to get right, the first time I messed up
  applying the patches in the wrong order, hence the revert and later
  addition again with the correct fix, sorry about that.

  All of these have been in linux-next with no reported issues"

* tag 'char-misc-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  ARM: amba: Fix race condition with driver_override
  ARM: amba: Make driver_override output consistent with other buses
  Revert "ARM: amba: Fix race condition with driver_override"
  ARM: amba: Don't read past the end of sysfs "driver_override" buffer
  ARM: amba: Fix race condition with driver_override
  virt: vbox: Log an error when we fail to get the host version
  virt: vbox: Use __get_free_pages instead of kmalloc for DMA32 memory
  virt: vbox: Add vbg_req_free() helper function
  virt: vbox: Move declarations of vboxguest private functions to private header
  slimbus: Fix out-of-bounds access in slim_slicesize()
  MAINTAINERS: add dri-devel&linaro-mm for Android ION
  fpga-manager: altera-ps-spi: preserve nCONFIG state
  MAINTAINERS: update my email address
  uio_hv_generic: fix subchannel ring mmap
  uio_hv_generic: use correct channel in isr
  uio_hv_generic: make ring buffer attribute for primary channel
  uio_hv_generic: set size of ring buffer attribute
  ANDROID: binder: prevent transactions into own process.
parents ee3748be 6a7228d9
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -905,6 +905,8 @@ ANDROID ION DRIVER
M:	Laura Abbott <labbott@redhat.com>
M:	Sumit Semwal <sumit.semwal@linaro.org>
L:	devel@driverdev.osuosl.org
L:	dri-devel@lists.freedesktop.org
L:	linaro-mm-sig@lists.linaro.org (moderated for non-subscribers)
S:	Supported
F:	drivers/staging/android/ion
F:	drivers/staging/android/uapi/ion.h
@@ -13953,7 +13955,7 @@ THUNDERBOLT DRIVER
M:	Andreas Noever <andreas.noever@gmail.com>
M:	Michael Jamet <michael.jamet@intel.com>
M:	Mika Westerberg <mika.westerberg@linux.intel.com>
M:	Yehezkel Bernat <yehezkel.bernat@intel.com>
M:	Yehezkel Bernat <YehezkelShB@gmail.com>
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git
S:	Maintained
F:	Documentation/admin-guide/thunderbolt.rst
@@ -13963,7 +13965,7 @@ F: include/linux/thunderbolt.h
THUNDERBOLT NETWORK DRIVER
M:	Michael Jamet <michael.jamet@intel.com>
M:	Mika Westerberg <mika.westerberg@linux.intel.com>
M:	Yehezkel Bernat <yehezkel.bernat@intel.com>
M:	Yehezkel Bernat <YehezkelShB@gmail.com>
L:	netdev@vger.kernel.org
S:	Maintained
F:	drivers/net/thunderbolt.c
+11 −6
Original line number Diff line number Diff line
@@ -69,11 +69,12 @@ static ssize_t driver_override_show(struct device *_dev,
				    struct device_attribute *attr, char *buf)
{
	struct amba_device *dev = to_amba_device(_dev);
	ssize_t len;

	if (!dev->driver_override)
		return 0;

	return sprintf(buf, "%s\n", dev->driver_override);
	device_lock(_dev);
	len = sprintf(buf, "%s\n", dev->driver_override);
	device_unlock(_dev);
	return len;
}

static ssize_t driver_override_store(struct device *_dev,
@@ -81,9 +82,10 @@ static ssize_t driver_override_store(struct device *_dev,
				     const char *buf, size_t count)
{
	struct amba_device *dev = to_amba_device(_dev);
	char *driver_override, *old = dev->driver_override, *cp;
	char *driver_override, *old, *cp;

	if (count > PATH_MAX)
	/* We need to keep extra room for a newline */
	if (count >= (PAGE_SIZE - 1))
		return -EINVAL;

	driver_override = kstrndup(buf, count, GFP_KERNEL);
@@ -94,12 +96,15 @@ static ssize_t driver_override_store(struct device *_dev,
	if (cp)
		*cp = '\0';

	device_lock(_dev);
	old = dev->driver_override;
	if (strlen(driver_override)) {
		dev->driver_override = driver_override;
	} else {
	       kfree(driver_override);
	       dev->driver_override = NULL;
	}
	device_unlock(_dev);

	kfree(old);

+8 −0
Original line number Diff line number Diff line
@@ -2839,6 +2839,14 @@ static void binder_transaction(struct binder_proc *proc,
			else
				return_error = BR_DEAD_REPLY;
			mutex_unlock(&context->context_mgr_node_lock);
			if (target_node && target_proc == proc) {
				binder_user_error("%d:%d got transaction to context manager from process owning it\n",
						  proc->pid, thread->pid);
				return_error = BR_FAILED_REPLY;
				return_error_param = -EINVAL;
				return_error_line = __LINE__;
				goto err_invalid_target_handle;
			}
		}
		if (!target_node) {
			/*
+1 −1
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ static int altera_ps_probe(struct spi_device *spi)

	conf->data = of_id->data;
	conf->spi = spi;
	conf->config = devm_gpiod_get(&spi->dev, "nconfig", GPIOD_OUT_HIGH);
	conf->config = devm_gpiod_get(&spi->dev, "nconfig", GPIOD_OUT_LOW);
	if (IS_ERR(conf->config)) {
		dev_err(&spi->dev, "Failed to get config gpio: %ld\n",
			PTR_ERR(conf->config));
+1 −1
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ static u16 slim_slicesize(int code)
		0, 1, 2, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7
	};

	clamp(code, 1, (int)ARRAY_SIZE(sizetocode));
	code = clamp(code, 1, (int)ARRAY_SIZE(sizetocode));

	return sizetocode[code - 1];
}
Loading