Commit 5dadc1be authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull char/misc driver fixes from Greg KH:
 "Here are some small char/misc/other driver fixes for 6.11-rc7. It's
  nothing huge, just a bunch of small fixes of reported problems,
  including:

   - lots of tiny iio driver fixes

   - nvmem driver fixex

   - binder UAF bugfix

   - uio driver crash fix

   - other small fixes

  All of these have been in linux-next this week with no reported
  problems"

* tag 'char-misc-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (21 commits)
  VMCI: Fix use-after-free when removing resource in vmci_resource_remove()
  Drivers: hv: vmbus: Fix rescind handling in uio_hv_generic
  uio_hv_generic: Fix kernel NULL pointer dereference in hv_uio_rescind
  misc: keba: Fix sysfs group creation
  dt-bindings: nvmem: Use soc-nvmem node name instead of nvmem
  nvmem: Fix return type of devm_nvmem_device_get() in kerneldoc
  nvmem: u-boot-env: error if NVMEM device is too small
  misc: fastrpc: Fix double free of 'buf' in error path
  binder: fix UAF caused by offsets overwrite
  iio: imu: inv_mpu6050: fix interrupt status read for old buggy chips
  iio: adc: ad7173: fix GPIO device info
  iio: adc: ad7124: fix DT configuration parsing
  iio: adc: ad_sigma_delta: fix irq_flags on irq request
  iio: adc: ads1119: Fix IRQ flags
  iio: fix scale application in iio_convert_raw_to_processed_unlocked
  iio: adc: ad7124: fix config comparison
  iio: adc: ad7124: fix chip ID mismatch
  iio: adc: ad7173: Fix incorrect compatible string
  iio: buffer-dmaengine: fix releasing dma channel on error
  iio: adc: ad7606: remove frstdata check for serial mode
  ...
parents 51c4d5f1 48b9a8da
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ unevaluatedProperties: false

examples:
  - |
    nvmem {
    soc-nvmem {
        compatible = "xlnx,zynqmp-nvmem-fw";
        nvmem-layout {
            compatible = "fixed-layout";
+1 −0
Original line number Diff line number Diff line
@@ -3422,6 +3422,7 @@ static void binder_transaction(struct binder_proc *proc,
		 */
		copy_size = object_offset - user_offset;
		if (copy_size && (user_offset > object_offset ||
				object_offset > tr->data_size ||
				binder_alloc_copy_user_to_buffer(
					&target_proc->alloc,
					t->buffer, user_offset,
+1 −0
Original line number Diff line number Diff line
@@ -1952,6 +1952,7 @@ void vmbus_device_unregister(struct hv_device *device_obj)
	 */
	device_unregister(&device_obj->device);
}
EXPORT_SYMBOL_GPL(vmbus_device_unregister);

#ifdef CONFIG_ACPI
/*
+17 −13
Original line number Diff line number Diff line
@@ -147,6 +147,8 @@ struct ad7124_chip_info {
struct ad7124_channel_config {
	bool live;
	unsigned int cfg_slot;
	/* Following fields are used to compare equality. */
	struct_group(config_props,
		enum ad7124_ref_sel refsel;
		bool bipolar;
		bool buf_positive;
@@ -156,6 +158,7 @@ struct ad7124_channel_config {
		unsigned int odr;
		unsigned int odr_sel_bits;
		unsigned int filter_type;
	);
};

struct ad7124_channel {
@@ -334,11 +337,12 @@ static struct ad7124_channel_config *ad7124_find_similar_live_cfg(struct ad7124_
	ptrdiff_t cmp_size;
	int i;

	cmp_size = (u8 *)&cfg->live - (u8 *)cfg;
	cmp_size = sizeof_field(struct ad7124_channel_config, config_props);
	for (i = 0; i < st->num_channels; i++) {
		cfg_aux = &st->channels[i].cfg;

		if (cfg_aux->live && !memcmp(cfg, cfg_aux, cmp_size))
		if (cfg_aux->live &&
		    !memcmp(&cfg->config_props, &cfg_aux->config_props, cmp_size))
			return cfg_aux;
	}

@@ -764,6 +768,7 @@ static int ad7124_soft_reset(struct ad7124_state *st)
	if (ret < 0)
		return ret;

	fsleep(200);
	timeout = 100;
	do {
		ret = ad_sd_read_reg(&st->sd, AD7124_STATUS, 1, &readval);
@@ -839,8 +844,6 @@ static int ad7124_parse_channel_config(struct iio_dev *indio_dev,
	st->channels = channels;

	device_for_each_child_node_scoped(dev, child) {
		cfg = &st->channels[channel].cfg;

		ret = fwnode_property_read_u32(child, "reg", &channel);
		if (ret)
			return ret;
@@ -858,6 +861,7 @@ static int ad7124_parse_channel_config(struct iio_dev *indio_dev,
		st->channels[channel].ain = AD7124_CHANNEL_AINP(ain[0]) |
						  AD7124_CHANNEL_AINM(ain[1]);

		cfg = &st->channels[channel].cfg;
		cfg->bipolar = fwnode_property_read_bool(child, "bipolar");

		ret = fwnode_property_read_u32(child, "adi,reference-select", &tmp);
+5 −8
Original line number Diff line number Diff line
@@ -302,7 +302,6 @@ static const struct ad7173_device_info ad4114_device_info = {
	.num_configs = 8,
	.num_voltage_in = 16,
	.num_gpios = 4,
	.higher_gpio_bits = true,
	.has_vincom_input = true,
	.has_temp = true,
	.has_input_buf = true,
@@ -320,7 +319,6 @@ static const struct ad7173_device_info ad4115_device_info = {
	.num_configs = 8,
	.num_voltage_in = 16,
	.num_gpios = 4,
	.higher_gpio_bits = true,
	.has_vincom_input = true,
	.has_temp = true,
	.has_input_buf = true,
@@ -338,7 +336,6 @@ static const struct ad7173_device_info ad4116_device_info = {
	.num_configs = 8,
	.num_voltage_in = 16,
	.num_gpios = 4,
	.higher_gpio_bits = true,
	.has_vincom_input = true,
	.has_temp = true,
	.has_input_buf = true,
@@ -1435,11 +1432,11 @@ static int ad7173_probe(struct spi_device *spi)
}

static const struct of_device_id ad7173_of_match[] = {
	{ .compatible = "ad4111",	.data = &ad4111_device_info },
	{ .compatible = "ad4112",	.data = &ad4112_device_info },
	{ .compatible = "ad4114",	.data = &ad4114_device_info },
	{ .compatible = "ad4115",	.data = &ad4115_device_info },
	{ .compatible = "ad4116",	.data = &ad4116_device_info },
	{ .compatible = "adi,ad4111",	.data = &ad4111_device_info },
	{ .compatible = "adi,ad4112",	.data = &ad4112_device_info },
	{ .compatible = "adi,ad4114",	.data = &ad4114_device_info },
	{ .compatible = "adi,ad4115",	.data = &ad4115_device_info },
	{ .compatible = "adi,ad4116",	.data = &ad4116_device_info },
	{ .compatible = "adi,ad7172-2", .data = &ad7172_2_device_info },
	{ .compatible = "adi,ad7172-4", .data = &ad7172_4_device_info },
	{ .compatible = "adi,ad7173-8", .data = &ad7173_8_device_info },
Loading