Commit a74aa967 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull char/misc fixes from Greg KH:
 "Here are a few char/misc driver fixes for 4.18-rc5.

  The "largest" stuff here is fixes for the UIO changes in 4.18-rc1 that
  caused breakages for some people. Thanks to Xiubo Li for fixing them
  quickly. Other than that, minor fixes for thunderbolt, vmw_balloon,
  nvmem, mei, ibmasm, and mei drivers. There's also a MAINTAINERS update
  where Rafael is offering to help out with reviewing driver core
  patches.

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

* tag 'char-misc-4.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  nvmem: Don't let a NULL cell_id for nvmem_cell_get() crash us
  thunderbolt: Notify userspace when boot_acl is changed
  uio: fix crash after the device is unregistered
  uio: change to use the mutex lock instead of the spin lock
  uio: use request_threaded_irq instead
  fpga: altera-cvp: Fix an error handling path in 'altera_cvp_probe()'
  ibmasm: don't write out of bounds in read handler
  MAINTAINERS: Add myself as driver core changes reviewer
  mei: discard messages from not connected client during power down.
  vmw_balloon: fix inflation with batching
parents 1dc85ac2 87ed1405
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4460,6 +4460,7 @@ F: Documentation/blockdev/drbd/

DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
M:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
R:	"Rafael J. Wysocki" <rafael@kernel.org>
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
S:	Supported
F:	Documentation/kobject.txt
+4 −2
Original line number Diff line number Diff line
@@ -455,8 +455,10 @@ static int altera_cvp_probe(struct pci_dev *pdev,

	mgr = fpga_mgr_create(&pdev->dev, conf->mgr_name,
			      &altera_cvp_ops, conf);
	if (!mgr)
		return -ENOMEM;
	if (!mgr) {
		ret = -ENOMEM;
		goto err_unmap;
	}

	pci_set_drvdata(pdev, mgr);

+3 −24
Original line number Diff line number Diff line
@@ -507,35 +507,14 @@ static int remote_settings_file_close(struct inode *inode, struct file *file)
static ssize_t remote_settings_file_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
{
	void __iomem *address = (void __iomem *)file->private_data;
	unsigned char *page;
	int retval;
	int len = 0;
	unsigned int value;

	if (*offset < 0)
		return -EINVAL;
	if (count == 0 || count > 1024)
		return 0;
	if (*offset != 0)
		return 0;

	page = (unsigned char *)__get_free_page(GFP_KERNEL);
	if (!page)
		return -ENOMEM;
	char lbuf[20];

	value = readl(address);
	len = sprintf(page, "%d\n", value);

	if (copy_to_user(buf, page, len)) {
		retval = -EFAULT;
		goto exit;
	}
	*offset += len;
	retval = len;
	len = snprintf(lbuf, sizeof(lbuf), "%d\n", value);

exit:
	free_page((unsigned long)page);
	return retval;
	return simple_read_from_buffer(buf, count, offset, lbuf, len);
}

static ssize_t remote_settings_file_write(struct file *file, const char __user *ubuff, size_t count, loff_t *offset)
+4 −1
Original line number Diff line number Diff line
@@ -310,8 +310,11 @@ int mei_irq_read_handler(struct mei_device *dev,
	if (&cl->link == &dev->file_list) {
		/* A message for not connected fixed address clients
		 * should be silently discarded
		 * On power down client may be force cleaned,
		 * silently discard such messages
		 */
		if (hdr_is_fixed(mei_hdr)) {
		if (hdr_is_fixed(mei_hdr) ||
		    dev->dev_state == MEI_DEV_POWER_DOWN) {
			mei_irq_discard_msg(dev, mei_hdr);
			ret = 0;
			goto reset_slots;
+2 −2
Original line number Diff line number Diff line
@@ -467,7 +467,7 @@ static int vmballoon_send_batched_lock(struct vmballoon *b,
		unsigned int num_pages, bool is_2m_pages, unsigned int *target)
{
	unsigned long status;
	unsigned long pfn = page_to_pfn(b->page);
	unsigned long pfn = PHYS_PFN(virt_to_phys(b->batch_page));

	STATS_INC(b->stats.lock[is_2m_pages]);

@@ -515,7 +515,7 @@ static bool vmballoon_send_batched_unlock(struct vmballoon *b,
		unsigned int num_pages, bool is_2m_pages, unsigned int *target)
{
	unsigned long status;
	unsigned long pfn = page_to_pfn(b->page);
	unsigned long pfn = PHYS_PFN(virt_to_phys(b->batch_page));

	STATS_INC(b->stats.unlock[is_2m_pages]);

Loading