Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'gpio-fixes-for-v6.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

- fix a use-after-free bug in GPIO character device code

- update MAINTAINERS

* tag 'gpio-fixes-for-v6.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
MAINTAINERS: update my email address
gpio: cdev: make sure the cdev fd is still active before emitting events

+15 -10
+8 -8
MAINTAINERS
··· 3926 3926 F: include/linux/async_tx.h 3927 3927 3928 3928 AT24 EEPROM DRIVER 3929 - M: Bartosz Golaszewski <brgl@bgdev.pl> 3929 + M: Bartosz Golaszewski <brgl@kernel.org> 3930 3930 L: linux-i2c@vger.kernel.org 3931 3931 S: Maintained 3932 3932 T: git git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git ··· 10678 10678 10679 10679 GPIO SUBSYSTEM 10680 10680 M: Linus Walleij <linus.walleij@linaro.org> 10681 - M: Bartosz Golaszewski <brgl@bgdev.pl> 10681 + M: Bartosz Golaszewski <brgl@kernel.org> 10682 10682 L: linux-gpio@vger.kernel.org 10683 10683 S: Maintained 10684 10684 T: git git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git ··· 10695 10695 K: devm_gpiod_unhinge 10696 10696 10697 10697 GPIO UAPI 10698 - M: Bartosz Golaszewski <brgl@bgdev.pl> 10698 + M: Bartosz Golaszewski <brgl@kernel.org> 10699 10699 R: Kent Gibson <warthog618@gmail.com> 10700 10700 L: linux-gpio@vger.kernel.org 10701 10701 S: Maintained ··· 15309 15309 F: include/linux/mfd/max7360.h 15310 15310 15311 15311 MAXIM MAX77650 PMIC MFD DRIVER 15312 - M: Bartosz Golaszewski <brgl@bgdev.pl> 15312 + M: Bartosz Golaszewski <brgl@kernel.org> 15313 15313 L: linux-kernel@vger.kernel.org 15314 15314 S: Maintained 15315 15315 F: Documentation/devicetree/bindings/*/*max77650.yaml ··· 19903 19903 F: include/linux/pci-p2pdma.h 19904 19904 19905 19905 PCI POWER CONTROL 19906 - M: Bartosz Golaszewski <brgl@bgdev.pl> 19906 + M: Bartosz Golaszewski <brgl@kernel.org> 19907 19907 L: linux-pci@vger.kernel.org 19908 19908 S: Maintained 19909 19909 T: git git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git ··· 20500 20500 F: kernel/configs/nopm.config 20501 20501 20502 20502 POWER SEQUENCING 20503 - M: Bartosz Golaszewski <brgl@bgdev.pl> 20503 + M: Bartosz Golaszewski <brgl@kernel.org> 20504 20504 L: linux-pm@vger.kernel.org 20505 20505 S: Maintained 20506 20506 T: git git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git ··· 21303 21303 F: drivers/tee/qcomtee/ 21304 21304 21305 21305 QUALCOMM TRUST ZONE MEMORY ALLOCATOR 21306 - M: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> 21306 + M: Bartosz Golaszewski <brgl@kernel.org> 21307 21307 L: linux-arm-msm@vger.kernel.org 21308 21308 S: Maintained 21309 21309 F: drivers/firmware/qcom/qcom_tzmem.c ··· 25671 25671 F: drivers/crypto/ti/ 25672 25672 25673 25673 TI DAVINCI MACHINE SUPPORT 25674 - M: Bartosz Golaszewski <brgl@bgdev.pl> 25674 + M: Bartosz Golaszewski <brgl@kernel.org> 25675 25675 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 25676 25676 S: Maintained 25677 25677 T: git git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git
+7 -2
drivers/gpio/gpiolib-cdev.c
··· 2548 2548 container_of(nb, struct gpio_chardev_data, lineinfo_changed_nb); 2549 2549 struct lineinfo_changed_ctx *ctx; 2550 2550 struct gpio_desc *desc = data; 2551 + struct file *fp; 2551 2552 2552 2553 if (!test_bit(gpio_chip_hwgpio(desc), cdev->watched_lines)) 2554 + return NOTIFY_DONE; 2555 + 2556 + /* Keep the file descriptor alive for the duration of the notification. */ 2557 + fp = get_file_active(&cdev->fp); 2558 + if (!fp) 2559 + /* Chardev file descriptor was or is being released. */ 2553 2560 return NOTIFY_DONE; 2554 2561 2555 2562 /* ··· 2582 2575 /* Keep the GPIO device alive until we emit the event. */ 2583 2576 ctx->gdev = gpio_device_get(desc->gdev); 2584 2577 ctx->cdev = cdev; 2585 - /* Keep the file descriptor alive too. */ 2586 - get_file(ctx->cdev->fp); 2587 2578 2588 2579 INIT_WORK(&ctx->work, lineinfo_changed_func); 2589 2580 queue_work(ctx->gdev->line_state_wq, &ctx->work);