Skip to contentSkip to conversation

Revertion of all of the umn.edu commits

PATCH NAK Greg Kroah-Hartman 86 participants 581 messages Apr 21, 2021 – May 9, 2021 3 messages not in the archive Page 1 of 3

Subsystems (158)
lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

cover Revertion of all of the umn.edu commits

I have been meaning to do this for a while, but recent events have finally forced me to do so.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

This patchset has the "easy" reverts, there are 68 remaining ones that need to be manually reviewed. Some of them are not able to be reverted as they already have been reverted, or fixed up with follow-on patches as they were determined to be invalid. Proof that these submissions were almost universally wrong.

I will be working with some other kernel developers to determine if any of these reverts were actually valid changes, were actually valid, and if so, will resubmit them properly later. For now, it's better to be safe.

I'll take this through my tree, so no need for any maintainer to worry about this, but they should be aware that future submissions from anyone with a umn.edu address should be by default-rejected unless otherwise determined to actually be a valid fix (i.e. they provide proof and you can verify it, but really, why waste your time doing that extra work?)

thanks,

greg k-h

Greg Kroah-Hartman (190):
Revert "net/rds: Avoid potential use after free in
rds_send_remove_from_sock"
Revert "media: st-delta: Fix reference count leak in delta_run_work" Revert "media: sti: Fix reference count leaks"
Revert "media: exynos4-is: Fix several reference count leaks due to
pm_runtime_get_sync"
Revert "media: exynos4-is: Fix a reference count leak due to
pm_runtime_get_sync"
Revert "media: exynos4-is: Fix a reference count leak" Revert "media: ti-vpe: Fix a missing check and reference count leak" Revert "media: stm32-dcmi: Fix a reference count leak" Revert "media: s5p-mfc: Fix a reference count leak"
Revert "media: camss: Fix a reference count leak."
Revert "media: platform: fcp: Fix a reference count leak." Revert "media: rockchip/rga: Fix a reference count leak." Revert "media: rcar-vin: Fix a reference count leak." Revert "media: rcar-vin: Fix a reference count leak." Revert "firmware: Fix a reference count leak."
Revert "drm/nouveau: fix reference count leak in
nouveau_debugfs_strap_peek"
Revert "drm/nouveau: fix reference count leak in
nv50_disp_atomic_commit"
Revert "drm/nouveau: fix multiple instances of reference count leaks" Revert "drm/nouveau/drm/noveau: fix reference count leak in
nouveau_fbcon_open"
Revert "PCI: Fix pci_create_slot() reference count leak" Revert "omapfb: fix multiple reference count leaks due to
pm_runtime_get_sync"
Revert "drm/radeon: Fix reference count leaks caused by
pm_runtime_get_sync"
Revert "drm/radeon: fix multiple reference count leak" Revert "drm/amdkfd: Fix reference count leaks."
Revert "platform/chrome: cros_ec_ishtp: Fix a double-unlock issue" Revert "usb: dwc3: pci: Fix reference count leak in
dwc3_pci_resume_work"
Revert "ASoC: rockchip: Fix a reference count leak." Revert "RDMA/rvt: Fix potential memory leak caused by rvt_alloc_rq" Revert "EDAC: Fix reference count leaks"
Revert "ASoC: tegra: Fix reference count leaks."
Revert "test_objagg: Fix potential memory leak in error handling" Revert "ASoC: img-parallel-out: Fix a reference count leak" Revert "ASoC: img: Fix a reference count leak in img_i2s_in_set_fmt" Revert "efi/esrt: Fix reference count leak in
esre_create_sysfs_entry."
Revert "scsi: iscsi: Fix reference count leak in
iscsi_boot_create_kobj"
Revert "vfio/mdev: Fix reference count leak in
add_mdev_supported_type"
Revert "RDMA/core: Fix several reference count leaks." Revert "cpuidle: Fix three reference count leaks"
Revert "iommu: Fix reference count leak in iommu_group_alloc." Revert "ACPI: CPPC: Fix reference count leak in
acpi_cppc_processor_probe()"
Revert "ACPI: sysfs: Fix reference count leak in
acpi_sysfs_add_hotplug_profile()"
Revert "ASoC: fix incomplete error-handling in img_i2s_in_probe." Revert "qlcnic: fix missing release in qlcnic_83xx_interrupt_test." Revert "RDMA/pvrdma: Fix missing pci disable in pvrdma_pci_probe()" Revert "usb: gadget: fix potential double-free in m66592_probe." Revert "net/mlx4_core: fix a memory leak bug."
Revert "rxrpc: Fix a memory leak in rxkad_verify_response()" Revert "net: sun: fix missing release regions in cas_init_one()." Revert "agp/intel: Fix a memory leak on module initialisation failure" Revert "nfp: abm: fix a memory leak bug"
Revert "power: supply: core: fix memory leak in HWMON error path" Revert "media: media/saa7146: fix incorrect assertion in

    saa7146_buffer_finish"
  Revert "ecryptfs: replace BUG_ON with error handling code"
  Revert "clk: samsung: Remove redundant check in
    samsung_cmu_register_one"
  Revert "fs: ocfs: remove unnecessary assertion in dlm_migrate_lockres"
  Revert "media: davinci/vpfe_capture.c: Avoid BUG_ON for register
    failure"
  Revert "media: saa7146: Avoid using BUG_ON as an assertion"
  Revert "media: cx231xx: replace BUG_ON with recovery code"
  Revert "RDMA/srpt: Remove unnecessary assertion in
    srpt_queue_response"
  Revert "staging: kpc2000: remove unnecessary assertions in
    kpc_dma_transfer"
  Revert "xen/grant-table: remove multiple BUG_ON on gnttab_interface"
  Revert "scsi: libfc: remove unnecessary assertion on ep variable"
  Revert "hdlcdrv: replace unnecessary assertion in hdlcdrv_register"
  Revert "nfc: s3fwrn5: replace the assertion with a WARN_ON"
  Revert "nfsd: remove unnecessary assertion in nfsd4_encode_replay"
  Revert "bpf: Remove unnecessary assertion on fp_old"
  Revert "net: caif: replace BUG_ON with recovery code"
  Revert "fore200e: Fix incorrect checks of NULL pointer dereference"
  Revert "mac80211: Remove redundant assertion"
  Revert "rfkill: Fix incorrect check to avoid NULL pointer dereference"
  Revert "pppoe: remove redundant BUG_ON() check in pppoe_pernet"
  Revert "net: atm: Reduce the severity of logging in unlink_clip_vcc"
  Revert "media: rcar_drif: fix a memory disclosure"
  Revert "drm/gma500: fix memory disclosures due to uninitialized bytes"
  Revert "gma/gma500: fix a memory disclosure bug due to uninitialized
    bytes"
  Revert "net: ixgbevf: fix a missing check of
    ixgbevf_write_msg_read_ack"
  Revert "rapidio: fix a NULL pointer dereference when
    create_workqueue() fails"
  Revert "ASoC: cs43130: fix a NULL pointer dereference"
  Revert "ASoC: rt5645: fix a NULL pointer dereference"
  Revert "ALSA: usx2y: fix a double free bug"
  Revert "tracing: Fix a memory leak by early error exit in
    trace_pid_write()"
  Revert "rsi: Fix NULL pointer dereference in kmalloc"
  Revert "net: cw1200: fix a NULL pointer dereference"
  Revert "net: ieee802154: fix missing checks for regmap_update_bits"
  Revert "audit: fix a memory leak bug"
  Revert "x86/PCI: Fix PCI IRQ routing table memory leak"
  Revert "udf: fix an uninitialized read bug and remove dead code"
  Revert "mmc_spi: add a status check for spi_sync_locked"
  Revert "PCI: endpoint: Fix a potential NULL pointer dereference"
  Revert "net/smc: fix a NULL pointer dereference"
  Revert "pinctrl: axp209: Fix NULL pointer dereference after
    allocation"
  Revert "power: charger-manager: fix a potential NULL pointer
    dereference"
  Revert "iio: hmc5843: fix potential NULL pointer dereferences"
  Revert "iio: adc: fix a potential NULL pointer dereference"
  Revert "rtlwifi: fix a potential NULL pointer dereference"
  Revert "net: mwifiex: fix a NULL pointer dereference"
  Revert "video: imsttfb: fix potential NULL pointer dereferences"
  Revert "video: hgafb: fix potential NULL pointer dereference"
  Revert "omapfb: Fix potential NULL pointer dereference in kmalloc"
  Revert "staging: greybus: audio_manager: fix a missing check of
    ida_simple_get"
  Revert "PCI: xilinx: Check for __get_free_pages() failure"
  Revert "media: video-mux: fix null pointer dereferences"
  Revert "thunderbolt: property: Fix a missing check of kzalloc"
  Revert "char: hpet: fix a missing check of ioremap"
  Revert "libnvdimm/btt: Fix a kmemdup failure check"
  Revert "tty: ipwireless: fix missing checks for ioremap"
  Revert "RDMA/i40iw: Handle workqueue allocation failure"
  Revert "usb: u132-hcd: fix potential NULL pointer dereference"
  Revert "usb: sierra: fix a missing check of device_create_file"
  Revert "scsi: qla4xxx: fix a potential NULL pointer dereference"
  Revert "gpio: aspeed: fix a potential NULL pointer dereference"
  Revert "libnvdimm/namespace: Fix a potential NULL pointer dereference"
  Revert "x86/hpet: Prevent potential NULL pointer dereference"
  Revert "staging: rtl8188eu: Fix potential NULL pointer dereference of
    kcalloc"
  Revert "thunderbolt: Fix a missing check of kmemdup"
  Revert "thunderbolt: property: Fix a NULL pointer dereference"
  Revert "media: si2165: fix a missing check of return value"
  Revert "scsi: ufs: fix a missing check of devm_reset_control_get"
  Revert "tty: mxs-auart: fix a potential NULL pointer dereference"
  Revert "tty: atmel_serial: fix a potential NULL pointer dereference"
  Revert "serial: mvebu-uart: Fix to avoid a potential NULL pointer
    dereference"
  Revert "HID: logitech: check the return value of
    create_singlethread_workqueue"
  Revert "netfilter: ip6t_srh: fix NULL pointer dereferences"
  Revert "spi : spi-topcliff-pch: Fix to handle empty DMA buffers"
  Revert "net: tipc: fix a missing check of nla_nest_start"
  Revert "net: openvswitch: fix a NULL pointer dereference"
  Revert "ALSA: sb8: add a check for request_region"
  Revert "net: strparser: fix a missing check for
    create_singlethread_workqueue"
  Revert "qlcnic: Avoid potential NULL pointer dereference"
  Revert "ALSA: usx2y: Fix potential NULL pointer dereference"
  Revert "net: 8390: fix potential NULL pointer dereferences"
  Revert "net: fujitsu: fix a potential NULL pointer dereference"
  Revert "net: qlogic: fix a potential NULL pointer dereference"
  Revert "md: Fix failed allocation of md_register_thread"
  Revert "net: rocker: fix a potential NULL pointer dereference"
  Revert "net: thunder: fix a potential NULL pointer dereference"
  Revert "net: lio_core: fix two NULL pointer dereferences"
  Revert "net: liquidio: fix a NULL pointer dereference"
  Revert "isdn: mISDNinfineon: fix potential NULL pointer dereference"
  Revert "isdn: mISDN: Fix potential NULL pointer dereference of
    kzalloc"
  Revert "libertas: add checks for the return value of
    sysfs_create_group"
  Revert "rtc: hym8563: fix a missing check of block data read"
  Revert "power: twl4030: fix a missing check of return value"
  Revert "misc/ics932s401: Add a missing check to
    i2c_smbus_read_word_data"
  Revert "leds: lp5523: fix a missing check of return value of
    lp55xx_read"

Revert "media: dvb: Add check on sp8870_readreg"
Revert "media: dvb: add return value check on Write16" Revert "media: mt312: fix a missing check of mt312 reset" Revert "media: lgdt3306a: fix a missing check of return value" Revert "media: gspca: mt9m111: Check write_bridge for timeout" Revert "media: gspca: Check the return value of write_bridge for
timeout"
Revert "media: usb: gspca: add a missed check for goto_low_power" Revert "media: usb: gspca: add a missed return-value check for
do_command"
Revert "ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()" Revert "brcmfmac: add a check for the status of usb_register" Revert "serial: max310x: pass return value of spi_register_driver" Revert "Input: ad7879 - add check for read errors in interrupt" Revert "ALSA: sb: fix a missing check of snd_ctl_add" Revert "ALSA: gus: add a check of the status of snd_ctl_add" Revert "Staging: rts5208: Fix error handling on rtsx_send_cmd" Revert "staging: rts5208: Add a check for ms_read_extra_data" Revert "dmaengine: qcom_hidma: Check for driver register failure" Revert "dmaengine: mv_xor: Fix a missing check in mv_xor_channel_add" Revert "iio: ad9523: fix a missing check of return value" Revert "mfd: mc13xxx: Fix a missing check of a register-read failure" Revert "infiniband: bnxt_re: qplib: Check the return value of
send_message"
Revert "gdrom: fix a memory leak bug"
Revert "net: marvell: fix a missing check of acpi_match_device" Revert "atl1e: checking the status of atl1e_write_phy_reg" Revert "net: dsa: bcm_sf2: Propagate error value from mdio_write" Revert "net: stmicro: fix a missing check of clk_prepare" Revert "net: (cpts) fix a missing check of clk_prepare" Revert "niu: fix missing checks of niu_pci_eeprom_read" Revert "net: chelsio: Add a missing check on cudg_get_buffer" Revert "ipv6/route: Add a missing check on proc_dointvec" Revert "net/net_namespace: Check the return value of
register_pernet_subsys()"
Revert "hwmon: (lm80) fix a missing check of bus read in lm80 probe" Revert "net: netxen: fix a missing check and an uninitialized use" Revert "drivers/regulator: fix a missing check of return value" Revert "net: socket: fix a missing-check bug"
Revert "dm ioctl: harden copy_params()'s copy_from_user() from
malicious users"
Revert "ethtool: fix a missing-check bug"
Revert "media: isif: fix a NULL pointer dereference bug" Revert "yam: fix a missing-check bug"
Revert "net: cxgb3_main: fix a missing-check bug"
Revert "virt: vbox: Only copy_from_user the request-header once" Revert "ALSA: control: fix a redundant-copy issue"
Revert "scsi: 3w-xxxx: fix a missing-check bug"
Revert "scsi: 3w-9xxx: fix a missing-check bug"
Revert "ethtool: fix a potential missing-check bug"

 arch/x86/kernel/hpet.c                        |  2 --
 arch/x86/pci/irq.c                            | 10 ++----
 drivers/acpi/cppc_acpi.c                      |  1 -
 drivers/acpi/sysfs.c                          |  4 +--
 drivers/atm/fore200e.c                        | 25 +++++----------
 drivers/cdrom/gdrom.c                         |  1 -
 drivers/char/agp/intel-gtt.c                  |  4 +--
 drivers/char/hpet.c                           |  2 --
 drivers/clk/samsung/clk.c                     |  4 +++
 drivers/cpuidle/sysfs.c                       |  6 ++--
 drivers/dma/mv_xor.c                          |  5 +--
 drivers/dma/qcom/hidma_mgmt.c                 |  3 +-
 drivers/edac/edac_device_sysfs.c              |  1 -
 drivers/edac/edac_pci_sysfs.c                 |  2 +-
 drivers/firmware/efi/esrt.c                   |  2 +-
 drivers/firmware/qemu_fw_cfg.c                |  7 ++---
 drivers/gpio/gpio-aspeed.c                    |  2 --
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c     | 20 +++---------
 drivers/gpu/drm/gma500/cdv_intel_display.c    |  2 --
 drivers/gpu/drm/gma500/oaktrail_crtc.c        |  2 --
 drivers/gpu/drm/nouveau/dispnv50/disp.c       |  4 +--
 drivers/gpu/drm/nouveau/nouveau_debugfs.c     |  4 +--
 drivers/gpu/drm/nouveau/nouveau_drm.c         |  8 ++---
 drivers/gpu/drm/nouveau/nouveau_fbcon.c       |  4 +--
 drivers/gpu/drm/nouveau/nouveau_gem.c         |  4 +--
 drivers/gpu/drm/radeon/radeon_connectors.c    | 20 +++---------
 drivers/gpu/drm/radeon/radeon_display.c       |  4 +--
 drivers/gpu/drm/radeon/radeon_drv.c           |  4 +--
 drivers/gpu/drm/radeon/radeon_kms.c           |  4 +--
 drivers/hid/hid-logitech-hidpp.c              |  8 +----
 drivers/hwmon/lm80.c                          | 11 ++-----
 drivers/iio/adc/mxs-lradc-adc.c               |  2 --
 drivers/iio/frequency/ad9523.c                |  7 ++---
 drivers/iio/magnetometer/hmc5843_i2c.c        |  7 +----
 drivers/iio/magnetometer/hmc5843_spi.c        |  7 +----
 drivers/infiniband/core/sysfs.c               | 10 +++---
 drivers/infiniband/hw/bnxt_re/qplib_sp.c      |  5 +--
 drivers/infiniband/hw/i40iw/i40iw.h           |  2 +-
 drivers/infiniband/hw/i40iw/i40iw_cm.c        | 18 ++---------
 drivers/infiniband/hw/i40iw/i40iw_main.c      |  5 +--
 .../infiniband/hw/vmw_pvrdma/pvrdma_main.c    |  2 +-
 drivers/infiniband/sw/rdmavt/qp.c             |  6 ++--
 drivers/infiniband/ulp/srpt/ib_srpt.c         |  2 ++
 drivers/input/touchscreen/ad7879.c            | 11 +++----
 drivers/iommu/iommu.c                         |  2 +-
 drivers/isdn/hardware/mISDN/hfcsusb.c         |  3 --
 drivers/isdn/hardware/mISDN/mISDNinfineon.c   |  5 +--
 drivers/leds/leds-lp5523.c                    |  4 +--
 drivers/md/dm-ioctl.c                         | 18 +++++++----
 drivers/md/raid10.c                           |  2 --
 drivers/md/raid5.c                            |  2 --
 drivers/media/common/saa7146/saa7146_fops.c   |  2 ++
 drivers/media/common/saa7146/saa7146_video.c  |  6 ++--
 drivers/media/dvb-frontends/drxd_hard.c       | 30 +++++++-----------
 drivers/media/dvb-frontends/lgdt3306a.c       |  5 +--
 drivers/media/dvb-frontends/mt312.c           |  4 +--
 drivers/media/dvb-frontends/si2165.c          |  8 ++---
 drivers/media/dvb-frontends/sp8870.c          |  4 +--
 drivers/media/platform/davinci/isif.c         |  3 +-
 drivers/media/platform/davinci/vpfe_capture.c | 31 +++++++++----------
 drivers/media/platform/exynos4-is/fimc-isp.c  |  4 +--
 drivers/media/platform/exynos4-is/fimc-lite.c |  2 +-
 drivers/media/platform/exynos4-is/media-dev.c |  4 +--
 drivers/media/platform/exynos4-is/mipi-csis.c |  4 +--
 .../media/platform/qcom/camss/camss-csiphy.c  |  4 +--
 drivers/media/platform/rcar-fcp.c             |  4 +--
 drivers/media/platform/rcar-vin/rcar-dma.c    |  4 +--
 drivers/media/platform/rcar-vin/rcar-v4l2.c   |  4 +--
 drivers/media/platform/rcar_drif.c            |  1 -
 drivers/media/platform/rockchip/rga/rga-buf.c |  1 -
 drivers/media/platform/s5p-mfc/s5p_mfc_pm.c   |  4 +--
 drivers/media/platform/sti/delta/delta-v4l2.c |  4 +--
 drivers/media/platform/sti/hva/hva-hw.c       |  2 --
 drivers/media/platform/stm32/stm32-dcmi.c     |  4 ++-
 drivers/media/platform/ti-vpe/vpe.c           |  2 --
 drivers/media/platform/video-mux.c            |  5 ---
 drivers/media/usb/cx231xx/cx231xx-i2c.c       |  3 +-
 drivers/media/usb/gspca/cpia1.c               | 14 ++-------
 drivers/media/usb/gspca/m5602/m5602_mt9m111.c |  8 ++---
 drivers/media/usb/gspca/m5602/m5602_po1030.c  |  8 ++---
 drivers/mfd/mc13xxx-core.c                    |  4 +--
 drivers/misc/ics932s401.c                     |  2 --
 drivers/mmc/host/mmc_spi.c                    |  4 ---
 drivers/net/caif/caif_serial.c                |  4 +--
 drivers/net/dsa/bcm_sf2.c                     |  7 +++--
 drivers/net/ethernet/8390/pcnet_cs.c          | 10 ------
 .../net/ethernet/atheros/atl1e/atl1e_main.c   |  4 +--
 .../net/ethernet/cavium/liquidio/lio_core.c   | 10 ------
 .../net/ethernet/cavium/liquidio/lio_main.c   |  5 ---
 .../net/ethernet/cavium/thunder/nicvf_main.c  |  6 ----
 .../net/ethernet/chelsio/cxgb3/cxgb3_main.c   | 17 ----------
 .../net/ethernet/chelsio/cxgb4/cudbg_lib.c    |  4 ---
 drivers/net/ethernet/fujitsu/fmvj18x_cs.c     |  5 ---
 drivers/net/ethernet/intel/ixgbevf/vf.c       |  5 +--
 .../net/ethernet/marvell/mvpp2/mvpp2_main.c   |  2 --
 drivers/net/ethernet/mellanox/mlx4/fw.c       |  2 +-
 drivers/net/ethernet/netronome/nfp/abm/main.c |  1 -
 .../ethernet/qlogic/netxen/netxen_nic_init.c  |  3 +-
 drivers/net/ethernet/qlogic/qla3xxx.c         |  6 ----
 .../ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c   |  4 +--
 .../ethernet/qlogic/qlcnic/qlcnic_ethtool.c   |  2 --
 drivers/net/ethernet/rocker/rocker_main.c     |  5 ---
 .../net/ethernet/stmicro/stmmac/dwmac-sunxi.c |  4 +--
 drivers/net/ethernet/sun/cassini.c            |  3 +-
 drivers/net/ethernet/sun/niu.c                | 10 ++----
 drivers/net/ethernet/ti/cpts.c                |  4 +--
 drivers/net/hamradio/hdlcdrv.c                |  2 ++
 drivers/net/hamradio/yam.c                    |  4 ---
 drivers/net/ieee802154/mcr20a.c               |  6 ----
 drivers/net/ppp/pppoe.c                       |  2 ++
 drivers/net/wireless/ath/ath6kl/wmi.c         |  4 ++-
 .../broadcom/brcm80211/brcmfmac/usb.c         |  6 +---
 drivers/net/wireless/marvell/libertas/mesh.c  |  5 ---
 drivers/net/wireless/marvell/mwifiex/cmdevt.c |  6 ----
 drivers/net/wireless/realtek/rtlwifi/base.c   |  5 ---
 drivers/net/wireless/rsi/rsi_91x_mac80211.c   | 30 +++++++-----------
 drivers/net/wireless/st/cw1200/main.c         |  5 ---
 drivers/nfc/s3fwrn5/firmware.c                |  5 +--
 drivers/nvdimm/btt_devs.c                     | 18 +++--------
 drivers/nvdimm/namespace_devs.c               |  5 +--
 drivers/pci/controller/pcie-xilinx.c          | 12 ++-----
 drivers/pci/endpoint/functions/pci-epf-test.c |  5 ---
 drivers/pci/slot.c                            |  6 ++--
 drivers/pinctrl/pinctrl-axp209.c              |  2 --
 drivers/platform/chrome/cros_ec_ishtp.c       |  4 +--
 drivers/power/supply/charger-manager.c        |  3 --
 drivers/power/supply/power_supply_hwmon.c     |  2 +-
 drivers/power/supply/twl4030_charger.c        |  4 +--
 drivers/rapidio/rio_cm.c                      |  8 -----
 drivers/regulator/palmas-regulator.c          |  5 +--
 drivers/rtc/rtc-hym8563.c                     |  2 --
 drivers/scsi/3w-9xxx.c                        |  5 ---
 drivers/scsi/3w-xxxx.c                        |  3 --
 drivers/scsi/iscsi_boot_sysfs.c               |  2 +-
 drivers/scsi/qla4xxx/ql4_os.c                 |  2 --
 drivers/scsi/ufs/ufs-hisi.c                   |  4 ---
 drivers/spi/spi-topcliff-pch.c                | 15 ++-------
 drivers/staging/greybus/audio_manager.c       |  3 --
 drivers/staging/kpc2000/kpc_dma/fileops.c     |  2 ++
 drivers/staging/rtl8188eu/core/rtw_xmit.c     |  9 ++----
 drivers/staging/rtl8188eu/include/rtw_xmit.h  |  2 +-
 drivers/staging/rtl8723bs/core/rtw_xmit.c     | 14 ++++-----
 drivers/staging/rtl8723bs/include/rtw_xmit.h  |  2 +-
 drivers/staging/rts5208/ms.c                  |  5 +--
 drivers/staging/rts5208/sd.c                  |  7 +----
 drivers/target/tcm_fc/tfc_io.c                |  1 +
 drivers/thunderbolt/property.c                | 16 +---------
 drivers/tty/ipwireless/main.c                 |  8 -----
 drivers/tty/serial/atmel_serial.c             |  4 ---
 drivers/tty/serial/max310x.c                  |  4 +--
 drivers/tty/serial/mvebu-uart.c               |  3 --
 drivers/tty/serial/mxs-auart.c                |  4 ---
 drivers/usb/dwc3/dwc3-pci.c                   |  4 +--
 drivers/usb/gadget/udc/m66592-udc.c           |  2 +-
 drivers/usb/host/u132-hcd.c                   |  2 --
 drivers/usb/storage/sierra_ms.c               |  4 ++-
 drivers/vfio/mdev/mdev_sysfs.c                |  2 +-
 drivers/video/fbdev/hgafb.c                   |  2 --
 drivers/video/fbdev/imsttfb.c                 |  5 ---
 drivers/video/fbdev/omap2/omapfb/dss/dispc.c  |  7 ++---
 drivers/video/fbdev/omap2/omapfb/dss/dsi.c    |  7 ++---
 drivers/video/fbdev/omap2/omapfb/dss/dss.c    |  7 ++---
 drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c  |  5 ++-
 drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c  |  5 ++-
 .../omap2/omapfb/dss/omapdss-boot-init.c      |  2 --
 drivers/video/fbdev/omap2/omapfb/dss/venc.c   |  7 ++---
 drivers/virt/vboxguest/vboxguest_linux.c      |  4 +--
 drivers/xen/grant-table.c                     |  4 +++
 fs/ecryptfs/crypto.c                          |  6 ++--
 fs/nfsd/nfs4xdr.c                             |  2 ++
 fs/ocfs2/dlm/dlmmaster.c                      |  2 ++
 fs/udf/namei.c                                | 15 +++++++++
 kernel/auditfilter.c                          | 12 +++----
 kernel/bpf/core.c                             |  2 ++
 kernel/trace/trace.c                          |  5 +--
 lib/test_objagg.c                             |  4 +--
 net/atm/clip.c                                |  6 ++--
 net/core/net_namespace.c                      |  3 +-
 net/ethtool/ioctl.c                           |  8 -----
 net/ipv6/netfilter/ip6t_srh.c                 |  6 ----
 net/ipv6/route.c                              |  6 +---
 net/mac80211/util.c                           |  1 +
 net/openvswitch/datapath.c                    |  4 ---
 net/rds/message.c                             |  1 -
 net/rds/send.c                                |  2 +-
 net/rfkill/core.c                             |  7 ++---
 net/rxrpc/rxkad.c                             |  2 +-
 net/smc/smc_ism.c                             |  5 ---
 net/socket.c                                  | 11 ++-----
 net/strparser/strparser.c                     |  2 --
 net/tipc/group.c                              |  3 --
 sound/core/control_compat.c                   |  3 +-
 sound/isa/gus/gus_main.c                      | 13 ++------
 sound/isa/sb/sb16_main.c                      | 10 ++----
 sound/isa/sb/sb8.c                            |  4 ---
 sound/soc/codecs/cs43130.c                    |  2 --
 sound/soc/codecs/rt5645.c                     |  3 --
 sound/soc/img/img-i2s-in.c                    |  5 +--
 sound/soc/img/img-parallel-out.c              |  4 +--
 sound/soc/rockchip/rockchip_pdm.c             |  4 +--
 sound/soc/tegra/tegra30_ahub.c                |  4 +--
 sound/soc/tegra/tegra30_i2s.c                 |  4 +--
 sound/usb/usx2y/usb_stream.c                  |  5 ---
 sound/usb/usx2y/usbusx2y.c                    |  4 ++-
 204 files changed, 306 insertions(+), 826 deletions(-)
Signature · 1 line
2.31.1
author maintainer
#1 lore raw

PATCH 1/190 Revert "net/rds: Avoid potential use after free in rds_send_remove_from_sock"

This reverts commit 0c85a7e87465f2d4cbc768e245f4f45b2f299b05.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc David S. Miller <[email protected]>
---
 net/rds/message.c | 1 -
 net/rds/send.c    | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
net/rds/message.c +0 -1
index 4fc66ff0f1ec..799034e0f513 100644
@@ -180,7 +180,6 @@ void rds_message_put(struct rds_message *rm)
 		rds_message_purge(rm);
 
 		kfree(rm);
-		rm = NULL;
 	}
 }
 EXPORT_SYMBOL_GPL(rds_message_put);
net/rds/send.c +1 -1
index fe5264b9d4b3..985d0b7713ac 100644
@@ -665,7 +665,7 @@ static void rds_send_remove_from_sock(struct list_head *messages, int status)
 unlock_and_drop:
 		spin_unlock_irqrestore(&rm->m_rs_lock, flags);
 		rds_message_put(rm);
-		if (was_on_sock && rm)
+		if (was_on_sock)
 			rds_message_put(rm);
 	}
 
Signature · 1 line
2.31.1
author maintainer
#2 lore raw

Re: [PATCH 001/190] Revert "net/rds: Avoid potential use after free in rds_send_remove_from_sock"

Quoted 53 lines · Greg Kroah-Hartman

This reverts commit 0c85a7e87465f2d4cbc768e245f4f45b2f299b05.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc David S. Miller <[email protected]>
---
 net/rds/message.c | 1 -
 net/rds/send.c    | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
net/rds/message.c +0 -1
index 4fc66ff0f1ec..799034e0f513 100644
@@ -180,7 +180,6 @@ void rds_message_put(struct rds_message *rm)
 		rds_message_purge(rm);
 
 		kfree(rm);
-		rm = NULL;
 	}
 }
 EXPORT_SYMBOL_GPL(rds_message_put);
net/rds/send.c +1 -1
index fe5264b9d4b3..985d0b7713ac 100644
@@ -665,7 +665,7 @@ static void rds_send_remove_from_sock(struct list_head *messages, int status)
 unlock_and_drop:
 		spin_unlock_irqrestore(&rm->m_rs_lock, flags);
 		rds_message_put(rm);
-		if (was_on_sock && rm)
+		if (was_on_sock)
 			rds_message_put(rm);
 	}
 
Signature · 1 line
2.31.1

The original, while again messy, looks ok, so I'll drop this revert.

greg k-h

author maintainer
#3 lore raw

Re: [PATCH 001/190] Revert "net/rds: Avoid potential use after free in rds_send_remove_from_sock"

Quoted 51 lines · Greg Kroah-Hartman
Quoted 50 lines · Greg Kroah-Hartman

This reverts commit 0c85a7e87465f2d4cbc768e245f4f45b2f299b05.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc David S. Miller <[email protected]>
---
 net/rds/message.c | 1 -
 net/rds/send.c    | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
net/rds/message.c +0 -1
index 4fc66ff0f1ec..799034e0f513 100644
@@ -180,7 +180,6 @@ void rds_message_put(struct rds_message *rm)
 		rds_message_purge(rm);
 
 		kfree(rm);
-		rm = NULL;
 	}
 }
 EXPORT_SYMBOL_GPL(rds_message_put);
net/rds/send.c +1 -1
index fe5264b9d4b3..985d0b7713ac 100644
@@ -665,7 +665,7 @@ static void rds_send_remove_from_sock(struct list_head *messages, int status)
 unlock_and_drop:
 		spin_unlock_irqrestore(&rm->m_rs_lock, flags);
 		rds_message_put(rm);
-		if (was_on_sock && rm)
+		if (was_on_sock)
 			rds_message_put(rm);
 	}
 
Quoted 7 lines
Quoted 3 lines
Signature · 1 line
2.31.1

The original, while again messy, looks ok, so I'll drop this revert.

greg k-h

Argh, no, this one has already been reverted in Linus's tree. I've been reviewing to many of these today, I think it's time to get some rest...

greg k-h

#4 lore raw

Re: [PATCH 001/190] Revert "net/rds: Avoid potential use after free in rds_send_remove_from_sock"

Hi!

Quoted 6 lines
Quoted 3 lines

The original, while again messy, looks ok, so I'll drop this revert.

greg k-h

Argh, no, this one has already been reverted in Linus's tree. I've been reviewing to many of these today, I think it's time to get some rest...

This one is important, it is the one that triggered it AFAICT. And this one is _bad_, so should be reverted.

But I see no proof of malice.
Pavel

Signature · 1 line
http://www.livejournal.com/~pavelmachek
author maintainer
#5 lore raw

PATCH 2/190 Revert "media: st-delta: Fix reference count leak in delta_run_work"

In reply to Greg Kroah-Hartman

This reverts commit 57cc666d36adc7b45e37ba4cd7bc4e44ec4c43d7.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/sti/delta/delta-v4l2.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/platform/sti/delta/delta-v4l2.c +1 -3
index c691b3d81549..2503224eeee5 100644
@@ -954,10 +954,8 @@ static void delta_run_work(struct work_struct *work)
 	/* enable the hardware */
 	if (!dec->pm) {
 		ret = delta_get_sync(ctx);
-		if (ret) {
-			delta_put_autosuspend(ctx);
+		if (ret)
 			goto err;
-		}
 	}
 
 	/* decode this access unit */
Signature · 1 line
2.31.1
#6 lore raw

Re: [PATCH 002/190] Revert "media: st-delta: Fix reference count leak in delta_run_work"

Hi Greg,

I re-reviewed all the patches in this series where I was CCed.

These are all good and fix real bugs and should be re-reverted:

[PATCH 002/190] Revert "media: st-delta: Fix reference count leak in delta_run_work" [PATCH 003/190] Revert "media: sti: Fix reference count leaks"
[PATCH 004/190] Revert "media: exynos4-is: Fix several reference count leaks due to pm_runtime_get_sync" [PATCH 005/190] Revert "media: exynos4-is: Fix a reference count leak due to pm_runtime_get_sync" [PATCH 006/190] Revert "media: exynos4-is: Fix a reference count leak"
[PATCH 008/190] Revert "media: stm32-dcmi: Fix a reference count leak"
[PATCH 009/190] Revert "media: s5p-mfc: Fix a reference count leak"
[PATCH 010/190] Revert "media: camss: Fix a reference count leak."
[PATCH 011/190] Revert "media: platform: fcp: Fix a reference count leak."
[PATCH 012/190] Revert "media: rockchip/rga: Fix a reference count leak."
[PATCH 013/190] Revert "media: rcar-vin: Fix a reference count leak."
[PATCH 014/190] Revert "media: rcar-vin: Fix a reference count leak."
[PATCH 052/190] Revert "media: media/saa7146: fix incorrect assertion in saa7146_buffer_finish" [PATCH 056/190] Revert "media: davinci/vpfe_capture.c: Avoid BUG_ON for register failure" [PATCH 057/190] Revert "media: saa7146: Avoid using BUG_ON as an assertion"
[PATCH 058/190] Revert "media: cx231xx: replace BUG_ON with recovery code"
[PATCH 102/190] Revert "media: video-mux: fix null pointer dereferences"
[PATCH 183/190] Revert "media: isif: fix a NULL pointer dereference bug"

This one can be dropped since it actually contains a bug, I'm fairly certain that was unintentional:

[PATCH 007/190] Revert "media: ti-vpe: Fix a missing check and reference count leak"

I'll reply to that one separately.

This one can be dropped since it is not necessary:

[PATCH 073/190] Revert "media: rcar_drif: fix a memory disclosure"

The V4L2 core already zeroes this. Other drivers that use fmt.sdr also memset this, but that should be dropped in those drivers as well. I'll make a patch for that.

Regards,

Hans

Quoted 41 lines · Greg Kroah-Hartman

This reverts commit 57cc666d36adc7b45e37ba4cd7bc4e44ec4c43d7.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/sti/delta/delta-v4l2.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/platform/sti/delta/delta-v4l2.c +1 -3
index c691b3d81549..2503224eeee5 100644
@@ -954,10 +954,8 @@ static void delta_run_work(struct work_struct *work)
 	/* enable the hardware */
 	if (!dec->pm) {
 		ret = delta_get_sync(ctx);
-		if (ret) {
-			delta_put_autosuspend(ctx);
+		if (ret)
 			goto err;
-		}
 	}
 
 	/* decode this access unit */
author maintainer
#7 lore raw

Re: [PATCH 002/190] Revert "media: st-delta: Fix reference count leak in delta_run_work"

Quoted 32 lines · Hans Verkuil

Hi Greg,

I re-reviewed all the patches in this series where I was CCed.

These are all good and fix real bugs and should be re-reverted:

[PATCH 002/190] Revert "media: st-delta: Fix reference count leak in delta_run_work" [PATCH 003/190] Revert "media: sti: Fix reference count leaks"
[PATCH 004/190] Revert "media: exynos4-is: Fix several reference count leaks due to pm_runtime_get_sync" [PATCH 005/190] Revert "media: exynos4-is: Fix a reference count leak due to pm_runtime_get_sync" [PATCH 006/190] Revert "media: exynos4-is: Fix a reference count leak"
[PATCH 008/190] Revert "media: stm32-dcmi: Fix a reference count leak"
[PATCH 009/190] Revert "media: s5p-mfc: Fix a reference count leak"
[PATCH 010/190] Revert "media: camss: Fix a reference count leak."
[PATCH 011/190] Revert "media: platform: fcp: Fix a reference count leak."
[PATCH 012/190] Revert "media: rockchip/rga: Fix a reference count leak."
[PATCH 013/190] Revert "media: rcar-vin: Fix a reference count leak."
[PATCH 014/190] Revert "media: rcar-vin: Fix a reference count leak."
[PATCH 052/190] Revert "media: media/saa7146: fix incorrect assertion in saa7146_buffer_finish" [PATCH 056/190] Revert "media: davinci/vpfe_capture.c: Avoid BUG_ON for register failure" [PATCH 057/190] Revert "media: saa7146: Avoid using BUG_ON as an assertion"
[PATCH 058/190] Revert "media: cx231xx: replace BUG_ON with recovery code"
[PATCH 102/190] Revert "media: video-mux: fix null pointer dereferences"
[PATCH 183/190] Revert "media: isif: fix a NULL pointer dereference bug"

This one can be dropped since it actually contains a bug, I'm fairly certain that was unintentional:

[PATCH 007/190] Revert "media: ti-vpe: Fix a missing check and reference count leak"

I'll reply to that one separately.

Quoted 7 lines

This one can be dropped since it is not necessary:

[PATCH 073/190] Revert "media: rcar_drif: fix a memory disclosure"

The V4L2 core already zeroes this. Other drivers that use fmt.sdr also memset this, but that should be dropped in those drivers as well. I'll make a patch for that.

Wonderful, many thanks for doing this review, I'll be dropping these from the series.

greg k-h

#8 lore raw

Re: [PATCH 002/190] Revert "media: st-delta: Fix reference count leak in delta_run_work"

Hi Greg,

Quoted 18 lines · Greg Kroah-Hartman
Quoted 17 lines · Hans Verkuil

Hi Greg,

I re-reviewed all the patches in this series where I was CCed.

These are all good and fix real bugs and should be re-reverted:

[PATCH 002/190] Revert "media: st-delta: Fix reference count leak in delta_run_work" [PATCH 003/190] Revert "media: sti: Fix reference count leaks"
[PATCH 004/190] Revert "media: exynos4-is: Fix several reference count leaks due to pm_runtime_get_sync" [PATCH 005/190] Revert "media: exynos4-is: Fix a reference count leak due to pm_runtime_get_sync" [PATCH 006/190] Revert "media: exynos4-is: Fix a reference count leak"
[PATCH 008/190] Revert "media: stm32-dcmi: Fix a reference count leak"
[PATCH 009/190] Revert "media: s5p-mfc: Fix a reference count leak"
[PATCH 010/190] Revert "media: camss: Fix a reference count leak."
[PATCH 011/190] Revert "media: platform: fcp: Fix a reference count leak."
[PATCH 012/190] Revert "media: rockchip/rga: Fix a reference count leak."
[PATCH 013/190] Revert "media: rcar-vin: Fix a reference count leak."

Quoted 8 lines
Quoted 8 lines

[PATCH 014/190] Revert "media: rcar-vin: Fix a reference count leak."
[PATCH 052/190] Revert "media: media/saa7146: fix incorrect assertion in saa7146_buffer_finish" [PATCH 056/190] Revert "media: davinci/vpfe_capture.c: Avoid BUG_ON for register failure" [PATCH 057/190] Revert "media: saa7146: Avoid using BUG_ON as an assertion" [PATCH 058/190] Revert "media: cx231xx: replace BUG_ON with recovery code" [PATCH 102/190] Revert "media: video-mux: fix null pointer dereferences"
[PATCH 183/190] Revert "media: isif: fix a NULL pointer dereference bug"

Just to clarify and avoid ambiguities:

Quoted 1 line
Quoted 1 line

This one can be dropped since it actually contains a bug, I'm fairly certain

with 'This can be dropped' I meant: this can remain reverted.

Quoted 7 lines
Quoted 7 lines

that was unintentional:

[PATCH 007/190] Revert "media: ti-vpe: Fix a missing check and reference count leak"

I'll reply to that one separately.

This one can be dropped since it is not necessary:

Ditto.

You probably understood what I meant, but I realized it was not very clear.

Regards,

Hans

Quoted 12 lines
Quoted 6 lines

[PATCH 073/190] Revert "media: rcar_drif: fix a memory disclosure"

The V4L2 core already zeroes this. Other drivers that use fmt.sdr also memset this, but that should be dropped in those drivers as well. I'll make a patch for that.

Wonderful, many thanks for doing this review, I'll be dropping these from the series.

greg k-h

author maintainer
#9 lore raw

PATCH 3/190 Revert "media: sti: Fix reference count leaks"

In reply to Greg Kroah-Hartman

This reverts commit 6f4432bae9f2d12fc1815b5e26cc07e69bcad0df.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/sti/hva/hva-hw.c | 2 --
 1 file changed, 2 deletions(-)
drivers/media/platform/sti/hva/hva-hw.c +0 -2
index f59811e27f51..d0d45dc5f32f 100644
@@ -272,7 +272,6 @@ static unsigned long int hva_hw_get_ip_version(struct hva_dev *hva)
 
 	if (pm_runtime_get_sync(dev) < 0) {
 		dev_err(dev, "%s     failed to get pm_runtime\n", HVA_PREFIX);
-		pm_runtime_put_noidle(dev);
 		mutex_unlock(&hva->protect_mutex);
 		return -EFAULT;
 	}
@@ -555,7 +554,6 @@ void hva_hw_dump_regs(struct hva_dev *hva, struct seq_file *s)
 
 	if (pm_runtime_get_sync(dev) < 0) {
 		seq_puts(s, "Cannot wake up IP\n");
-		pm_runtime_put_noidle(dev);
 		mutex_unlock(&hva->protect_mutex);
 		return;
 	}
Signature · 1 line
2.31.1
#10 lore raw

Re: [PATCH 003/190] Revert "media: sti: Fix reference count leaks"

Quoted 10 lines · Greg Kroah-Hartman

This reverts commit 6f4432bae9f2d12fc1815b5e26cc07e69bcad0df.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Quoted 5 lines

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

NAK. This fixes minor bug and should not be reverted.
Pavel

Quoted 16 lines
drivers/media/platform/sti/hva/hva-hw.c +0 -2
@@ -272,7 +272,6 @@ static unsigned long int hva_hw_get_ip_version(struct hva_dev *hva)
 
 	if (pm_runtime_get_sync(dev) < 0) {
 		dev_err(dev, "%s     failed to get pm_runtime\n", HVA_PREFIX);
-		pm_runtime_put_noidle(dev);
 		mutex_unlock(&hva->protect_mutex);
 		return -EFAULT;
 	}
@@ -555,7 +554,6 @@ void hva_hw_dump_regs(struct hva_dev *hva, struct seq_file *s)
 
 	if (pm_runtime_get_sync(dev) < 0) {
 		seq_puts(s, "Cannot wake up IP\n");
-		pm_runtime_put_noidle(dev);
 		mutex_unlock(&hva->protect_mutex);
 		return;
 	}
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author maintainer
#11 lore raw

PATCH 4/190 Revert "media: exynos4-is: Fix several reference count leaks due to pm_runtime_get_sync"

In reply to Greg Kroah-Hartman

This reverts commit 7ef64ceea0008c17e94a8a2c60c5d6d46f481996.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/exynos4-is/fimc-isp.c  | 4 +---
 drivers/media/platform/exynos4-is/fimc-lite.c | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/media/platform/exynos4-is/fimc-isp.c +1 -3
index a77c49b18511..cde0d254ec1c 100644
@@ -305,10 +305,8 @@ static int fimc_isp_subdev_s_power(struct v4l2_subdev *sd, int on)
 
 	if (on) {
 		ret = pm_runtime_get_sync(&is->pdev->dev);
-		if (ret < 0) {
-			pm_runtime_put(&is->pdev->dev);
+		if (ret < 0)
 			return ret;
-		}
 		set_bit(IS_ST_PWR_ON, &is->state);
 
 		ret = fimc_is_start_firmware(is);
drivers/media/platform/exynos4-is/fimc-lite.c +1 -1
index fe20af3a7178..1576f273761b 100644
@@ -471,7 +471,7 @@ static int fimc_lite_open(struct file *file)
 	set_bit(ST_FLITE_IN_USE, &fimc->state);
 	ret = pm_runtime_get_sync(&fimc->pdev->dev);
 	if (ret < 0)
-		goto err_pm;
+		goto unlock;
 
 	ret = v4l2_fh_open(file);
 	if (ret < 0)
Signature · 1 line
2.31.1
#12 lore raw

Re: [PATCH 004/190] Revert "media: exynos4-is: Fix several reference count leaks due to pm_runtime_get_sync"

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 7ef64ceea0008c17e94a8a2c60c5d6d46f481996.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 9 lines
Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/exynos4-is/fimc-isp.c  | 4 +---
 drivers/media/platform/exynos4-is/fimc-lite.c | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

This looks like a good commit but should be done now in a different way
- using pm_runtime_resume_and_get(). Therefore I am fine with revert and I can submit later better fix.

Best regards,
Krzysztof

author maintainer
#13 lore raw

PATCH 5/190 Revert "media: exynos4-is: Fix a reference count leak due to pm_runtime_get_sync"

In reply to Greg Kroah-Hartman

This reverts commit c47f7c779ef0458a58583f00c9ed71b7f5a4d0a2.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/exynos4-is/media-dev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/platform/exynos4-is/media-dev.c +1 -3
index 8e1e892085ec..5e62ea06b4fa 100644
@@ -511,10 +511,8 @@ static int fimc_md_register_sensor_entities(struct fimc_md *fmd)
 		return -ENXIO;
 
 	ret = pm_runtime_get_sync(fmd->pmf);
-	if (ret < 0) {
-		pm_runtime_put(fmd->pmf);
+	if (ret < 0)
 		return ret;
-	}
 
 	fmd->num_sensors = 0;
 
Signature · 1 line
2.31.1
#14 lore raw

Re: [PATCH 005/190] Revert "media: exynos4-is: Fix a reference count leak due to pm_runtime_get_sync"

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit c47f7c779ef0458a58583f00c9ed71b7f5a4d0a2.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 8 lines
Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/exynos4-is/media-dev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

This looks like a good commit but should be done now in a different way
- using pm_runtime_resume_and_get(). Therefore I am fine with revert and I can submit later better fix.

Best regards,
Krzysztof

Best regards,
Krzysztof

author maintainer
#15 lore raw

PATCH 6/190 Revert "media: exynos4-is: Fix a reference count leak"

In reply to Greg Kroah-Hartman

This reverts commit 64157b2cb1940449e7df2670e85781c690266588.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/exynos4-is/mipi-csis.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/platform/exynos4-is/mipi-csis.c +1 -3
index 1aac167abb17..540151bbf58f 100644
@@ -510,10 +510,8 @@ static int s5pcsis_s_stream(struct v4l2_subdev *sd, int enable)
 	if (enable) {
 		s5pcsis_clear_counters(state);
 		ret = pm_runtime_get_sync(&state->pdev->dev);
-		if (ret && ret != 1) {
-			pm_runtime_put_noidle(&state->pdev->dev);
+		if (ret && ret != 1)
 			return ret;
-		}
 	}
 
 	mutex_lock(&state->lock);
Signature · 1 line
2.31.1
#16 lore raw

Re: [PATCH 006/190] Revert "media: exynos4-is: Fix a reference count leak"

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 64157b2cb1940449e7df2670e85781c690266588.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 7 lines
Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/exynos4-is/mipi-csis.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

This looks like a good commit but should be done now in a different way
- using pm_runtime_resume_and_get(). Therefore I am fine with revert and I can submit later better fix.

Best regards,
Krzysztof

Best regards,
Krzysztof

author maintainer
#17 lore raw

Re: [PATCH 006/190] Revert "media: exynos4-is: Fix a reference count leak"

Quoted 26 lines · Krzysztof Kozlowski
Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 64157b2cb1940449e7df2670e85781c690266588.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 7 lines
Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/exynos4-is/mipi-csis.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Quoted 3 lines

This looks like a good commit but should be done now in a different way
- using pm_runtime_resume_and_get(). Therefore I am fine with revert and I can submit later better fix.

Thanks for the review, I'll drop all 3 exynos4-is patches from this series.

greg k-h

author maintainer
#18 lore raw

PATCH 7/190 Revert "media: ti-vpe: Fix a missing check and reference count leak"

In reply to Greg Kroah-Hartman

This reverts commit 7dae2aaaf432767ca7aa11fa84643a7c2600dbdd.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/ti-vpe/vpe.c | 2 --
 1 file changed, 2 deletions(-)
drivers/media/platform/ti-vpe/vpe.c +0 -2
index 10251b787674..c7a0a7c19ca6 100644
@@ -2473,8 +2473,6 @@ static int vpe_runtime_get(struct platform_device *pdev)
 
 	r = pm_runtime_get_sync(&pdev->dev);
 	WARN_ON(r < 0);
-	if (r)
-		pm_runtime_put_noidle(&pdev->dev);
 	return r < 0 ? r : 0;
 }
 
Signature · 1 line
2.31.1
#19 lore raw

Re: [PATCH 007/190] Revert "media: ti-vpe: Fix a missing check and reference count leak"

Quoted 29 lines · Greg Kroah-Hartman

This reverts commit 7dae2aaaf432767ca7aa11fa84643a7c2600dbdd.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/ti-vpe/vpe.c | 2 --
 1 file changed, 2 deletions(-)
drivers/media/platform/ti-vpe/vpe.c +0 -0
index 10251b787674..c7a0a7c19ca6 100644

drivers/media/platform/ti-vpe/vpe.c static int vpe_runtime_get(struct platform_device *pdev) · line 2476

Quoted 4 lines
drivers/media/platform/ti-vpe/vpe.c +0 -1
@@ -2473,8 +2473,6 @@ static int vpe_runtime_get(struct platform_device *pdev)
 
 	r = pm_runtime_get_sync(&pdev->dev);
 	WARN_ON(r < 0);
-	if (r)

This should have been: if (r < 0)

I missed that as a reviewer, and I don't think it was intentional either since I couldn't find any clear documentation in pm_runtime_get_sync() that it can return 0 or 1 as success. After going through a few wrapper functions you end up in rpm_resume() in drivers/base/power/runtime.c which doesn't document the return code.

So keep this reverted and I'll make a new patch for this later.

I've CC-ed Rafael and Pavel: it would be really nice if someone can document the return code from rpm_resume() in drivers/base/power/runtime.c.

I just discovered that it is documented in Documentation/power/runtime_pm.rst, but if you just look at the code then you'll miss this.

Regards,

Hans

Quoted 5 lines
drivers/media/platform/ti-vpe/vpe.c +0 -1
-		pm_runtime_put_noidle(&pdev->dev);
 	return r < 0 ? r : 0;
 }
 
author maintainer
#20 lore raw

Re: [PATCH 007/190] Revert "media: ti-vpe: Fix a missing check and reference count leak"

Quoted 43 lines · Hans Verkuil
Quoted 29 lines · Greg Kroah-Hartman

This reverts commit 7dae2aaaf432767ca7aa11fa84643a7c2600dbdd.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/ti-vpe/vpe.c | 2 --
 1 file changed, 2 deletions(-)
drivers/media/platform/ti-vpe/vpe.c +0 -0
index 10251b787674..c7a0a7c19ca6 100644

drivers/media/platform/ti-vpe/vpe.c static int vpe_runtime_get(struct platform_device *pdev) · line 2476

Quoted 4 lines
drivers/media/platform/ti-vpe/vpe.c +0 -1
@@ -2473,8 +2473,6 @@ static int vpe_runtime_get(struct platform_device *pdev)
 
 	r = pm_runtime_get_sync(&pdev->dev);
 	WARN_ON(r < 0);
-	if (r)

This should have been: if (r < 0)

I missed that as a reviewer, and I don't think it was intentional either since I couldn't find any clear documentation in pm_runtime_get_sync() that it can return 0 or 1 as success. After going through a few wrapper functions you end up in rpm_resume() in drivers/base/power/runtime.c which doesn't document the return code.

Quoted 7 lines

So keep this reverted and I'll make a new patch for this later.

I've CC-ed Rafael and Pavel: it would be really nice if someone can document the return code from rpm_resume() in drivers/base/power/runtime.c.

I just discovered that it is documented in Documentation/power/runtime_pm.rst, but if you just look at the code then you'll miss this.

Mauro asked for me to drop this one, as he's fixing them all up in a "better" way with a follow-on patch series.

thanks,

greg k-h

author maintainer
#21 lore raw

PATCH 8/190 Revert "media: stm32-dcmi: Fix a reference count leak"

In reply to Greg Kroah-Hartman

This reverts commit 88f50a05f907d96a27a9ce3cc9e8cbb91a6f0f22.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/stm32/stm32-dcmi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/media/platform/stm32/stm32-dcmi.c +3 -1
index d9b4ad0abf0c..37a10885d79b 100644
@@ -727,7 +727,7 @@ static int dcmi_start_streaming(struct vb2_queue *vq, unsigned int count)
 	if (ret < 0) {
 		dev_err(dcmi->dev, "%s: Failed to start streaming, cannot get sync (%d)\n",
 			__func__, ret);
-		goto err_pm_put;
+		goto err_release_buffers;
 	}
 
 	ret = media_pipeline_start(&dcmi->vdev->entity, &dcmi->pipeline);
@@ -848,6 +848,8 @@ static int dcmi_start_streaming(struct vb2_queue *vq, unsigned int count)
 
 err_pm_put:
 	pm_runtime_put(dcmi->dev);
+
+err_release_buffers:
 	spin_lock_irq(&dcmi->irqlock);
 	/*
 	 * Return all buffers to vb2 in QUEUED state.
Signature · 1 line
2.31.1
author maintainer
#22 lore raw

PATCH 9/190 Revert "media: s5p-mfc: Fix a reference count leak"

In reply to Greg Kroah-Hartman

This reverts commit 78741ce98c2e36188e2343434406b0e0bc50b0e7.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/platform/s5p-mfc/s5p_mfc_pm.c +1 -3
index 62d2320a7218..7d52431c2c83 100644
@@ -79,10 +79,8 @@ int s5p_mfc_power_on(void)
 	int i, ret = 0;
 
 	ret = pm_runtime_get_sync(pm->device);
-	if (ret < 0) {
-		pm_runtime_put_noidle(pm->device);
+	if (ret < 0)
 		return ret;
-	}
 
 	/* clock control */
 	for (i = 0; i < pm->num_clocks; i++) {
Signature · 1 line
2.31.1
#23 lore raw

Re: [PATCH 009/190] Revert "media: s5p-mfc: Fix a reference count leak"

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 78741ce98c2e36188e2343434406b0e0bc50b0e7.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 8 lines
Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

This looks like a good commit but should be done now in a different way
- using pm_runtime_resume_and_get(). Therefore I am fine with revert and I can submit later better fix.

Best regards,
Krzysztof

Best regards,
Krzysztof

author maintainer
#24 lore raw

Re: [PATCH 009/190] Revert "media: s5p-mfc: Fix a reference count leak"

Quoted 26 lines · Krzysztof Kozlowski
Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 78741ce98c2e36188e2343434406b0e0bc50b0e7.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 8 lines
Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Quoted 3 lines

This looks like a good commit but should be done now in a different way
- using pm_runtime_resume_and_get(). Therefore I am fine with revert and I can submit later better fix.

Great, thanks for letting me know, I can have someone work on the "better fix" at the same time.

greg k-h

#25 lore raw

Re: [PATCH 009/190] Revert "media: s5p-mfc: Fix a reference count leak"

Em Fri, 23 Apr 2021 09:10:32 +0200
Greg Kroah-Hartman <[email protected]> escreveu:

Quoted 27 lines · Krzysztof Kozlowski
Quoted 26 lines · Greg Kroah-Hartman
Quoted 24 lines

This reverts commit 78741ce98c2e36188e2343434406b0e0bc50b0e7.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Quoted 6 lines
Quoted 3 lines

This looks like a good commit but should be done now in a different way
- using pm_runtime_resume_and_get(). Therefore I am fine with revert and I can submit later better fix.

Great, thanks for letting me know, I can have someone work on the "better fix" at the same time.

IMO, it is better to keep the fix. I mean, there's no reason to revert a fix that it is known to be good.

The "better fix" patch can be produced anytime. A simple coccinelle ruleset can replace patterns like:

	ret = pm_runtime_get_sync(pm->device);
	if (ret < 0) {
		pm_runtime_put_noidle(pm->device);
		return ret;
	}

and the broken pattern:

	ret = pm_runtime_get_sync(pm->device);
	if (ret < 0)
		return ret;

to:

	ret = pm_runtime_resume_and_get(pm->device);
	if (ret < 0)
		return ret;

Regards,
Mauro

#26 lore raw

Re: [PATCH 009/190] Revert "media: s5p-mfc: Fix a reference count leak"

Quoted 55 lines · Mauro Carvalho Chehab

Em Fri, 23 Apr 2021 09:10:32 +0200
Greg Kroah-Hartman <[email protected]> escreveu:

Quoted 27 lines · Krzysztof Kozlowski
Quoted 26 lines · Greg Kroah-Hartman
Quoted 24 lines

This reverts commit 78741ce98c2e36188e2343434406b0e0bc50b0e7.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Quoted 6 lines
Quoted 3 lines

This looks like a good commit but should be done now in a different way
- using pm_runtime_resume_and_get(). Therefore I am fine with revert and I can submit later better fix.

Great, thanks for letting me know, I can have someone work on the "better fix" at the same time.

IMO, it is better to keep the fix. I mean, there's no reason to revert a fix that it is known to be good.

The "better fix" patch can be produced anytime. A simple coccinelle ruleset can replace patterns like:

	ret = pm_runtime_get_sync(pm->device);
	if (ret < 0) {
		pm_runtime_put_noidle(pm->device);
		return ret;
	}

and the broken pattern:

	ret = pm_runtime_get_sync(pm->device);
	if (ret < 0)
		return ret;
Quoted 5 lines

to:

	ret = pm_runtime_resume_and_get(pm->device);
	if (ret < 0)
		return ret;

That's my preference as well.

Hans

Quoted 4 lines

Regards,
Mauro

#27 lore raw

Re: [PATCH 009/190] Revert "media: s5p-mfc: Fix a reference count leak"

Quoted 56 lines · Hans Verkuil
Quoted 55 lines · Mauro Carvalho Chehab

Em Fri, 23 Apr 2021 09:10:32 +0200
Greg Kroah-Hartman <[email protected]> escreveu:

Quoted 27 lines · Krzysztof Kozlowski
Quoted 26 lines · Greg Kroah-Hartman
Quoted 24 lines

This reverts commit 78741ce98c2e36188e2343434406b0e0bc50b0e7.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Quoted 6 lines
Quoted 3 lines

This looks like a good commit but should be done now in a different way
- using pm_runtime_resume_and_get(). Therefore I am fine with revert and I can submit later better fix.

Great, thanks for letting me know, I can have someone work on the "better fix" at the same time.

IMO, it is better to keep the fix. I mean, there's no reason to revert a fix that it is known to be good.

The "better fix" patch can be produced anytime. A simple coccinelle ruleset can replace patterns like:

	ret = pm_runtime_get_sync(pm->device);
	if (ret < 0) {
		pm_runtime_put_noidle(pm->device);
		return ret;
	}

and the broken pattern:

	ret = pm_runtime_get_sync(pm->device);
	if (ret < 0)
		return ret;
Quoted 7 lines
Quoted 5 lines

to:

	ret = pm_runtime_resume_and_get(pm->device);
	if (ret < 0)
		return ret;

That's my preference as well.

It won't be that easy because sometimes the error handling is via goto (like in other patches here) but anyway I don't mind keeping the original commits.

Best regards,
Krzysztof

#28 lore raw

Re: [PATCH 009/190] Revert "media: s5p-mfc: Fix a reference count leak"

Quoted 63 lines · Krzysztof Kozlowski
Quoted 62 lines · Hans Verkuil
Quoted 60 lines · Mauro Carvalho Chehab

Em Fri, 23 Apr 2021 09:10:32 +0200
Greg Kroah-Hartman <[email protected]> escreveu:

Quoted 27 lines · Krzysztof Kozlowski
Quoted 26 lines · Greg Kroah-Hartman
Quoted 24 lines

This reverts commit 78741ce98c2e36188e2343434406b0e0bc50b0e7.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Quoted 6 lines
Quoted 3 lines

This looks like a good commit but should be done now in a different way
- using pm_runtime_resume_and_get(). Therefore I am fine with revert and I can submit later better fix.

Great, thanks for letting me know, I can have someone work on the "better fix" at the same time.

IMO, it is better to keep the fix. I mean, there's no reason to revert a fix that it is known to be good.

The "better fix" patch can be produced anytime. A simple coccinelle ruleset can replace patterns like:

	ret = pm_runtime_get_sync(pm->device);
	if (ret < 0) {
		pm_runtime_put_noidle(pm->device);
		return ret;
	}

and the broken pattern:

	ret = pm_runtime_get_sync(pm->device);
	if (ret < 0)
		return ret;

to:

	ret = pm_runtime_resume_and_get(pm->device);
	if (ret < 0)
		return ret;
Quoted 5 lines
Quoted 1 line

That's my preference as well.

It won't be that easy because sometimes the error handling is via goto (like in other patches here) but anyway I don't mind keeping the original commits.

I tried the following semantic patch:

@@
expression ret,e;
@@

- ret = pm_runtime_get_sync(e);

+     ret = pm_resume_and_get(e);
      if (ret < 0) {
              ...
?-            pm_runtime_put_noidle(e);
              ...
              return ret;
      }

It has the following features:

* The ? means that if pm_runtime_put_noidle is absent, the transformation will happen anyway.

* The ... before the return means that the matching will jump over a goto.

It makes a lot of changes (in a kernel I had handy from March). This is a complicated API, however, and I don't know if there are any other issues to take into account, especially in the case where the call to pm_runtime_put_noidle is not present.

julia

#29 lore raw

Re: [PATCH 009/190] Revert "media: s5p-mfc: Fix a reference count leak"

Quoted 93 lines · Julia Lawall
Quoted 63 lines · Krzysztof Kozlowski
Quoted 62 lines · Hans Verkuil
Quoted 60 lines · Mauro Carvalho Chehab

Em Fri, 23 Apr 2021 09:10:32 +0200
Greg Kroah-Hartman <[email protected]> escreveu:

Quoted 27 lines · Krzysztof Kozlowski
Quoted 26 lines · Greg Kroah-Hartman
Quoted 24 lines

This reverts commit 78741ce98c2e36188e2343434406b0e0bc50b0e7.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Quoted 6 lines
Quoted 3 lines

This looks like a good commit but should be done now in a different way
- using pm_runtime_resume_and_get(). Therefore I am fine with revert and I can submit later better fix.

Great, thanks for letting me know, I can have someone work on the "better fix" at the same time.

IMO, it is better to keep the fix. I mean, there's no reason to revert a fix that it is known to be good.

The "better fix" patch can be produced anytime. A simple coccinelle ruleset can replace patterns like:

	ret = pm_runtime_get_sync(pm->device);
	if (ret < 0) {
		pm_runtime_put_noidle(pm->device);
		return ret;
	}

and the broken pattern:

	ret = pm_runtime_get_sync(pm->device);
	if (ret < 0)
		return ret;

to:

	ret = pm_runtime_resume_and_get(pm->device);
	if (ret < 0)
		return ret;
Quoted 5 lines
Quoted 1 line

That's my preference as well.

It won't be that easy because sometimes the error handling is via goto (like in other patches here) but anyway I don't mind keeping the original commits.

I tried the following semantic patch:

@@
expression ret,e;
@@

(quoted diff) +1 -1
-     ret = pm_runtime_get_sync(e);
+     ret = pm_resume_and_get(e);
      if (ret < 0) {
...
?-            pm_runtime_put_noidle(e);
              ...
              return ret;
      }

It has the following features:

* The ? means that if pm_runtime_put_noidle is absent, the transformation will happen anyway.

Quoted 6 lines

* The ... before the return means that the matching will jump over a goto.

It makes a lot of changes (in a kernel I had handy from March). This is a complicated API, however, and I don't know if there are any other issues to take into account, especially in the case where the call to pm_runtime_put_noidle is not present.

Thanks Julia, looks good.

Minor notice, the drivers could cleanup also with pm_runtime_put(). This would not be the best code, but still would work and should be correct (decrements runtime PM usage counter and tries to suspend the device if it is resumed/active).

Such pattern could be in entire probe like:

device_probe() {
	if (pm_runtime_get_sync())
		return -EINVAL;
	// PM runtime usage counter inbalance on errors
	...

	// suspend device
	pm_runtime_put();

	return 0;
}

I think this should still work fine with your pattern, so overall risk of errors from coccicheck is small.

Best regards,
Krzysztof

Acked-by Rafael J. Wysocki
#30 lore raw

Re: [PATCH 009/190] Revert "media: s5p-mfc: Fix a reference count leak"

In reply to Julia Lawall

(adding c/c to Rafael)

Em Fri, 23 Apr 2021 10:41:32 +0200 (CEST)
Julia Lawall <[email protected]> escreveu:

Quoted 86 lines · Krzysztof Kozlowski
Quoted 64 lines · Hans Verkuil
Quoted 62 lines · Mauro Carvalho Chehab
Quoted 60 lines

Em Fri, 23 Apr 2021 09:10:32 +0200
Greg Kroah-Hartman <[email protected]> escreveu:

Quoted 27 lines · Krzysztof Kozlowski
Quoted 26 lines · Greg Kroah-Hartman
Quoted 24 lines

This reverts commit 78741ce98c2e36188e2343434406b0e0bc50b0e7.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Quoted 6 lines
Quoted 3 lines

This looks like a good commit but should be done now in a different way
- using pm_runtime_resume_and_get(). Therefore I am fine with revert and I can submit later better fix.

Great, thanks for letting me know, I can have someone work on the "better fix" at the same time.

IMO, it is better to keep the fix. I mean, there's no reason to revert a fix that it is known to be good.

The "better fix" patch can be produced anytime. A simple coccinelle ruleset can replace patterns like:

	ret = pm_runtime_get_sync(pm->device);
	if (ret < 0) {
		pm_runtime_put_noidle(pm->device);
		return ret;
	}

and the broken pattern:

	ret = pm_runtime_get_sync(pm->device);
	if (ret < 0)
		return ret;

to:

	ret = pm_runtime_resume_and_get(pm->device);
	if (ret < 0)
		return ret;  
Quoted 5 lines
Quoted 1 line

That's my preference as well.

It won't be that easy because sometimes the error handling is via goto (like in other patches here) but anyway I don't mind keeping the original commits.

I tried the following semantic patch:

@@
expression ret,e;
@@

(quoted diff) +1 -1
-     ret = pm_runtime_get_sync(e);
+     ret = pm_resume_and_get(e);
      if (ret < 0) {
...
?-            pm_runtime_put_noidle(e);
              ...
              return ret;
      }
Quoted 8 lines

It has the following features:

* The ? means that if pm_runtime_put_noidle is absent, the transformation will happen anyway.

* The ... before the return means that the matching will jump over a goto.

It makes a lot of changes (in a kernel I had handy from March).

I would expect lots of changes, as the pm_runtime_resume_and_get() was only recently introduced on this changeset:

commit dd8088d5a8969dc2b42f71d7bc01c25c61a78066

Author: Zhang Qilong <[email protected]>
Date:   Tue Nov 10 17:29:32 2020 +0800

PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter

In many case, we need to check return value of pm_runtime_get_sync, but it brings a trouble to the usage counter processing. Many callers forget to decrease the usage counter when it failed, which could resulted in reference leak. It has been discussed a lot[0][1]. So we add a function to deal with the usage counter for better coding.

[0]https://lkml.org/lkml/2020/6/14/88 [1]https://patchwork.ozlabs.org/project/linux-tegra/list/?series=178139

Quoted 4 lines

This is a
complicated API, however, and I don't know if there are any other issues to take into account, especially in the case where the call to pm_runtime_put_noidle is not present.

I double-checked the code, despite its name, pm_runtime_put_noidle() just changes the refcount. See, the relevant code is here:

	static inline void pm_runtime_put_noidle(struct device *dev)
	{
		atomic_add_unless(&dev->power.usage_count, -1, 0);
	}

	static inline int pm_runtime_get_sync(struct device *dev)
	{
		return __pm_runtime_resume(dev, RPM_GET_PUT);
	}

	int __pm_runtime_resume(struct device *dev, int rpmflags)
	{
	        unsigned long flags;
	        int retval;

	        might_sleep_if(!(rpmflags & RPM_ASYNC) && !dev->power.irq_safe &&
	                        dev->power.runtime_status != RPM_ACTIVE);

	        if (rpmflags & RPM_GET_PUT)
	                atomic_inc(&dev->power.usage_count);

	        spin_lock_irqsave(&dev->power.lock, flags);
	        retval = rpm_resume(dev, rpmflags);
	        spin_unlock_irqrestore(&dev->power.lock, flags);

	        return retval;
	}

Not being an expert at the PM runtime API, at least on my eyes, replacing pm_runtime_get_sync() by pm_runtime_resume_and_get() seems to be the right thing to do, but Rafael should know more.

Thanks,
Mauro

#31 lore raw

Re: [PATCH 009/190] Revert "media: s5p-mfc: Fix a reference count leak"

Em Fri, 23 Apr 2021 11:42:55 +0200
Mauro Carvalho Chehab <[email protected]> escreveu:

Quoted 157 lines

(adding c/c to Rafael)

Em Fri, 23 Apr 2021 10:41:32 +0200 (CEST)
Julia Lawall <[email protected]> escreveu:

Quoted 86 lines · Krzysztof Kozlowski
Quoted 64 lines · Hans Verkuil
Quoted 62 lines · Mauro Carvalho Chehab
Quoted 60 lines

Em Fri, 23 Apr 2021 09:10:32 +0200
Greg Kroah-Hartman <[email protected]> escreveu:

Quoted 27 lines · Krzysztof Kozlowski
Quoted 26 lines · Greg Kroah-Hartman
Quoted 24 lines

This reverts commit 78741ce98c2e36188e2343434406b0e0bc50b0e7.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Quoted 6 lines
Quoted 3 lines

This looks like a good commit but should be done now in a different way
- using pm_runtime_resume_and_get(). Therefore I am fine with revert and I can submit later better fix.

Great, thanks for letting me know, I can have someone work on the "better fix" at the same time.

IMO, it is better to keep the fix. I mean, there's no reason to revert a fix that it is known to be good.

The "better fix" patch can be produced anytime. A simple coccinelle ruleset can replace patterns like:

	ret = pm_runtime_get_sync(pm->device);
	if (ret < 0) {
		pm_runtime_put_noidle(pm->device);
		return ret;
	}

and the broken pattern:

	ret = pm_runtime_get_sync(pm->device);
	if (ret < 0)
		return ret;

to:

	ret = pm_runtime_resume_and_get(pm->device);
	if (ret < 0)
		return ret;    
Quoted 5 lines
Quoted 1 line

That's my preference as well.

It won't be that easy because sometimes the error handling is via goto (like in other patches here) but anyway I don't mind keeping the original commits.

I tried the following semantic patch:

@@
expression ret,e;
@@

(quoted diff) +1 -1
-     ret = pm_runtime_get_sync(e);
+     ret = pm_resume_and_get(e);
      if (ret < 0) {
...
?-            pm_runtime_put_noidle(e);
              ...
              return ret;
      }
Quoted 8 lines

It has the following features:

* The ? means that if pm_runtime_put_noidle is absent, the transformation will happen anyway.

* The ... before the return means that the matching will jump over a goto.

It makes a lot of changes (in a kernel I had handy from March).

I would expect lots of changes, as the pm_runtime_resume_and_get() was only recently introduced on this changeset:

commit dd8088d5a8969dc2b42f71d7bc01c25c61a78066

Author: Zhang Qilong <[email protected]>
Date:   Tue Nov 10 17:29:32 2020 +0800

PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter

In many case, we need to check return value of pm_runtime_get_sync, but it brings a trouble to the usage counter processing. Many callers forget to decrease the usage counter when it failed, which could resulted in reference leak. It has been discussed a lot[0][1]. So we add a function to deal with the usage counter for better coding.

[0]https://lkml.org/lkml/2020/6/14/88 [1]https://patchwork.ozlabs.org/project/linux-tegra/list/?series=178139

Quoted 4 lines

This is a
complicated API, however, and I don't know if there are any other issues to take into account, especially in the case where the call to pm_runtime_put_noidle is not present.

I double-checked the code, despite its name, pm_runtime_put_noidle() just changes the refcount. See, the relevant code is here:

	static inline void pm_runtime_put_noidle(struct device *dev)
	{
		atomic_add_unless(&dev->power.usage_count, -1, 0);
	}

	static inline int pm_runtime_get_sync(struct device *dev)
	{
		return __pm_runtime_resume(dev, RPM_GET_PUT);
	}

	int __pm_runtime_resume(struct device *dev, int rpmflags)
	{
	        unsigned long flags;
	        int retval;

	        might_sleep_if(!(rpmflags & RPM_ASYNC) && !dev->power.irq_safe &&
	                        dev->power.runtime_status != RPM_ACTIVE);

	        if (rpmflags & RPM_GET_PUT)
	                atomic_inc(&dev->power.usage_count);

	        spin_lock_irqsave(&dev->power.lock, flags);
	        retval = rpm_resume(dev, rpmflags);
	        spin_unlock_irqrestore(&dev->power.lock, flags);

	        return retval;
	}
Quoted 3 lines

Not being an expert at the PM runtime API, at least on my eyes, replacing pm_runtime_get_sync() by pm_runtime_resume_and_get() seems to be the right thing to do, but Rafael should know more.

The cocci recipe made some wrong error check logic on some drivers, like, for instance: drivers/media/i2c/mt9m001.c.

On such drivers, the logic is like:

		ret = pm_runtime_resume_get_sync(&client->dev);
 		if (ret < 0)
	 		goto put_unlock;
		ret = mt9m001_apply_selection(sd);

if (ret)
goto put_unlock;

		...
	put_unlock:
		pm_runtime_put(&client->dev);
	 	mutex_unlock(&mt9m001->mutex);

On those cases where there are gotos to a logic with either pm_runtime_put() or pm_runtime_put_no_idle(), the coccinelle receipt should probably ignore it.

Thanks,
Mauro

author maintainer
#32 lore raw

PATCH 10/190 Revert "media: camss: Fix a reference count leak."

In reply to Greg Kroah-Hartman

This reverts commit d0675b67b42eb4f1a840d1513b5b00f78312f833.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/qcom/camss/camss-csiphy.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/platform/qcom/camss/camss-csiphy.c +1 -3
index 509c9a59c09c..a5d717d022a5 100644
@@ -174,10 +174,8 @@ static int csiphy_set_power(struct v4l2_subdev *sd, int on)
 		int ret;
 
 		ret = pm_runtime_get_sync(dev);
-		if (ret < 0) {
-			pm_runtime_put_sync(dev);
+		if (ret < 0)
 			return ret;
-		}
 
 		ret = csiphy_set_clock_rates(csiphy);
 		if (ret < 0) {
Signature · 1 line
2.31.1
#33 lore raw

Re: [PATCH 010/190] Revert "media: camss: Fix a reference count leak."

Hi Greg,

Thanks for taking for preventing this type of abuse.

Quoted 17 lines · Greg Kroah-Hartman

This reverts commit d0675b67b42eb4f1a840d1513b5b00f78312f833.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 5 lines
Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>

---

I think this patch is good, NAK.

Rob.

Acked-by
#34 lore raw

Re: [PATCH 010/190] Revert "media: camss: Fix a reference count leak."

Quoted 1 line

I think this patch is good, NAK.

Let me revise this, if this series is going to be reverted in its entirety, feel free to add my a-b.

author maintainer
#35 lore raw

Re: [PATCH 010/190] Revert "media: camss: Fix a reference count leak."

In reply to Robert Foss
Quoted 23 lines · Robert Foss

Hi Greg,

Thanks for taking for preventing this type of abuse.

Quoted 17 lines · Greg Kroah-Hartman

This reverts commit d0675b67b42eb4f1a840d1513b5b00f78312f833.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 7 lines
Quoted 5 lines
Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>

---

I think this patch is good, NAK.

I'll drop this from the series, thank you for the review.

greg k-h

author maintainer
#36 lore raw

PATCH 11/190 Revert "media: platform: fcp: Fix a reference count leak."

In reply to Greg Kroah-Hartman

This reverts commit 63e36a381d92a9cded97e90d481ee22566557dd1.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/rcar-fcp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/platform/rcar-fcp.c +1 -3
index 5c03318ae07b..13a84c7e3586 100644
@@ -102,10 +102,8 @@ int rcar_fcp_enable(struct rcar_fcp_device *fcp)
 		return 0;
 
 	ret = pm_runtime_get_sync(fcp->dev);
-	if (ret < 0) {
-		pm_runtime_put_noidle(fcp->dev);
+	if (ret < 0)
 		return ret;
-	}
 
 	return 0;
 }
Signature · 1 line
2.31.1
#37 lore raw

Re: [PATCH 011/190] Revert "media: platform: fcp: Fix a reference count leak."

Hi!

Quoted 4 lines
drivers/media/platform/rcar-fcp.c +0 -0
@@ -102,10 +102,8 @@ int rcar_fcp_enable(struct rcar_fcp_device *fcp)
 		return 0;

drivers/media/platform/rcar-fcp.c int rcar_fcp_enable(struct rcar_fcp_device *fcp) · line 109

Quoted 10 lines
drivers/media/platform/rcar-fcp.c +1 -3
 
 	ret = pm_runtime_get_sync(fcp->dev);
-	if (ret < 0) {
-		pm_runtime_put_noidle(fcp->dev);
+	if (ret < 0)
 		return ret;
-	}
 
 	return 0;
 }

This one, 12/, 13/ 14/ of the series look correct to me, and should NOT be reverted.

Additinaly 19/, 21/, 27/, 30/, 32/, 33/ and 62/ looked correct to me, but you already decided they should be kept, so no action needs to be done there.

Best regards,
Pavel

Signature · 1 line
http://www.livejournal.com/~pavelmachek
author maintainer
#38 lore raw

PATCH 12/190 Revert "media: rockchip/rga: Fix a reference count leak."

In reply to Greg Kroah-Hartman

This reverts commit 884d638e0853c4b5f01eb6d048fc3b6239012404.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Heiko Stuebner <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/rockchip/rga/rga-buf.c | 1 -
 1 file changed, 1 deletion(-)
drivers/media/platform/rockchip/rga/rga-buf.c +0 -1
index bf9a75b75083..36b821ccc1db 100644
@@ -81,7 +81,6 @@ static int rga_buf_start_streaming(struct vb2_queue *q, unsigned int count)
 
 	ret = pm_runtime_get_sync(rga->dev);
 	if (ret < 0) {
-		pm_runtime_put_noidle(rga->dev);
 		rga_buf_return_buffers(q, VB2_BUF_STATE_QUEUED);
 		return ret;
 	}
Signature · 1 line
2.31.1
author maintainer
#39 lore raw

PATCH 13/190 Revert "media: rcar-vin: Fix a reference count leak."

In reply to Greg Kroah-Hartman

This reverts commit 410822037cc909c4bef845a71e9cac92b75591d2.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/rcar-vin/rcar-v4l2.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/platform/rcar-vin/rcar-v4l2.c +1 -3
index 457a65bf6b66..d8144cde2952 100644
@@ -871,10 +871,8 @@ static int rvin_open(struct file *file)
 	int ret;
 
 	ret = pm_runtime_get_sync(vin->dev);
-	if (ret < 0) {
-		pm_runtime_put_noidle(vin->dev);
+	if (ret < 0)
 		return ret;
-	}
 
 	ret = mutex_lock_interruptible(&vin->lock);
 	if (ret)
Signature · 1 line
2.31.1
author maintainer
#40 lore raw

PATCH 14/190 Revert "media: rcar-vin: Fix a reference count leak."

In reply to Greg Kroah-Hartman

This reverts commit aaffa0126a111d65f4028c503c76192d4cc93277.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/rcar-vin/rcar-dma.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/platform/rcar-vin/rcar-dma.c +1 -3
index f30dafbdf61c..e109b3d0f4d1 100644
@@ -1459,10 +1459,8 @@ int rvin_set_channel_routing(struct rvin_dev *vin, u8 chsel)
 	int ret;
 
 	ret = pm_runtime_get_sync(vin->dev);
-	if (ret < 0) {
-		pm_runtime_put_noidle(vin->dev);
+	if (ret < 0)
 		return ret;
-	}
 
 	/* Make register writes take effect immediately. */
 	vnmc = rvin_read(vin, VNMC_REG);
Signature · 1 line
2.31.1
author maintainer
#41 lore raw

PATCH 15/190 Revert "firmware: Fix a reference count leak."

In reply to Greg Kroah-Hartman

This reverts commit fe3c60684377d5ad9b0569b87ed3e26e12c8173b.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc https
Cc Michael S. Tsirkin <[email protected]>
---
 drivers/firmware/qemu_fw_cfg.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/firmware/qemu_fw_cfg.c +3 -4
index 0078260fbabe..8fa660dde0f6 100644
@@ -608,10 +608,8 @@ static int fw_cfg_register_file(const struct fw_cfg_file *f)
 	/* register entry under "/sys/firmware/qemu_fw_cfg/by_key/" */
 	err = kobject_init_and_add(&entry->kobj, &fw_cfg_sysfs_entry_ktype,
 				   fw_cfg_sel_ko, "%d", entry->select);
-	if (err) {
-		kobject_put(&entry->kobj);
-		return err;
-	}
+	if (err)
+		goto err_register;
 
 	/* add raw binary content access */
 	err = sysfs_create_bin_file(&entry->kobj, &fw_cfg_sysfs_attr_raw);
@@ -627,6 +625,7 @@ static int fw_cfg_register_file(const struct fw_cfg_file *f)
 
 err_add_raw:
 	kobject_del(&entry->kobj);
+err_register:
 	kfree(entry);
 	return err;
 }
Signature · 1 line
2.31.1
author maintainer
#42 lore raw

Re: [PATCH 015/190] Revert "firmware: Fix a reference count leak."

Quoted 52 lines · Greg Kroah-Hartman

This reverts commit fe3c60684377d5ad9b0569b87ed3e26e12c8173b.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc https
Cc Michael S. Tsirkin <[email protected]>
---
 drivers/firmware/qemu_fw_cfg.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/firmware/qemu_fw_cfg.c +3 -4
index 0078260fbabe..8fa660dde0f6 100644
@@ -608,10 +608,8 @@ static int fw_cfg_register_file(const struct fw_cfg_file *f)
 	/* register entry under "/sys/firmware/qemu_fw_cfg/by_key/" */
 	err = kobject_init_and_add(&entry->kobj, &fw_cfg_sysfs_entry_ktype,
 				   fw_cfg_sel_ko, "%d", entry->select);
-	if (err) {
-		kobject_put(&entry->kobj);
-		return err;
-	}
+	if (err)
+		goto err_register;
 
 	/* add raw binary content access */
 	err = sysfs_create_bin_file(&entry->kobj, &fw_cfg_sysfs_attr_raw);
@@ -627,6 +625,7 @@ static int fw_cfg_register_file(const struct fw_cfg_file *f)
 
 err_add_raw:
 	kobject_del(&entry->kobj);
+err_register:
 	kfree(entry);
 	return err;
 }
Signature · 1 line
2.31.1

Looks correct, dropping.

greg k-h

author maintainer
#43 lore raw

PATCH 16/190 Revert "drm/nouveau: fix reference count leak in nouveau_debugfs_strap_peek"

In reply to Greg Kroah-Hartman

This reverts commit 8f29432417b11039ef960ab18987c7d61b2b5396.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

---
 drivers/gpu/drm/nouveau/nouveau_debugfs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/nouveau/nouveau_debugfs.c +1 -3
index c2bc05eb2e54..c8da70e06006 100644
@@ -54,10 +54,8 @@ nouveau_debugfs_strap_peek(struct seq_file *m, void *data)
 	int ret;
 
 	ret = pm_runtime_get_sync(drm->dev->dev);
-	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(drm->dev->dev);
+	if (ret < 0 && ret != -EACCES)
 		return ret;
-	}
 
 	seq_printf(m, "0x%08x\n",
 		   nvif_rd32(&drm->client.device.object, 0x101000));
Signature · 1 line
2.31.1
author maintainer
#44 lore raw

Re: [PATCH 016/190] Revert "drm/nouveau: fix reference count leak in nouveau_debugfs_strap_peek"

Quoted 42 lines · Greg Kroah-Hartman

This reverts commit 8f29432417b11039ef960ab18987c7d61b2b5396.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

---
 drivers/gpu/drm/nouveau/nouveau_debugfs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/nouveau/nouveau_debugfs.c +1 -3
index c2bc05eb2e54..c8da70e06006 100644
@@ -54,10 +54,8 @@ nouveau_debugfs_strap_peek(struct seq_file *m, void *data)
 	int ret;
 
 	ret = pm_runtime_get_sync(drm->dev->dev);
-	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(drm->dev->dev);
+	if (ret < 0 && ret != -EACCES)
 		return ret;
-	}
 
 	seq_printf(m, "0x%08x\n",
 		   nvif_rd32(&drm->client.device.object, 0x101000));
Signature · 1 line
2.31.1

Looks correct, dropping this.

greg k-h

author maintainer
#45 lore raw

PATCH 17/190 Revert "drm/nouveau: fix reference count leak in nv50_disp_atomic_commit"

In reply to Greg Kroah-Hartman

This reverts commit a2cdf39536b0d21fb06113f5e16692513d7bcb9c.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

---
 drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/nouveau/dispnv50/disp.c +1 -3
index 1c9c0cdf85db..8ae298ab1cfb 100644
@@ -2320,10 +2320,8 @@ nv50_disp_atomic_commit(struct drm_device *dev,
 	int ret, i;
 
 	ret = pm_runtime_get_sync(dev->dev);
-	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(dev->dev);
+	if (ret < 0 && ret != -EACCES)
 		return ret;
-	}
 
 	ret = drm_atomic_helper_setup_commit(state, nonblock);
 	if (ret)
Signature · 1 line
2.31.1
author maintainer
#46 lore raw

Re: [PATCH 017/190] Revert "drm/nouveau: fix reference count leak in nv50_disp_atomic_commit"

Quoted 42 lines · Greg Kroah-Hartman

This reverts commit a2cdf39536b0d21fb06113f5e16692513d7bcb9c.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

---
 drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/nouveau/dispnv50/disp.c +1 -3
index 1c9c0cdf85db..8ae298ab1cfb 100644
@@ -2320,10 +2320,8 @@ nv50_disp_atomic_commit(struct drm_device *dev,
 	int ret, i;
 
 	ret = pm_runtime_get_sync(dev->dev);
-	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(dev->dev);
+	if (ret < 0 && ret != -EACCES)
 		return ret;
-	}
 
 	ret = drm_atomic_helper_setup_commit(state, nonblock);
 	if (ret)
Signature · 1 line
2.31.1

Looks correct, dropping this.

greg k-h

author maintainer
#47 lore raw

PATCH 18/190 Revert "drm/nouveau: fix multiple instances of reference count leaks"

In reply to Greg Kroah-Hartman

This reverts commit 659fb5f154c3434c90a34586f3b7aa1c39cf6062.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

---
 drivers/gpu/drm/nouveau/nouveau_drm.c | 8 ++------
 drivers/gpu/drm/nouveau/nouveau_gem.c | 4 +---
 2 files changed, 3 insertions(+), 9 deletions(-)
drivers/gpu/drm/nouveau/nouveau_drm.c +2 -6
index 885815ea917f..1a203b64bb67 100644
@@ -1067,10 +1067,8 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
 
 	/* need to bring up power immediately if opening device */
 	ret = pm_runtime_get_sync(dev->dev);
-	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(dev->dev);
+	if (ret < 0 && ret != -EACCES)
 		return ret;
-	}
 
 	get_task_comm(tmpname, current);
 	snprintf(name, sizeof(name), "%s[%d]", tmpname, pid_nr(fpriv->pid));
@@ -1152,10 +1150,8 @@ nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	long ret;
 
 	ret = pm_runtime_get_sync(dev->dev);
-	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(dev->dev);
+	if (ret < 0 && ret != -EACCES)
 		return ret;
-	}
 
 	switch (_IOC_NR(cmd) - DRM_COMMAND_BASE) {
 	case DRM_NOUVEAU_NVIF:
drivers/gpu/drm/nouveau/nouveau_gem.c +1 -3
index c88cbb85f101..195b570ee8f2 100644
@@ -48,10 +48,8 @@ nouveau_gem_object_del(struct drm_gem_object *gem)
 	int ret;
 
 	ret = pm_runtime_get_sync(dev);
-	if (WARN_ON(ret < 0 && ret != -EACCES)) {
-		pm_runtime_put_autosuspend(dev);
+	if (WARN_ON(ret < 0 && ret != -EACCES))
 		return;
-	}
 
 	if (gem->import_attach)
 		drm_prime_gem_destroy(gem, nvbo->bo.sg);
Signature · 1 line
2.31.1
author maintainer
#48 lore raw

Re: [PATCH 018/190] Revert "drm/nouveau: fix multiple instances of reference count leaks"

Quoted 71 lines · Greg Kroah-Hartman

This reverts commit 659fb5f154c3434c90a34586f3b7aa1c39cf6062.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

---
 drivers/gpu/drm/nouveau/nouveau_drm.c | 8 ++------
 drivers/gpu/drm/nouveau/nouveau_gem.c | 4 +---
 2 files changed, 3 insertions(+), 9 deletions(-)
drivers/gpu/drm/nouveau/nouveau_drm.c +2 -6
index 885815ea917f..1a203b64bb67 100644
@@ -1067,10 +1067,8 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
 
 	/* need to bring up power immediately if opening device */
 	ret = pm_runtime_get_sync(dev->dev);
-	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(dev->dev);
+	if (ret < 0 && ret != -EACCES)
 		return ret;
-	}
 
 	get_task_comm(tmpname, current);
 	snprintf(name, sizeof(name), "%s[%d]", tmpname, pid_nr(fpriv->pid));
@@ -1152,10 +1150,8 @@ nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	long ret;
 
 	ret = pm_runtime_get_sync(dev->dev);
-	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(dev->dev);
+	if (ret < 0 && ret != -EACCES)
 		return ret;
-	}
 
 	switch (_IOC_NR(cmd) - DRM_COMMAND_BASE) {
 	case DRM_NOUVEAU_NVIF:
drivers/gpu/drm/nouveau/nouveau_gem.c +1 -3
index c88cbb85f101..195b570ee8f2 100644
@@ -48,10 +48,8 @@ nouveau_gem_object_del(struct drm_gem_object *gem)
 	int ret;
 
 	ret = pm_runtime_get_sync(dev);
-	if (WARN_ON(ret < 0 && ret != -EACCES)) {
-		pm_runtime_put_autosuspend(dev);
+	if (WARN_ON(ret < 0 && ret != -EACCES))
 		return;
-	}
 
 	if (gem->import_attach)
 		drm_prime_gem_destroy(gem, nvbo->bo.sg);
Signature · 1 line
2.31.1

Looks correct, dropping this.

greg k-h

author maintainer
#49 lore raw

PATCH 19/190 Revert "drm/nouveau/drm/noveau: fix reference count leak in nouveau_fbcon_open"

In reply to Greg Kroah-Hartman

This reverts commit bfad51c7633325b5d4b32444efe04329d53297b2.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

---
 drivers/gpu/drm/nouveau/nouveau_fbcon.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/nouveau/nouveau_fbcon.c +1 -3
index 4fc0fa696461..6f04e7402a76 100644
@@ -189,10 +189,8 @@ nouveau_fbcon_open(struct fb_info *info, int user)
 	struct nouveau_fbdev *fbcon = info->par;
 	struct nouveau_drm *drm = nouveau_drm(fbcon->helper.dev);
 	int ret = pm_runtime_get_sync(drm->dev->dev);
-	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put(drm->dev->dev);
+	if (ret < 0 && ret != -EACCES)
 		return ret;
-	}
 	return 0;
 }
 
Signature · 1 line
2.31.1
author maintainer
#50 lore raw

Re: [PATCH 019/190] Revert "drm/nouveau/drm/noveau: fix reference count leak in nouveau_fbcon_open"

Quoted 42 lines · Greg Kroah-Hartman

This reverts commit bfad51c7633325b5d4b32444efe04329d53297b2.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

---
 drivers/gpu/drm/nouveau/nouveau_fbcon.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/nouveau/nouveau_fbcon.c +1 -3
index 4fc0fa696461..6f04e7402a76 100644
@@ -189,10 +189,8 @@ nouveau_fbcon_open(struct fb_info *info, int user)
 	struct nouveau_fbdev *fbcon = info->par;
 	struct nouveau_drm *drm = nouveau_drm(fbcon->helper.dev);
 	int ret = pm_runtime_get_sync(drm->dev->dev);
-	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put(drm->dev->dev);
+	if (ret < 0 && ret != -EACCES)
 		return ret;
-	}
 	return 0;
 }
 
Signature · 1 line
2.31.1

Looks correct, dropping this.

greg k-h

author maintainer
#51 lore raw

PATCH 20/190 Revert "PCI: Fix pci_create_slot() reference count leak"

In reply to Greg Kroah-Hartman

This reverts commit 8a94644b440eef5a7b9c104ac8aa7a7f413e35e5.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc https
Cc Qiushi Wu <[email protected]>
Cc Bjorn Helgaas <[email protected]>
---
 drivers/pci/slot.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/pci/slot.c +2 -4
index d627dd9179b4..c190e09af356 100644
@@ -268,7 +268,6 @@ struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
 	slot_name = make_slot_name(name);
 	if (!slot_name) {
 		err = -ENOMEM;
-		kfree(slot);
 		goto err;
 	}
 
@@ -277,10 +276,8 @@ struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
 
 	err = kobject_init_and_add(&slot->kobj, &pci_slot_ktype, NULL,
 				   "%s", slot_name);
-	if (err) {
-		kobject_put(&slot->kobj);
+	if (err)
 		goto err;
-	}
 
 	down_read(&pci_bus_sem);
 	list_for_each_entry(dev, &parent->devices, bus_list)
@@ -296,6 +293,7 @@ struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
 	mutex_unlock(&pci_slot_mutex);
 	return slot;
 err:
+	kfree(slot);
 	slot = ERR_PTR(err);
 	goto out;
 }
Signature · 1 line
2.31.1
#52 lore raw

Re: [PATCH 020/190] Revert "PCI: Fix pci_create_slot() reference count leak"

[+cc Jiri, Jubin (author of 4684709bf81a)]

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 8a94644b440eef5a7b9c104ac8aa7a7f413e35e5.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 4 lines
Cc https
Cc Qiushi Wu <[email protected]>
Cc Bjorn Helgaas <[email protected]>

Please do not apply this revert.

Prior to 8a94644b440e ("PCI: Fix pci_create_slot() reference count leak"), we essentially had this:

  err = kobject_init_and_add(&slot->kobj, &pci_slot_ktype, ...);
  if (err)
    kfree(slot);
    return ERR_PTR(err);

  INIT_LIST_HEAD(&slot->list);
  list_add(&slot->list, &parent->slots);

That was incorrect because if kobject_init_and_add() fails, kobject_put() must be called to clean up the object (per the function comment). For pci_slot_ktype, the release function is pci_slot_release():

  pci_slot_release
    list_del(&slot->list);
    kfree(slot);

After 8a94644b440e, we had:

  err = kobject_init_and_add(&slot->kobj, &pci_slot_ktype, ...);
  if (err)
    kobject_put(&slot->kobj);
    return ERR_PTR(err);

  INIT_LIST_HEAD(&slot->list);
  list_add(&slot->list, &parent->slots);

This fixed one bug but exposed another: we correctly clean up the object by calling kobject_put() which calls pci_slot_release(), but that dereferences slot->list, which hasn't been initialized yet.

But 4684709bf81a ("PCI: Fix pci_slot_release() NULL pointer dereference") fixed that problem by making it this:

  INIT_LIST_HEAD(&slot->list);
  list_add(&slot->list, &parent->slots);
  err = kobject_init_and_add(&slot->kobj, &pci_slot_ktype, ...);
  if (err)
    kobject_put(&slot->kobj);
    return ERR_PTR(err);

This correctly initializes slot->list and cleans up if kobject_init_and_add() fails.

But if we apply this revert, we'll have this:

  INIT_LIST_HEAD(&slot->list);
  list_add(&slot->list, &parent->slots);
  err = kobject_init_and_add(&slot->kobj, &pci_slot_ktype, ...);
  if (err)
    kfree(slot);
    return ERR_PTR(err);

Now we kfree(slot), but we don't call kobject_put(), so we don't remove it from the list, so the list is now corrupted because one of its entries has been deallocated.

Bjorn

Quoted 39 lines
---
 drivers/pci/slot.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/pci/slot.c +2 -4
index d627dd9179b4..c190e09af356 100644
@@ -268,7 +268,6 @@ struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
 	slot_name = make_slot_name(name);
 	if (!slot_name) {
 		err = -ENOMEM;
-		kfree(slot);
 		goto err;
 	}
 
@@ -277,10 +276,8 @@ struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
 
 	err = kobject_init_and_add(&slot->kobj, &pci_slot_ktype, NULL,
 				   "%s", slot_name);
-	if (err) {
-		kobject_put(&slot->kobj);
+	if (err)
 		goto err;
-	}
 
 	down_read(&pci_bus_sem);
 	list_for_each_entry(dev, &parent->devices, bus_list)
@@ -296,6 +293,7 @@ struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
 	mutex_unlock(&pci_slot_mutex);
 	return slot;
 err:
+	kfree(slot);
 	slot = ERR_PTR(err);
 	goto out;
 }
Signature · 1 line
2.31.1
author maintainer
#53 lore raw

Re: [PATCH 020/190] Revert "PCI: Fix pci_create_slot() reference count leak"

Quoted 82 lines · Bjorn Helgaas

[+cc Jiri, Jubin (author of 4684709bf81a)]

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 8a94644b440eef5a7b9c104ac8aa7a7f413e35e5.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 4 lines
Cc https
Cc Qiushi Wu <[email protected]>
Cc Bjorn Helgaas <[email protected]>

Please do not apply this revert.

Prior to 8a94644b440e ("PCI: Fix pci_create_slot() reference count leak"), we essentially had this:

  err = kobject_init_and_add(&slot->kobj, &pci_slot_ktype, ...);
  if (err)
    kfree(slot);
    return ERR_PTR(err);

  INIT_LIST_HEAD(&slot->list);
  list_add(&slot->list, &parent->slots);

That was incorrect because if kobject_init_and_add() fails, kobject_put() must be called to clean up the object (per the function comment). For pci_slot_ktype, the release function is pci_slot_release():

  pci_slot_release
    list_del(&slot->list);
    kfree(slot);

After 8a94644b440e, we had:

  err = kobject_init_and_add(&slot->kobj, &pci_slot_ktype, ...);
  if (err)
    kobject_put(&slot->kobj);
    return ERR_PTR(err);

  INIT_LIST_HEAD(&slot->list);
  list_add(&slot->list, &parent->slots);

This fixed one bug but exposed another: we correctly clean up the object by calling kobject_put() which calls pci_slot_release(), but that dereferences slot->list, which hasn't been initialized yet.

But 4684709bf81a ("PCI: Fix pci_slot_release() NULL pointer dereference") fixed that problem by making it this:

  INIT_LIST_HEAD(&slot->list);
  list_add(&slot->list, &parent->slots);
  err = kobject_init_and_add(&slot->kobj, &pci_slot_ktype, ...);
  if (err)
    kobject_put(&slot->kobj);
    return ERR_PTR(err);

This correctly initializes slot->list and cleans up if kobject_init_and_add() fails.

But if we apply this revert, we'll have this:

  INIT_LIST_HEAD(&slot->list);
  list_add(&slot->list, &parent->slots);
  err = kobject_init_and_add(&slot->kobj, &pci_slot_ktype, ...);
  if (err)
    kfree(slot);
    return ERR_PTR(err);
Quoted 3 lines

Now we kfree(slot), but we don't call kobject_put(), so we don't remove it from the list, so the list is now corrupted because one of its entries has been deallocated.

Thanks for the review, I have now dropped this revert.

greg k-h

author maintainer
#54 lore raw

PATCH 21/190 Revert "omapfb: fix multiple reference count leaks due to pm_runtime_get_sync"

In reply to Greg Kroah-Hartman

This reverts commit 78c2ce9bde70be5be7e3615a2ae7024ed8173087.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Allison Randal <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Enrico Weigelt <[email protected]>
Cc "Andrew F. Davis" <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc Alexios Zavras <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc YueHaibing <[email protected]>
Cc Bartlomiej Zolnierkiewicz <[email protected]>
Cc https
---
 drivers/video/fbdev/omap2/omapfb/dss/dispc.c | 7 ++-----
 drivers/video/fbdev/omap2/omapfb/dss/dsi.c   | 7 ++-----
 drivers/video/fbdev/omap2/omapfb/dss/dss.c   | 7 ++-----
 drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c | 5 ++---
 drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c | 5 ++---
 drivers/video/fbdev/omap2/omapfb/dss/venc.c  | 7 ++-----
 6 files changed, 12 insertions(+), 26 deletions(-)
drivers/video/fbdev/omap2/omapfb/dss/dispc.c +2 -5
index b2d6e6df2161..285d33ce1e11 100644
@@ -520,11 +520,8 @@ int dispc_runtime_get(void)
 	DSSDBG("dispc_runtime_get\n");
 
 	r = pm_runtime_get_sync(&dispc.pdev->dev);
-	if (WARN_ON(r < 0)) {
-		pm_runtime_put_sync(&dispc.pdev->dev);
-		return r;
-	}
-	return 0;
+	WARN_ON(r < 0);
+	return r < 0 ? r : 0;
 }
 EXPORT_SYMBOL(dispc_runtime_get);
 
drivers/video/fbdev/omap2/omapfb/dss/dsi.c +2 -5
index daa313f14335..bfa27672fe27 100644
@@ -1137,11 +1137,8 @@ static int dsi_runtime_get(struct platform_device *dsidev)
 	DSSDBG("dsi_runtime_get\n");
 
 	r = pm_runtime_get_sync(&dsi->pdev->dev);
-	if (WARN_ON(r < 0)) {
-		pm_runtime_put_sync(&dsi->pdev->dev);
-		return r;
-	}
-	return 0;
+	WARN_ON(r < 0);
+	return r < 0 ? r : 0;
 }
 
 static void dsi_runtime_put(struct platform_device *dsidev)
drivers/video/fbdev/omap2/omapfb/dss/dss.c +2 -5
index a6b1c1598040..bfc5c4c5a26a 100644
@@ -768,11 +768,8 @@ int dss_runtime_get(void)
 	DSSDBG("dss_runtime_get\n");
 
 	r = pm_runtime_get_sync(&dss.pdev->dev);
-	if (WARN_ON(r < 0)) {
-		pm_runtime_put_sync(&dss.pdev->dev);
-		return r;
-	}
-	return 0;
+	WARN_ON(r < 0);
+	return r < 0 ? r : 0;
 }
 
 void dss_runtime_put(void)
drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c +2 -3
index 800bd108e834..e8ccb2f5ea70 100644
@@ -39,10 +39,9 @@ static int hdmi_runtime_get(void)
 	DSSDBG("hdmi_runtime_get\n");
 
 	r = pm_runtime_get_sync(&hdmi.pdev->dev);
-	if (WARN_ON(r < 0)) {
-		pm_runtime_put_sync(&hdmi.pdev->dev);
+	WARN_ON(r < 0);
+	if (r < 0)
 		return r;
-	}
 
 	return 0;
 }
drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c +2 -3
index 2c03608addcd..bb59367b69c4 100644
@@ -43,10 +43,9 @@ static int hdmi_runtime_get(void)
 	DSSDBG("hdmi_runtime_get\n");
 
 	r = pm_runtime_get_sync(&hdmi.pdev->dev);
-	if (WARN_ON(r < 0)) {
-		pm_runtime_put_sync(&hdmi.pdev->dev);
+	WARN_ON(r < 0);
+	if (r < 0)
 		return r;
-	}
 
 	return 0;
 }
drivers/video/fbdev/omap2/omapfb/dss/venc.c +2 -5
index 905d642ff9ed..b9e722542afb 100644
@@ -348,11 +348,8 @@ static int venc_runtime_get(void)
 	DSSDBG("venc_runtime_get\n");
 
 	r = pm_runtime_get_sync(&venc.pdev->dev);
-	if (WARN_ON(r < 0)) {
-		pm_runtime_put_sync(&venc.pdev->dev);
-		return r;
-	}
-	return 0;
+	WARN_ON(r < 0);
+	return r < 0 ? r : 0;
 }
 
 static void venc_runtime_put(void)
Signature · 1 line
2.31.1
author maintainer
#55 lore raw

Re: [PATCH 021/190] Revert "omapfb: fix multiple reference count leaks due to pm_runtime_get_sync"

Quoted 148 lines · Greg Kroah-Hartman

This reverts commit 78c2ce9bde70be5be7e3615a2ae7024ed8173087.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Allison Randal <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Enrico Weigelt <[email protected]>
Cc "Andrew F. Davis" <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc Alexios Zavras <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc YueHaibing <[email protected]>
Cc Bartlomiej Zolnierkiewicz <[email protected]>
Cc https
---
 drivers/video/fbdev/omap2/omapfb/dss/dispc.c | 7 ++-----
 drivers/video/fbdev/omap2/omapfb/dss/dsi.c   | 7 ++-----
 drivers/video/fbdev/omap2/omapfb/dss/dss.c   | 7 ++-----
 drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c | 5 ++---
 drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c | 5 ++---
 drivers/video/fbdev/omap2/omapfb/dss/venc.c  | 7 ++-----
 6 files changed, 12 insertions(+), 26 deletions(-)
drivers/video/fbdev/omap2/omapfb/dss/dispc.c +2 -5
index b2d6e6df2161..285d33ce1e11 100644
@@ -520,11 +520,8 @@ int dispc_runtime_get(void)
 	DSSDBG("dispc_runtime_get\n");
 
 	r = pm_runtime_get_sync(&dispc.pdev->dev);
-	if (WARN_ON(r < 0)) {
-		pm_runtime_put_sync(&dispc.pdev->dev);
-		return r;
-	}
-	return 0;
+	WARN_ON(r < 0);
+	return r < 0 ? r : 0;
 }
 EXPORT_SYMBOL(dispc_runtime_get);
 
drivers/video/fbdev/omap2/omapfb/dss/dsi.c +2 -5
index daa313f14335..bfa27672fe27 100644
@@ -1137,11 +1137,8 @@ static int dsi_runtime_get(struct platform_device *dsidev)
 	DSSDBG("dsi_runtime_get\n");
 
 	r = pm_runtime_get_sync(&dsi->pdev->dev);
-	if (WARN_ON(r < 0)) {
-		pm_runtime_put_sync(&dsi->pdev->dev);
-		return r;
-	}
-	return 0;
+	WARN_ON(r < 0);
+	return r < 0 ? r : 0;
 }
 
 static void dsi_runtime_put(struct platform_device *dsidev)
drivers/video/fbdev/omap2/omapfb/dss/dss.c +2 -5
index a6b1c1598040..bfc5c4c5a26a 100644
@@ -768,11 +768,8 @@ int dss_runtime_get(void)
 	DSSDBG("dss_runtime_get\n");
 
 	r = pm_runtime_get_sync(&dss.pdev->dev);
-	if (WARN_ON(r < 0)) {
-		pm_runtime_put_sync(&dss.pdev->dev);
-		return r;
-	}
-	return 0;
+	WARN_ON(r < 0);
+	return r < 0 ? r : 0;
 }
 
 void dss_runtime_put(void)
drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c +2 -3
index 800bd108e834..e8ccb2f5ea70 100644
@@ -39,10 +39,9 @@ static int hdmi_runtime_get(void)
 	DSSDBG("hdmi_runtime_get\n");
 
 	r = pm_runtime_get_sync(&hdmi.pdev->dev);
-	if (WARN_ON(r < 0)) {
-		pm_runtime_put_sync(&hdmi.pdev->dev);
+	WARN_ON(r < 0);
+	if (r < 0)
 		return r;
-	}
 
 	return 0;
 }
drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c +2 -3
index 2c03608addcd..bb59367b69c4 100644
@@ -43,10 +43,9 @@ static int hdmi_runtime_get(void)
 	DSSDBG("hdmi_runtime_get\n");
 
 	r = pm_runtime_get_sync(&hdmi.pdev->dev);
-	if (WARN_ON(r < 0)) {
-		pm_runtime_put_sync(&hdmi.pdev->dev);
+	WARN_ON(r < 0);
+	if (r < 0)
 		return r;
-	}
 
 	return 0;
 }
drivers/video/fbdev/omap2/omapfb/dss/venc.c +2 -5
index 905d642ff9ed..b9e722542afb 100644
@@ -348,11 +348,8 @@ static int venc_runtime_get(void)
 	DSSDBG("venc_runtime_get\n");
 
 	r = pm_runtime_get_sync(&venc.pdev->dev);
-	if (WARN_ON(r < 0)) {
-		pm_runtime_put_sync(&venc.pdev->dev);
-		return r;
-	}
-	return 0;
+	WARN_ON(r < 0);
+	return r < 0 ? r : 0;
 }
 
 static void venc_runtime_put(void)
Signature · 1 line
2.31.1

Messy and no one can hit this, but it looks semi-correct so I'll keep this and drop my revert.

thanks,

greg k-h

author maintainer
#56 lore raw

PATCH 22/190 Revert "drm/radeon: Fix reference count leaks caused by pm_runtime_get_sync"

In reply to Greg Kroah-Hartman

This reverts commit 9fb10671011143d15b6b40d6d5fa9c52c57e9d63.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Evan Quan <[email protected]>
Cc Aditya Pakki <[email protected]>
Cc Alex Deucher <[email protected]>
---
 drivers/gpu/drm/radeon/radeon_display.c | 4 +---
 drivers/gpu/drm/radeon/radeon_drv.c     | 4 +---
 drivers/gpu/drm/radeon/radeon_kms.c     | 4 +---
 3 files changed, 3 insertions(+), 9 deletions(-)
drivers/gpu/drm/radeon/radeon_display.c +1 -3
index 652af7a134bd..9f29ba6c2bed 100644
@@ -627,10 +627,8 @@ radeon_crtc_set_config(struct drm_mode_set *set,
 	dev = set->crtc->dev;
 
 	ret = pm_runtime_get_sync(dev->dev);
-	if (ret < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+	if (ret < 0)
 		return ret;
-	}
 
 	ret = drm_crtc_helper_set_config(set, ctx);
 
drivers/gpu/drm/radeon/radeon_drv.c +1 -3
index efeb115ae70e..468b364c2dab 100644
@@ -513,10 +513,8 @@ long radeon_drm_ioctl(struct file *filp,
 	long ret;
 	dev = file_priv->minor->dev;
 	ret = pm_runtime_get_sync(dev->dev);
-	if (ret < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+	if (ret < 0)
 		return ret;
-	}
 
 	ret = drm_ioctl(filp, cmd, arg);
 
drivers/gpu/drm/radeon/radeon_kms.c +1 -3
index 2479d6ab7a36..df644bb68c0f 100644
@@ -644,10 +644,8 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
 	file_priv->driver_priv = NULL;
 
 	r = pm_runtime_get_sync(dev->dev);
-	if (r < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+	if (r < 0)
 		return r;
-	}
 
 	/* new gpu have virtual address space support */
 	if (rdev->family >= CHIP_CAYMAN) {
Signature · 1 line
2.31.1
#57 lore raw

RE: [PATCH 022/190] Revert "drm/radeon: Fix reference count leaks caused by pm_runtime_get_sync"

[AMD Public Use]

Quoted 25 lines

-----Original Message-----
From: Greg Kroah-Hartman <[email protected]>
Sent: Wednesday, April 21, 2021 8:58 AM
To: [email protected]
Cc: Greg Kroah-Hartman <[email protected]>; Quan, Evan <[email protected]>; Aditya Pakki <[email protected]>; Deucher, Alexander <[email protected]>
Subject: [PATCH 022/190] Revert "drm/radeon: Fix reference count leaks caused by pm_runtime_get_sync"

This reverts commit 9fb10671011143d15b6b40d6d5fa9c52c57e9d63.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 4 lines
Cc Evan Quan <[email protected]>
Cc Aditya Pakki <[email protected]>
Cc Alex Deucher <[email protected]>

AFAICT, this patch is correct or at least does no harm. Handling of pm_runtime_get_sync() errors in the kernel seems to be inconsistent at best.

Alex

Quoted 60 lines
---
 drivers/gpu/drm/radeon/radeon_display.c | 4 +---
 drivers/gpu/drm/radeon/radeon_drv.c     | 4 +---
 drivers/gpu/drm/radeon/radeon_kms.c     | 4 +---
 3 files changed, 3 insertions(+), 9 deletions(-)
drivers/gpu/drm/radeon/radeon_display.c +1 -3
index 652af7a134bd..9f29ba6c2bed 100644
@@ -627,10 +627,8 @@ radeon_crtc_set_config(struct drm_mode_set *set,
 	dev = set->crtc->dev;
 
 	ret = pm_runtime_get_sync(dev->dev);
-	if (ret < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+	if (ret < 0)
 		return ret;
-	}
 
 	ret = drm_crtc_helper_set_config(set, ctx);
 
drivers/gpu/drm/radeon/radeon_drv.c +1 -3
index efeb115ae70e..468b364c2dab 100644
@@ -513,10 +513,8 @@ long radeon_drm_ioctl(struct file *filp,
 	long ret;
 	dev = file_priv->minor->dev;
 	ret = pm_runtime_get_sync(dev->dev);
-	if (ret < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+	if (ret < 0)
 		return ret;
-	}
 
 	ret = drm_ioctl(filp, cmd, arg);
 
drivers/gpu/drm/radeon/radeon_kms.c +1 -3
index 2479d6ab7a36..df644bb68c0f 100644
@@ -644,10 +644,8 @@ int radeon_driver_open_kms(struct drm_device
 *dev, struct drm_file *file_priv)
 	file_priv->driver_priv = NULL;
 
 	r = pm_runtime_get_sync(dev->dev);
-	if (r < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+	if (r < 0)
 		return r;
-	}
 
 	/* new gpu have virtual address space support */

if (rdev->family >= CHIP_CAYMAN) {
--
2.31.1

author maintainer
#58 lore raw

Re: [PATCH 022/190] Revert "drm/radeon: Fix reference count leaks caused by pm_runtime_get_sync"

Quoted 27 lines · Alexander

[AMD Public Use]

Quoted 25 lines

-----Original Message-----
From: Greg Kroah-Hartman <[email protected]>
Sent: Wednesday, April 21, 2021 8:58 AM
To: [email protected]
Cc: Greg Kroah-Hartman <[email protected]>; Quan, Evan <[email protected]>; Aditya Pakki <[email protected]>; Deucher, Alexander <[email protected]>
Subject: [PATCH 022/190] Revert "drm/radeon: Fix reference count leaks caused by pm_runtime_get_sync"

This reverts commit 9fb10671011143d15b6b40d6d5fa9c52c57e9d63.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 6 lines
Quoted 4 lines
Cc Evan Quan <[email protected]>
Cc Aditya Pakki <[email protected]>
Cc Alex Deucher <[email protected]>

AFAICT, this patch is correct or at least does no harm. Handling of pm_runtime_get_sync() errors in the kernel seems to be inconsistent at best.

Thanks for the review, I'll drop this revert from the tree.

greg k-h

author maintainer
#59 lore raw

PATCH 23/190 Revert "drm/radeon: fix multiple reference count leak"

In reply to Greg Kroah-Hartman

This reverts commit 6f2e8acdb48ed166b65d47837c31b177460491ec.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Alex Deucher <[email protected]>
---
 drivers/gpu/drm/radeon/radeon_connectors.c | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)
drivers/gpu/drm/radeon/radeon_connectors.c +5 -15
index 607ad5620bd9..ba8885676676 100644
@@ -879,10 +879,8 @@ radeon_lvds_detect(struct drm_connector *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
-		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+		if (r < 0)
 			return connector_status_disconnected;
-		}
 	}
 
 	if (encoder) {
@@ -1027,10 +1025,8 @@ radeon_vga_detect(struct drm_connector *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
-		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+		if (r < 0)
 			return connector_status_disconnected;
-		}
 	}
 
 	encoder = radeon_best_single_encoder(connector);
@@ -1167,10 +1163,8 @@ radeon_tv_detect(struct drm_connector *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
-		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+		if (r < 0)
 			return connector_status_disconnected;
-		}
 	}
 
 	encoder = radeon_best_single_encoder(connector);
@@ -1253,10 +1247,8 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
-		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+		if (r < 0)
 			return connector_status_disconnected;
-		}
 	}
 
 	if (radeon_connector->detected_hpd_without_ddc) {
@@ -1665,10 +1657,8 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
-		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+		if (r < 0)
 			return connector_status_disconnected;
-		}
 	}
 
 	if (!force && radeon_check_hpd_status_unchanged(connector)) {
Signature · 1 line
2.31.1
#60 lore raw

RE: [PATCH 023/190] Revert "drm/radeon: fix multiple reference count leak"

[AMD Public Use]

Quoted 20 lines

-----Original Message-----
From: Greg Kroah-Hartman <[email protected]>
Sent: Wednesday, April 21, 2021 8:58 AM
To: [email protected]
Cc: Greg Kroah-Hartman <[email protected]>; Aditya Pakki <[email protected]>; Deucher, Alexander <[email protected]>
Subject: [PATCH 023/190] Revert "drm/radeon: fix multiple reference count leak"

This reverts commit 6f2e8acdb48ed166b65d47837c31b177460491ec.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Quoted 8 lines

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Alex Deucher <[email protected]>

AFAICT, this patch is correct or at least does no harm. Handling of pm_runtime_get_sync() errors in the kernel seems to be inconsistent at best.

Alex

Quoted 81 lines
---
 drivers/gpu/drm/radeon/radeon_connectors.c | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)
drivers/gpu/drm/radeon/radeon_connectors.c +1 -3
index 607ad5620bd9..ba8885676676 100644
@@ -879,10 +879,8 @@ radeon_lvds_detect(struct drm_connector
 *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
-		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev-
 >dev);
+		if (r < 0)
 			return connector_status_disconnected;
-		}
 	}
drivers/gpu/drm/radeon/radeon_connectors.c +1 -3
 	if (encoder) {
@@ -1027,10 +1025,8 @@ radeon_vga_detect(struct drm_connector
 *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
-		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev-
 >dev);
+		if (r < 0)
 			return connector_status_disconnected;
-		}
 	}
drivers/gpu/drm/radeon/radeon_connectors.c +1 -3
 	encoder = radeon_best_single_encoder(connector);
@@ -1167,10 +1163,8 @@ radeon_tv_detect(struct drm_connector
 *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
-		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev-
 >dev);
+		if (r < 0)
 			return connector_status_disconnected;
-		}
 	}
drivers/gpu/drm/radeon/radeon_connectors.c +1 -3
 	encoder = radeon_best_single_encoder(connector);
@@ -1253,10 +1247,8 @@ radeon_dvi_detect(struct drm_connector
 *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
-		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev-
 >dev);
+		if (r < 0)
 			return connector_status_disconnected;
-		}
 	}

if (radeon_connector->detected_hpd_without_ddc) { @@ -1665,10
+1657,8 @@ radeon_dp_detect(struct drm_connector *connector, bool force)

drivers/gpu/drm/radeon/radeon_connectors.c +0 -2
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
-		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev-
Quoted 1 line

dev);

drivers/gpu/drm/radeon/radeon_connectors.c +1 -2
+		if (r < 0)
 			return connector_status_disconnected;
-		}
 	}
 
 	if (!force && radeon_check_hpd_status_unchanged(connector)) {
--

2.31.1

author maintainer
#61 lore raw

Re: [PATCH 023/190] Revert "drm/radeon: fix multiple reference count leak"

Quoted 27 lines · Alexander

[AMD Public Use]

Quoted 25 lines

-----Original Message-----
From: Greg Kroah-Hartman <[email protected]>
Sent: Wednesday, April 21, 2021 8:58 AM
To: [email protected]
Cc: Greg Kroah-Hartman <[email protected]>; Aditya Pakki <[email protected]>; Deucher, Alexander <[email protected]>
Subject: [PATCH 023/190] Revert "drm/radeon: fix multiple reference count leak"

This reverts commit 6f2e8acdb48ed166b65d47837c31b177460491ec.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 5 lines
Quoted 3 lines
Cc Aditya Pakki <[email protected]>
Cc Alex Deucher <[email protected]>

AFAICT, this patch is correct or at least does no harm. Handling of pm_runtime_get_sync() errors in the kernel seems to be inconsistent at best.

Thanks for the review, now dropped.

greg k-h

author maintainer
#62 lore raw

PATCH 24/190 Revert "drm/amdkfd: Fix reference count leaks."

In reply to Greg Kroah-Hartman

This reverts commit 20eca0123a35305e38b344d571cf32768854168c.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Felix Kuehling <[email protected]>
Cc Felix Kuehling <[email protected]>
Cc Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_topology.c +5 -15
index 0be72789ccbc..d3c3fa25c2cc 100644
@@ -637,10 +637,8 @@ static int kfd_build_sysfs_node_entry(struct kfd_topology_device *dev,
 
 	ret = kobject_init_and_add(dev->kobj_node, &node_type,
 			sys_props.kobj_nodes, "%d", id);
-	if (ret < 0) {
-		kobject_put(dev->kobj_node);
+	if (ret < 0)
 		return ret;
-	}
 
 	dev->kobj_mem = kobject_create_and_add("mem_banks", dev->kobj_node);
 	if (!dev->kobj_mem)
@@ -687,10 +685,8 @@ static int kfd_build_sysfs_node_entry(struct kfd_topology_device *dev,
 			return -ENOMEM;
 		ret = kobject_init_and_add(mem->kobj, &mem_type,
 				dev->kobj_mem, "%d", i);
-		if (ret < 0) {
-			kobject_put(mem->kobj);
+		if (ret < 0)
 			return ret;
-		}
 
 		mem->attr.name = "properties";
 		mem->attr.mode = KFD_SYSFS_FILE_MODE;
@@ -708,10 +704,8 @@ static int kfd_build_sysfs_node_entry(struct kfd_topology_device *dev,
 			return -ENOMEM;
 		ret = kobject_init_and_add(cache->kobj, &cache_type,
 				dev->kobj_cache, "%d", i);
-		if (ret < 0) {
-			kobject_put(cache->kobj);
+		if (ret < 0)
 			return ret;
-		}
 
 		cache->attr.name = "properties";
 		cache->attr.mode = KFD_SYSFS_FILE_MODE;
@@ -729,10 +723,8 @@ static int kfd_build_sysfs_node_entry(struct kfd_topology_device *dev,
 			return -ENOMEM;
 		ret = kobject_init_and_add(iolink->kobj, &iolink_type,
 				dev->kobj_iolink, "%d", i);
-		if (ret < 0) {
-			kobject_put(iolink->kobj);
+		if (ret < 0)
 			return ret;
-		}
 
 		iolink->attr.name = "properties";
 		iolink->attr.mode = KFD_SYSFS_FILE_MODE;
@@ -811,10 +803,8 @@ static int kfd_topology_update_sysfs(void)
 		ret = kobject_init_and_add(sys_props.kobj_topology,
 				&sysprops_type,  &kfd_device->kobj,
 				"topology");
-		if (ret < 0) {
-			kobject_put(sys_props.kobj_topology);
+		if (ret < 0)
 			return ret;
-		}
 
 		sys_props.kobj_nodes = kobject_create_and_add("nodes",
 				sys_props.kobj_topology);
Signature · 1 line
2.31.1
maintainer
#63 lore raw

Re: [PATCH 024/190] Revert "drm/amdkfd: Fix reference count leaks."

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 20eca0123a35305e38b344d571cf32768854168c.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 5 lines
Cc Qiushi Wu <[email protected]>
Cc Felix Kuehling <[email protected]>
Cc Felix Kuehling <[email protected]>
Cc Alex Deucher <[email protected]>

As far as I can tell, this patch was correct and should not be reverted.

Thanks,
  Felix

Quoted 68 lines
---
  drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 20 +++++---------------
  1 file changed, 5 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_topology.c +5 -15
index 0be72789ccbc..d3c3fa25c2cc 100644
@@ -637,10 +637,8 @@ static int kfd_build_sysfs_node_entry(struct kfd_topology_device *dev,
 
  	ret = kobject_init_and_add(dev->kobj_node, &node_type,
  			sys_props.kobj_nodes, "%d", id);
-	if (ret < 0) {
-		kobject_put(dev->kobj_node);
+	if (ret < 0)
  		return ret;
-	}
 
  	dev->kobj_mem = kobject_create_and_add("mem_banks", dev->kobj_node);
  	if (!dev->kobj_mem)
@@ -687,10 +685,8 @@ static int kfd_build_sysfs_node_entry(struct kfd_topology_device *dev,
  			return -ENOMEM;
  		ret = kobject_init_and_add(mem->kobj, &mem_type,
  				dev->kobj_mem, "%d", i);
-		if (ret < 0) {
-			kobject_put(mem->kobj);
+		if (ret < 0)
  			return ret;
-		}
 
  		mem->attr.name = "properties";
  		mem->attr.mode = KFD_SYSFS_FILE_MODE;
@@ -708,10 +704,8 @@ static int kfd_build_sysfs_node_entry(struct kfd_topology_device *dev,
  			return -ENOMEM;
  		ret = kobject_init_and_add(cache->kobj, &cache_type,
  				dev->kobj_cache, "%d", i);
-		if (ret < 0) {
-			kobject_put(cache->kobj);
+		if (ret < 0)
  			return ret;
-		}
 
  		cache->attr.name = "properties";
  		cache->attr.mode = KFD_SYSFS_FILE_MODE;
@@ -729,10 +723,8 @@ static int kfd_build_sysfs_node_entry(struct kfd_topology_device *dev,
  			return -ENOMEM;
  		ret = kobject_init_and_add(iolink->kobj, &iolink_type,
  				dev->kobj_iolink, "%d", i);
-		if (ret < 0) {
-			kobject_put(iolink->kobj);
+		if (ret < 0)
  			return ret;
-		}
 
  		iolink->attr.name = "properties";
  		iolink->attr.mode = KFD_SYSFS_FILE_MODE;
@@ -811,10 +803,8 @@ static int kfd_topology_update_sysfs(void)
  		ret = kobject_init_and_add(sys_props.kobj_topology,
  				&sysprops_type,  &kfd_device->kobj,
  				"topology");
-		if (ret < 0) {
-			kobject_put(sys_props.kobj_topology);
+		if (ret < 0)
  			return ret;
-		}
 
  		sys_props.kobj_nodes = kobject_create_and_add("nodes",
  				sys_props.kobj_topology);
author maintainer
#64 lore raw

Re: [PATCH 024/190] Revert "drm/amdkfd: Fix reference count leaks."

Quoted 17 lines · Felix Kuehling
Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 20eca0123a35305e38b344d571cf32768854168c.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 7 lines
Quoted 5 lines
Cc Qiushi Wu <[email protected]>
Cc Felix Kuehling <[email protected]>
Cc Felix Kuehling <[email protected]>
Cc Alex Deucher <[email protected]>

As far as I can tell, this patch was correct and should not be reverted.

Thanks for the review, now dropped.

greg k-h

author maintainer
#65 lore raw

PATCH 25/190 Revert "platform/chrome: cros_ec_ishtp: Fix a double-unlock issue"

In reply to Greg Kroah-Hartman

This reverts commit aaa3cbbac326c95308e315f1ab964a3369c4d07d.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Mathew King <[email protected]>
Cc Enric Balletbo i Serra <[email protected]>
---
 drivers/platform/chrome/cros_ec_ishtp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/platform/chrome/cros_ec_ishtp.c +1 -3
index f00107017318..d4f41d68232c 100644
@@ -677,10 +677,8 @@ static int cros_ec_ishtp_probe(struct ishtp_cl_device *cl_device)
 
 	/* Register croc_ec_dev mfd */
 	rv = cros_ec_dev_init(client_data);
-	if (rv) {
-		down_write(&init_lock);
+	if (rv)
 		goto end_cros_ec_dev_init_error;
-	}
 
 	return 0;
 
Signature · 1 line
2.31.1
#66 lore raw

Re: [PATCH 025/190] Revert "platform/chrome: cros_ec_ishtp: Fix a double-unlock issue"

Hi Greg,

Many thanks for the patchset and notice us to take attention about these patches.

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit aaa3cbbac326c95308e315f1ab964a3369c4d07d.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 4 lines
Cc Qiushi Wu <[email protected]>
Cc Mathew King <[email protected]>
Cc Enric Balletbo i Serra <[email protected]>

I've reviewed the patch again (also double checked with people involved in this driver) and I don't spot an obvious issue with the original patch. Without it, on error path, the read-write sempahore used, will be released without having held it before.

So it's IMO a valid fix that would have to be done the same way after revert.

Please don't revert it.

Thanks,
Enric

Quoted 21 lines
---
 drivers/platform/chrome/cros_ec_ishtp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/platform/chrome/cros_ec_ishtp.c +1 -3
index f00107017318..d4f41d68232c 100644
@@ -677,10 +677,8 @@ static int cros_ec_ishtp_probe(struct ishtp_cl_device *cl_device)
 
 	/* Register croc_ec_dev mfd */
 	rv = cros_ec_dev_init(client_data);
-	if (rv) {
-		down_write(&init_lock);
+	if (rv)
 		goto end_cros_ec_dev_init_error;
-	}
 
 	return 0;
 
author maintainer
#67 lore raw

Re: [PATCH 025/190] Revert "platform/chrome: cros_ec_ishtp: Fix a double-unlock issue"

Quoted 31 lines · Enric Balletbo i Serra

Hi Greg,

Many thanks for the patchset and notice us to take attention about these patches.

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit aaa3cbbac326c95308e315f1ab964a3369c4d07d.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 4 lines
Cc Qiushi Wu <[email protected]>
Cc Mathew King <[email protected]>
Cc Enric Balletbo i Serra <[email protected]>

I've reviewed the patch again (also double checked with people involved in this driver) and I don't spot an obvious issue with the original patch. Without it, on error path, the read-write sempahore used, will be released without having held it before.

Quoted 4 lines

So it's IMO a valid fix that would have to be done the same way after revert.

Please don't revert it.

Dropped from my patch series, thanks for the review.

greg k-h

author maintainer
#68 lore raw

PATCH 26/190 Revert "usb: dwc3: pci: Fix reference count leak in dwc3_pci_resume_work"

In reply to Greg Kroah-Hartman

This reverts commit 2655971ad4b34e97dd921df16bb0b08db9449df7.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Felipe Balbi <[email protected]>
---
 drivers/usb/dwc3/dwc3-pci.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/usb/dwc3/dwc3-pci.c +1 -3
index 4c5c6972124a..0c0619f7b1a7 100644
@@ -226,10 +226,8 @@ static void dwc3_pci_resume_work(struct work_struct *work)
 	int ret;
 
 	ret = pm_runtime_get_sync(&dwc3->dev);
-	if (ret) {
-		pm_runtime_put_sync_autosuspend(&dwc3->dev);
+	if (ret)
 		return;
-	}
 
 	pm_runtime_mark_last_busy(&dwc3->dev);
 	pm_runtime_put_sync_autosuspend(&dwc3->dev);
Signature · 1 line
2.31.1
#69 lore raw

Re: [PATCH 026/190] Revert "usb: dwc3: pci: Fix reference count leak in dwc3_pci_resume_work"

Hi,

Quoted 28 lines · Greg Kroah-Hartman

This reverts commit 2655971ad4b34e97dd921df16bb0b08db9449df7.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Felipe Balbi <[email protected]>
---
 drivers/usb/dwc3/dwc3-pci.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/usb/dwc3/dwc3-pci.c +0 -0
index 4c5c6972124a..0c0619f7b1a7 100644

drivers/usb/dwc3/dwc3-pci.c static void dwc3_pci_resume_work(struct work_struct *work) · line 232

Quoted 8 lines
drivers/usb/dwc3/dwc3-pci.c +1 -3
@@ -226,10 +226,8 @@ static void dwc3_pci_resume_work(struct work_struct *work)
 	int ret;
 
 	ret = pm_runtime_get_sync(&dwc3->dev);
-	if (ret) {
-		pm_runtime_put_sync_autosuspend(&dwc3->dev);
+	if (ret)
 		return;
-	}

this was a valid fix. pm_runtime_get_sync() leaves an unbalanced get on the runtime usage counter.

It's okay if you prefer to revert it and have a new review cycle for this, though.

Signature · 1 line
balbi
author maintainer
#70 lore raw

Re: [PATCH 026/190] Revert "usb: dwc3: pci: Fix reference count leak in dwc3_pci_resume_work"

Quoted 45 lines · Felipe Balbi

Hi,

Quoted 28 lines · Greg Kroah-Hartman

This reverts commit 2655971ad4b34e97dd921df16bb0b08db9449df7.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Felipe Balbi <[email protected]>
---
 drivers/usb/dwc3/dwc3-pci.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/usb/dwc3/dwc3-pci.c +0 -0
index 4c5c6972124a..0c0619f7b1a7 100644

drivers/usb/dwc3/dwc3-pci.c static void dwc3_pci_resume_work(struct work_struct *work) · line 232

Quoted 8 lines
drivers/usb/dwc3/dwc3-pci.c +1 -3
@@ -226,10 +226,8 @@ static void dwc3_pci_resume_work(struct work_struct *work)
 	int ret;
 
 	ret = pm_runtime_get_sync(&dwc3->dev);
-	if (ret) {
-		pm_runtime_put_sync_autosuspend(&dwc3->dev);
+	if (ret)
 		return;
-	}

this was a valid fix. pm_runtime_get_sync() leaves an unbalanced get on the runtime usage counter.

Quoted 2 lines

It's okay if you prefer to revert it and have a new review cycle for this, though.

I'll drop this revert now, thanks for the review.

greg k-h

author maintainer
#71 lore raw

PATCH 27/190 Revert "ASoC: rockchip: Fix a reference count leak."

In reply to Greg Kroah-Hartman

This reverts commit f141a422159a199f4c8dedb7e0df55b3b2cf16cd.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Heiko Stuebner <[email protected]>
Cc https
Cc Mark Brown <[email protected]>
---
 sound/soc/rockchip/rockchip_pdm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
sound/soc/rockchip/rockchip_pdm.c +1 -3
index 9295d648624e..c52e1dbf6dbe 100644
@@ -590,10 +590,8 @@ static int rockchip_pdm_resume(struct device *dev)
 	int ret;
 
 	ret = pm_runtime_get_sync(dev);
-	if (ret < 0) {
-		pm_runtime_put(dev);
+	if (ret < 0)
 		return ret;
-	}
 
 	ret = regcache_sync(pdm->regmap);
 
Signature · 1 line
2.31.1
author maintainer
#72 lore raw

Re: [PATCH 027/190] Revert "ASoC: rockchip: Fix a reference count leak."

Quoted 44 lines · Greg Kroah-Hartman

This reverts commit f141a422159a199f4c8dedb7e0df55b3b2cf16cd.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Heiko Stuebner <[email protected]>
Cc https
Cc Mark Brown <[email protected]>
---
 sound/soc/rockchip/rockchip_pdm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
sound/soc/rockchip/rockchip_pdm.c +1 -3
index 9295d648624e..c52e1dbf6dbe 100644
@@ -590,10 +590,8 @@ static int rockchip_pdm_resume(struct device *dev)
 	int ret;
 
 	ret = pm_runtime_get_sync(dev);
-	if (ret < 0) {
-		pm_runtime_put(dev);
+	if (ret < 0)
 		return ret;
-	}
 
 	ret = regcache_sync(pdm->regmap);
 
Signature · 1 line
2.31.1

Looks correct, dropping.

greg k-h

author maintainer
#73 lore raw

PATCH 28/190 Revert "RDMA/rvt: Fix potential memory leak caused by rvt_alloc_rq"

In reply to Greg Kroah-Hartman

This reverts commit 90a239ee25fa3a483facec3de7c144361a3d3a51.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc https
Cc Aditya Pakki <[email protected]>
Cc Dennis Dalessandro <[email protected]>
Cc Jason Gunthorpe <[email protected]>
---
 drivers/infiniband/sw/rdmavt/qp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/infiniband/sw/rdmavt/qp.c +2 -4
index 9d13db68283c..5476dd37e421 100644
@@ -1207,7 +1207,7 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd,
 		err = alloc_ud_wq_attr(qp, rdi->dparms.node);
 		if (err) {
 			ret = (ERR_PTR(err));
-			goto bail_rq_rvt;
+			goto bail_driver_priv;
 		}
 
 		if (init_attr->create_flags & IB_QP_CREATE_NETDEV_USE)
@@ -1317,10 +1317,8 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd,
 	rvt_free_qpn(&rdi->qp_dev->qpn_table, qp->ibqp.qp_num);
 
 bail_rq_wq:
-	free_ud_wq_attr(qp);
-
-bail_rq_rvt:
 	rvt_free_rq(&qp->r_rq);
+	free_ud_wq_attr(qp);
 
 bail_driver_priv:
 	rdi->driver_f.qp_priv_free(rdi, qp);
Signature · 1 line
2.31.1
maintainer
#74 lore raw

Re: [PATCH 028/190] Revert "RDMA/rvt: Fix potential memory leak caused by rvt_alloc_rq"

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 90a239ee25fa3a483facec3de7c144361a3d3a51.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 8 lines
Cc https
Cc Aditya Pakki <[email protected]>
Cc Dennis Dalessandro <[email protected]>
Cc Jason Gunthorpe <[email protected]>
---
 drivers/infiniband/sw/rdmavt/qp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

While I don't see anything obviously wrong here it is tricky enough that I would revert it unless Dennis says otherwise.

Jason

author maintainer
#75 lore raw

Re: [PATCH 028/190] Revert "RDMA/rvt: Fix potential memory leak caused by rvt_alloc_rq"

Quoted 26 lines · Jason Gunthorpe
Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 90a239ee25fa3a483facec3de7c144361a3d3a51.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 8 lines
Cc https
Cc Aditya Pakki <[email protected]>
Cc Dennis Dalessandro <[email protected]>
Cc Jason Gunthorpe <[email protected]>
---
 drivers/infiniband/sw/rdmavt/qp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
Quoted 2 lines

While I don't see anything obviously wrong here it is tricky enough that I would revert it unless Dennis says otherwise.

Thanks for the review, now dropped.

greg k-h

author maintainer
#76 lore raw

PATCH 29/190 Revert "EDAC: Fix reference count leaks"

In reply to Greg Kroah-Hartman

This reverts commit 17ed808ad243192fb923e4e653c1338d3ba06207.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc https
Cc https
---
 drivers/edac/edac_device_sysfs.c | 1 -
 drivers/edac/edac_pci_sysfs.c    | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/edac/edac_device_sysfs.c +0 -1
index 5e7593753799..0e7ea3591b78 100644
@@ -275,7 +275,6 @@ int edac_device_register_sysfs_main_kobj(struct edac_device_ctl_info *edac_dev)
 
 	/* Error exit stack */
 err_kobj_reg:
-	kobject_put(&edac_dev->kobj);
 	module_put(edac_dev->owner);
 
 err_out:
drivers/edac/edac_pci_sysfs.c +1 -1
index 53042af7262e..72c9eb9fdffb 100644
@@ -386,7 +386,7 @@ static int edac_pci_main_kobj_setup(void)
 
 	/* Error unwind statck */
 kobject_init_and_add_fail:
-	kobject_put(edac_pci_top_main_kobj);
+	kfree(edac_pci_top_main_kobj);
 
 kzalloc_fail:
 	module_put(THIS_MODULE);
Signature · 1 line
2.31.1
#77 lore raw

Re: [PATCH 029/190] Revert "EDAC: Fix reference count leaks"

Quoted 44 lines · Greg Kroah-Hartman

This reverts commit 17ed808ad243192fb923e4e653c1338d3ba06207.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc https
Cc https
---
 drivers/edac/edac_device_sysfs.c | 1 -
 drivers/edac/edac_pci_sysfs.c    | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/edac/edac_device_sysfs.c +0 -1
index 5e7593753799..0e7ea3591b78 100644
@@ -275,7 +275,6 @@ int edac_device_register_sysfs_main_kobj(struct edac_device_ctl_info *edac_dev)
 
 	/* Error exit stack */
 err_kobj_reg:
-	kobject_put(&edac_dev->kobj);
 	module_put(edac_dev->owner);
 
 err_out:
drivers/edac/edac_pci_sysfs.c +0 -0
index 53042af7262e..72c9eb9fdffb 100644

drivers/edac/edac_pci_sysfs.c static int edac_pci_main_kobj_setup(void) · line 392

Quoted 8 lines
drivers/edac/edac_pci_sysfs.c +1 -1
@@ -386,7 +386,7 @@ static int edac_pci_main_kobj_setup(void)
 
 	/* Error unwind statck */
 kobject_init_and_add_fail:
-	kobject_put(edac_pci_top_main_kobj);
+	kfree(edac_pci_top_main_kobj);
 
 kzalloc_fail:
 	module_put(THIS_MODULE);

That one is actually correct.

AFAIR, that was a reaction to kobject_init_and_add()'s comment saying users should do kobject_put() when that function fails.

So the added kobject_put() would make sure the ->release method is called which will kfree the kobject and drop the module reference. And both ->release methods don't do anything else so there are no side effects from it like with other cases earlier today.

So yeah, that one could stay in.

Can't say I didn't spend some time staring at this today again, thanks to this "experiment". :-\

Thx.

Signature · 4 lines
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
author maintainer
#78 lore raw

Re: [PATCH 029/190] Revert "EDAC: Fix reference count leaks"

Quoted 59 lines · Borislav Petkov
Quoted 44 lines · Greg Kroah-Hartman

This reverts commit 17ed808ad243192fb923e4e653c1338d3ba06207.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc https
Cc https
---
 drivers/edac/edac_device_sysfs.c | 1 -
 drivers/edac/edac_pci_sysfs.c    | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/edac/edac_device_sysfs.c +0 -1
index 5e7593753799..0e7ea3591b78 100644
@@ -275,7 +275,6 @@ int edac_device_register_sysfs_main_kobj(struct edac_device_ctl_info *edac_dev)
 
 	/* Error exit stack */
 err_kobj_reg:
-	kobject_put(&edac_dev->kobj);
 	module_put(edac_dev->owner);
 
 err_out:
drivers/edac/edac_pci_sysfs.c +0 -0
index 53042af7262e..72c9eb9fdffb 100644

drivers/edac/edac_pci_sysfs.c static int edac_pci_main_kobj_setup(void) · line 392

Quoted 8 lines
drivers/edac/edac_pci_sysfs.c +1 -1
@@ -386,7 +386,7 @@ static int edac_pci_main_kobj_setup(void)
 
 	/* Error unwind statck */
 kobject_init_and_add_fail:
-	kobject_put(edac_pci_top_main_kobj);
+	kfree(edac_pci_top_main_kobj);
 
 kzalloc_fail:
 	module_put(THIS_MODULE);

That one is actually correct.

AFAIR, that was a reaction to kobject_init_and_add()'s comment saying users should do kobject_put() when that function fails.

Quoted 6 lines

So the added kobject_put() would make sure the ->release method is called which will kfree the kobject and drop the module reference. And both ->release methods don't do anything else so there are no side effects from it like with other cases earlier today.

So yeah, that one could stay in.

Thanks for the review, now dropping.

greg k-h

author maintainer
#79 lore raw

PATCH 30/190 Revert "ASoC: tegra: Fix reference count leaks."

In reply to Greg Kroah-Hartman

This reverts commit deca195383a6085be62cb453079e03e04d618d6e.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Jon Hunter <[email protected]>
Cc https
Cc Mark Brown <[email protected]>
---
 sound/soc/tegra/tegra30_ahub.c | 4 +---
 sound/soc/tegra/tegra30_i2s.c  | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)
sound/soc/tegra/tegra30_ahub.c +1 -3
index 9ef05ca4f6c4..b116b05e4e72 100644
@@ -657,10 +657,8 @@ static int tegra30_ahub_resume(struct device *dev)
 	int ret;
 
 	ret = pm_runtime_get_sync(dev);
-	if (ret < 0) {
-		pm_runtime_put(dev);
+	if (ret < 0)
 		return ret;
-	}
 	ret = regcache_sync(ahub->regmap_ahub);
 	ret |= regcache_sync(ahub->regmap_apbif);
 	pm_runtime_put(dev);
sound/soc/tegra/tegra30_i2s.c +1 -3
index 6740df541508..3187a0f0c07a 100644
@@ -567,10 +567,8 @@ static int tegra30_i2s_resume(struct device *dev)
 	int ret;
 
 	ret = pm_runtime_get_sync(dev);
-	if (ret < 0) {
-		pm_runtime_put(dev);
+	if (ret < 0)
 		return ret;
-	}
 	ret = regcache_sync(i2s->regmap);
 	pm_runtime_put(dev);
 
Signature · 1 line
2.31.1
author maintainer
#80 lore raw

Re: [PATCH 030/190] Revert "ASoC: tegra: Fix reference count leaks."

Quoted 61 lines · Greg Kroah-Hartman

This reverts commit deca195383a6085be62cb453079e03e04d618d6e.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Jon Hunter <[email protected]>
Cc https
Cc Mark Brown <[email protected]>
---
 sound/soc/tegra/tegra30_ahub.c | 4 +---
 sound/soc/tegra/tegra30_i2s.c  | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)
sound/soc/tegra/tegra30_ahub.c +1 -3
index 9ef05ca4f6c4..b116b05e4e72 100644
@@ -657,10 +657,8 @@ static int tegra30_ahub_resume(struct device *dev)
 	int ret;
 
 	ret = pm_runtime_get_sync(dev);
-	if (ret < 0) {
-		pm_runtime_put(dev);
+	if (ret < 0)
 		return ret;
-	}
 	ret = regcache_sync(ahub->regmap_ahub);
 	ret |= regcache_sync(ahub->regmap_apbif);
 	pm_runtime_put(dev);
sound/soc/tegra/tegra30_i2s.c +1 -3
index 6740df541508..3187a0f0c07a 100644
@@ -567,10 +567,8 @@ static int tegra30_i2s_resume(struct device *dev)
 	int ret;
 
 	ret = pm_runtime_get_sync(dev);
-	if (ret < 0) {
-		pm_runtime_put(dev);
+	if (ret < 0)
 		return ret;
-	}
 	ret = regcache_sync(i2s->regmap);
 	pm_runtime_put(dev);
 
Signature · 1 line
2.31.1

Looks correct, dropping.

greg k-h

author maintainer
#81 lore raw

PATCH 31/190 Revert "test_objagg: Fix potential memory leak in error handling"

In reply to Greg Kroah-Hartman

This reverts commit a6379f0ad6375a707e915518ecd5c2270afcd395.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc David S. Miller <[email protected]>
---
 lib/test_objagg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/test_objagg.c +2 -2
index da137939a410..72c1abfa154d 100644
@@ -979,10 +979,10 @@ static int test_hints_case(const struct hints_case *hints_case)
 err_world2_obj_get:
 	for (i--; i >= 0; i--)
 		world_obj_put(&world2, objagg, hints_case->key_ids[i]);
-	i = hints_case->key_ids_count;
+	objagg_hints_put(hints);
 	objagg_destroy(objagg2);
+	i = hints_case->key_ids_count;
 err_check_expect_hints_stats:
-	objagg_hints_put(hints);
 err_hints_get:
 err_check_expect_stats:
 err_world_obj_get:
Signature · 1 line
2.31.1
author maintainer
#82 lore raw

Re: [PATCH 031/190] Revert "test_objagg: Fix potential memory leak in error handling"

Quoted 43 lines · Greg Kroah-Hartman

This reverts commit a6379f0ad6375a707e915518ecd5c2270afcd395.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc David S. Miller <[email protected]>
---
 lib/test_objagg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/test_objagg.c +2 -2
index da137939a410..72c1abfa154d 100644
@@ -979,10 +979,10 @@ static int test_hints_case(const struct hints_case *hints_case)
 err_world2_obj_get:
 	for (i--; i >= 0; i--)
 		world_obj_put(&world2, objagg, hints_case->key_ids[i]);
-	i = hints_case->key_ids_count;
+	objagg_hints_put(hints);
 	objagg_destroy(objagg2);
+	i = hints_case->key_ids_count;
 err_check_expect_hints_stats:
-	objagg_hints_put(hints);
 err_hints_get:
 err_check_expect_stats:
 err_world_obj_get:
Signature · 1 line
2.31.1

This commit looks correct to me, so I will drop the revert.

greg k-h

author maintainer
#83 lore raw

PATCH 32/190 Revert "ASoC: img-parallel-out: Fix a reference count leak"

In reply to Greg Kroah-Hartman

This reverts commit 6b9fbb073636906eee9fe4d4c05a4f445b9e2a23.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc https
Cc Mark Brown <[email protected]>
---
 sound/soc/img/img-parallel-out.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
sound/soc/img/img-parallel-out.c +1 -3
index 4da49a42e854..5ddbe3a31c2e 100644
@@ -163,10 +163,8 @@ static int img_prl_out_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
 	}
 
 	ret = pm_runtime_get_sync(prl->dev);
-	if (ret < 0) {
-		pm_runtime_put_noidle(prl->dev);
+	if (ret < 0)
 		return ret;
-	}
 
 	reg = img_prl_out_readl(prl, IMG_PRL_OUT_CTL);
 	reg = (reg & ~IMG_PRL_OUT_CTL_EDGE_MASK) | control_set;
Signature · 1 line
2.31.1
author maintainer
#84 lore raw

Re: [PATCH 032/190] Revert "ASoC: img-parallel-out: Fix a reference count leak"

Quoted 43 lines · Greg Kroah-Hartman

This reverts commit 6b9fbb073636906eee9fe4d4c05a4f445b9e2a23.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc https
Cc Mark Brown <[email protected]>
---
 sound/soc/img/img-parallel-out.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
sound/soc/img/img-parallel-out.c +1 -3
index 4da49a42e854..5ddbe3a31c2e 100644
@@ -163,10 +163,8 @@ static int img_prl_out_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
 	}
 
 	ret = pm_runtime_get_sync(prl->dev);
-	if (ret < 0) {
-		pm_runtime_put_noidle(prl->dev);
+	if (ret < 0)
 		return ret;
-	}
 
 	reg = img_prl_out_readl(prl, IMG_PRL_OUT_CTL);
 	reg = (reg & ~IMG_PRL_OUT_CTL_EDGE_MASK) | control_set;
Signature · 1 line
2.31.1

Looks correct, dropping.

author maintainer
#85 lore raw

PATCH 33/190 Revert "ASoC: img: Fix a reference count leak in img_i2s_in_set_fmt"

In reply to Greg Kroah-Hartman

This reverts commit c4c59b95b7f7d4cef5071b151be2dadb33f3287b.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc https
Cc Mark Brown <[email protected]>
---
 sound/soc/img/img-i2s-in.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
sound/soc/img/img-i2s-in.c +1 -3
index 0843235d73c9..e30b66b94bf6 100644
@@ -343,10 +343,8 @@ static int img_i2s_in_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
 	chan_control_mask = IMG_I2S_IN_CH_CTL_CLK_TRANS_MASK;
 
 	ret = pm_runtime_get_sync(i2s->dev);
-	if (ret < 0) {
-		pm_runtime_put_noidle(i2s->dev);
+	if (ret < 0)
 		return ret;
-	}
 
 	for (i = 0; i < i2s->active_channels; i++)
 		img_i2s_in_ch_disable(i2s, i);
Signature · 1 line
2.31.1
author maintainer
#86 lore raw

Re: [PATCH 033/190] Revert "ASoC: img: Fix a reference count leak in img_i2s_in_set_fmt"

Quoted 43 lines · Greg Kroah-Hartman

This reverts commit c4c59b95b7f7d4cef5071b151be2dadb33f3287b.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc https
Cc Mark Brown <[email protected]>
---
 sound/soc/img/img-i2s-in.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
sound/soc/img/img-i2s-in.c +1 -3
index 0843235d73c9..e30b66b94bf6 100644
@@ -343,10 +343,8 @@ static int img_i2s_in_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
 	chan_control_mask = IMG_I2S_IN_CH_CTL_CLK_TRANS_MASK;
 
 	ret = pm_runtime_get_sync(i2s->dev);
-	if (ret < 0) {
-		pm_runtime_put_noidle(i2s->dev);
+	if (ret < 0)
 		return ret;
-	}
 
 	for (i = 0; i < i2s->active_channels; i++)
 		img_i2s_in_ch_disable(i2s, i);
Signature · 1 line
2.31.1

Looks correct, dropping.

greg k-h

author maintainer
#87 lore raw

PATCH 34/190 Revert "efi/esrt: Fix reference count leak in esre_create_sysfs_entry."

In reply to Greg Kroah-Hartman

This reverts commit 4ddf4739be6e375116c375f0a68bf3893ffcee21.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc https
Cc Ard Biesheuvel <[email protected]>
---
 drivers/firmware/efi/esrt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/esrt.c +1 -1
index d5915272141f..e3d692696583 100644
@@ -181,7 +181,7 @@ static int esre_create_sysfs_entry(void *esre, int entry_num)
 		rc = kobject_init_and_add(&entry->kobj, &esre1_ktype, NULL,
 					  "entry%d", entry_num);
 		if (rc) {
-			kobject_put(&entry->kobj);
+			kfree(entry);
 			return rc;
 		}
 	}
Signature · 1 line
2.31.1
author maintainer
#88 lore raw

Re: [PATCH 034/190] Revert "efi/esrt: Fix reference count leak in esre_create_sysfs_entry."

Quoted 40 lines · Greg Kroah-Hartman

This reverts commit 4ddf4739be6e375116c375f0a68bf3893ffcee21.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc https
Cc Ard Biesheuvel <[email protected]>
---
 drivers/firmware/efi/esrt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/esrt.c +1 -1
index d5915272141f..e3d692696583 100644
@@ -181,7 +181,7 @@ static int esre_create_sysfs_entry(void *esre, int entry_num)
 		rc = kobject_init_and_add(&entry->kobj, &esre1_ktype, NULL,
 					  "entry%d", entry_num);
 		if (rc) {
-			kobject_put(&entry->kobj);
+			kfree(entry);
 			return rc;
 		}
 	}
Signature · 1 line
2.31.1

Looks correct so I'm dropping the revert.

greg k-h

maintainer
#89 lore raw

Re: [PATCH 034/190] Revert "efi/esrt: Fix reference count leak in esre_create_sysfs_entry."

Quoted 45 lines · Greg Kroah-Hartman
Quoted 38 lines · Greg Kroah-Hartman

This reverts commit 4ddf4739be6e375116c375f0a68bf3893ffcee21.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc https
Cc Ard Biesheuvel <[email protected]>
---
 drivers/firmware/efi/esrt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/esrt.c +1 -2
index d5915272141f..e3d692696583 100644
@@ -181,7 +181,7 @@ static int esre_create_sysfs_entry(void *esre, int entry_num)
              rc = kobject_init_and_add(&entry->kobj, &esre1_ktype, NULL,
                                        "entry%d", entry_num);
              if (rc) {
-                     kobject_put(&entry->kobj);
+                     kfree(entry);
                      return rc;
              }
      }
--
Quoted 2 lines

2.31.1

Looks correct so I'm dropping the revert.

Quoted 1 line

greg k-h

Agreed.

author maintainer
#90 lore raw

PATCH 35/190 Revert "scsi: iscsi: Fix reference count leak in iscsi_boot_create_kobj"

In reply to Greg Kroah-Hartman

This reverts commit 0267ffce562c8bbf9b57ebe0e38445ad04972890.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc https
Cc Lee Duncan <[email protected]>
Cc Qiushi Wu <[email protected]>
Cc Martin K. Petersen <[email protected]>
---
 drivers/scsi/iscsi_boot_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/iscsi_boot_sysfs.c +1 -1
index a64abe38db2d..e4857b728033 100644
@@ -352,7 +352,7 @@ iscsi_boot_create_kobj(struct iscsi_boot_kset *boot_kset,
 	boot_kobj->kobj.kset = boot_kset->kset;
 	if (kobject_init_and_add(&boot_kobj->kobj, &iscsi_boot_ktype,
 				 NULL, name, index)) {
-		kobject_put(&boot_kobj->kobj);
+		kfree(boot_kobj);
 		return NULL;
 	}
 	boot_kobj->data = data;
Signature · 1 line
2.31.1
author maintainer
#91 lore raw

Re: [PATCH 035/190] Revert "scsi: iscsi: Fix reference count leak in iscsi_boot_create_kobj"

Quoted 41 lines · Greg Kroah-Hartman

This reverts commit 0267ffce562c8bbf9b57ebe0e38445ad04972890.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc https
Cc Lee Duncan <[email protected]>
Cc Qiushi Wu <[email protected]>
Cc Martin K. Petersen <[email protected]>
---
 drivers/scsi/iscsi_boot_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/iscsi_boot_sysfs.c +1 -1
index a64abe38db2d..e4857b728033 100644
@@ -352,7 +352,7 @@ iscsi_boot_create_kobj(struct iscsi_boot_kset *boot_kset,
 	boot_kobj->kobj.kset = boot_kset->kset;
 	if (kobject_init_and_add(&boot_kobj->kobj, &iscsi_boot_ktype,
 				 NULL, name, index)) {
-		kobject_put(&boot_kobj->kobj);
+		kfree(boot_kobj);
 		return NULL;
 	}
 	boot_kobj->data = data;
Signature · 1 line
2.31.1

Looks correct so I'll drop this revert.

thanks,

greg k-h

author maintainer
#92 lore raw

PATCH 36/190 Revert "vfio/mdev: Fix reference count leak in add_mdev_supported_type"

In reply to Greg Kroah-Hartman

This reverts commit aa8ba13cae3134b8ef1c1b6879f66372531da738.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Cornelia Huck <[email protected]>
Cc Kirti Wankhede <[email protected]>
Cc Alex Williamson <[email protected]>
---
 drivers/vfio/mdev/mdev_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vfio/mdev/mdev_sysfs.c +1 -1
index 917fd84c1c6f..8ad14e5c02bf 100644
@@ -110,7 +110,7 @@ static struct mdev_type *add_mdev_supported_type(struct mdev_parent *parent,
 				   "%s-%s", dev_driver_string(parent->dev),
 				   group->name);
 	if (ret) {
-		kobject_put(&type->kobj);
+		kfree(type);
 		return ERR_PTR(ret);
 	}
 
Signature · 1 line
2.31.1
maintainer
#93 lore raw

Re: [PATCH 036/190] Revert "vfio/mdev: Fix reference count leak in add_mdev_supported_type"

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit aa8ba13cae3134b8ef1c1b6879f66372531da738.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 8 lines
Cc Qiushi Wu <[email protected]>
Cc Cornelia Huck <[email protected]>
Cc Kirti Wankhede <[email protected]>
Cc Alex Williamson <[email protected]>
---
 drivers/vfio/mdev/mdev_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

I recently audited all of this mdev stuff, the original patch is OK, though I would have written it with a goto. Please don't revert it.

Jason

#94 lore raw

Re: [PATCH 036/190] Revert "vfio/mdev: Fix reference count leak in add_mdev_supported_type"

Quoted 26 lines · On Wed, 21 Apr 2021 15:36:34 -0300 Jason Gunthorpe <[email protected]> wrote:
Quoted 16 lines · Greg Kroah-Hartman

This reverts commit aa8ba13cae3134b8ef1c1b6879f66372531da738.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 8 lines
Cc Qiushi Wu <[email protected]>
Cc Cornelia Huck <[email protected]>
Cc Kirti Wankhede <[email protected]>
Cc Alex Williamson <[email protected]>
---
 drivers/vfio/mdev/mdev_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)  
Quoted 2 lines

I recently audited all of this mdev stuff, the original patch is OK, though I would have written it with a goto. Please don't revert it.

Agreed, the original commit looks correct. Thanks,

Alex

author maintainer
#95 lore raw

Re: [PATCH 036/190] Revert "vfio/mdev: Fix reference count leak in add_mdev_supported_type"

Quoted 29 lines · Alex Williamson
Quoted 26 lines · On Wed, 21 Apr 2021 15:36:34 -0300 Jason Gunthorpe <[email protected]> wrote:
Quoted 24 lines · Greg Kroah-Hartman

This reverts commit aa8ba13cae3134b8ef1c1b6879f66372531da738.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Cornelia Huck <[email protected]>
Cc Kirti Wankhede <[email protected]>
Cc Alex Williamson <[email protected]>
---
 drivers/vfio/mdev/mdev_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)  
Quoted 4 lines
Quoted 2 lines

I recently audited all of this mdev stuff, the original patch is OK, though I would have written it with a goto. Please don't revert it.

Agreed, the original commit looks correct. Thanks,

Thanks to both of you for the review, I'll drop my revert from my tree.

greg k-h

author maintainer
#96 lore raw

PATCH 37/190 Revert "RDMA/core: Fix several reference count leaks."

In reply to Greg Kroah-Hartman

This reverts commit 0b8e125e213204508e1b3c4bdfe69713280b7abd.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc https
Cc Qiushi Wu <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Jason Gunthorpe <[email protected]>
---
 drivers/infiniband/core/sysfs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/infiniband/core/sysfs.c +5 -5
index b8abb30f80df..1ff580362a7c 100644
@@ -1076,7 +1076,8 @@ static int add_port(struct ib_core_device *coredev, int port_num)
 				   coredev->ports_kobj,
 				   "%d", port_num);
 	if (ret) {
-		goto err_put;
+		kfree(p);
+		return ret;
 	}
 
 	p->gid_attr_group = kzalloc(sizeof(*p->gid_attr_group), GFP_KERNEL);
@@ -1089,7 +1090,8 @@ static int add_port(struct ib_core_device *coredev, int port_num)
 	ret = kobject_init_and_add(&p->gid_attr_group->kobj, &gid_attr_type,
 				   &p->kobj, "gid_attrs");
 	if (ret) {
-		goto err_put_gid_attrs;
+		kfree(p->gid_attr_group);
+		goto err_put;
 	}
 
 	if (device->ops.process_mad && is_full_dev) {
@@ -1452,10 +1454,8 @@ int ib_port_register_module_stat(struct ib_device *device, u8 port_num,
 
 		ret = kobject_init_and_add(kobj, ktype, &port->kobj, "%s",
 					   name);
-		if (ret) {
-			kobject_put(kobj);
+		if (ret)
 			return ret;
-		}
 	}
 
 	return 0;
Signature · 1 line
2.31.1
maintainer
#97 lore raw

Re: [PATCH 037/190] Revert "RDMA/core: Fix several reference count leaks."

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 0b8e125e213204508e1b3c4bdfe69713280b7abd.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 8 lines
Cc https
Cc Qiushi Wu <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Jason Gunthorpe <[email protected]>
---
 drivers/infiniband/core/sysfs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

The original commit is certainly moving things closer to being correct but I'm concerned the entire area is still not bug free, it will take me some time to check the whole code. Reverting seems reasonable for now

Jason

author maintainer
#98 lore raw

Re: [PATCH 037/190] Revert "RDMA/core: Fix several reference count leaks."

Quoted 26 lines · Jason Gunthorpe
Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 0b8e125e213204508e1b3c4bdfe69713280b7abd.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 8 lines
Cc https
Cc Qiushi Wu <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Jason Gunthorpe <[email protected]>
---
 drivers/infiniband/core/sysfs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Quoted 4 lines

The original commit is certainly moving things closer to being correct but I'm concerned the entire area is still not bug free, it will take me some time to check the whole code. Reverting seems reasonable for now

I just re-reviewed it, and it looks like the original commit is ok, so I will drop this.

But ugh, this is horrid code, you should NOT be dealing with "raw" kobjects here at all, just to try to make a subdirectory tree. That causes a total mess as this function shows and probably should be cleaned up sometime as obviously userspace tools are not properly seeing the objects you are creating here (hint, you can not put a kobject below a 'struct device' in the device tree and have udev and others see it properly...)

But that's a topic for a later time, dropping this now.

greg k-h

maintainer
#99 lore raw

Re: [PATCH 037/190] Revert "RDMA/core: Fix several reference count leaks."

Quoted 26 lines · Greg Kroah-Hartman
Quoted 25 lines · Jason Gunthorpe
Quoted 23 lines · Greg Kroah-Hartman

This reverts commit 0b8e125e213204508e1b3c4bdfe69713280b7abd.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc https
Cc Qiushi Wu <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Jason Gunthorpe <[email protected]>
 drivers/infiniband/core/sysfs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Quoted 7 lines
Quoted 4 lines

The original commit is certainly moving things closer to being correct but I'm concerned the entire area is still not bug free, it will take me some time to check the whole code. Reverting seems reasonable for now

I just re-reviewed it, and it looks like the original commit is ok, so I will drop this.

This was what I thought too when I originally applied it..

Quoted 7 lines

But ugh, this is horrid code, you should NOT be dealing with "raw" kobjects here at all, just to try to make a subdirectory tree. That causes a total mess as this function shows and probably should be cleaned up sometime as obviously userspace tools are not properly seeing the objects you are creating here (hint, you can not put a kobject below a 'struct device' in the device tree and have udev and others see it properly...)

We've talked about this specifically before:

http://lore.kernel.org/r/[email protected]

I still don't understand what you mean by "udev sees it properly", as above, all the tests I thought of look OK.

It is uABI at this point that real userspace software relies on, so we can't change the sysfs paths. If there is a more right way to code it then let me know I can have a go - Kees also recently found some bad stuff here I hope to get to soon.

Jason

author maintainer
#100 lore raw

Re: [PATCH 037/190] Revert "RDMA/core: Fix several reference count leaks."

Quoted 45 lines · Jason Gunthorpe
Quoted 26 lines · Greg Kroah-Hartman
Quoted 25 lines · Jason Gunthorpe
Quoted 23 lines · Greg Kroah-Hartman

This reverts commit 0b8e125e213204508e1b3c4bdfe69713280b7abd.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc https
Cc Qiushi Wu <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Jason Gunthorpe <[email protected]>
 drivers/infiniband/core/sysfs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Quoted 7 lines
Quoted 4 lines

The original commit is certainly moving things closer to being correct but I'm concerned the entire area is still not bug free, it will take me some time to check the whole code. Reverting seems reasonable for now

I just re-reviewed it, and it looks like the original commit is ok, so I will drop this.

This was what I thought too when I originally applied it..

Quoted 7 lines

But ugh, this is horrid code, you should NOT be dealing with "raw" kobjects here at all, just to try to make a subdirectory tree. That causes a total mess as this function shows and probably should be cleaned up sometime as obviously userspace tools are not properly seeing the objects you are creating here (hint, you can not put a kobject below a 'struct device' in the device tree and have udev and others see it properly...)

Quoted 6 lines

We've talked about this specifically before:

http://lore.kernel.org/r/[email protected]

I still don't understand what you mean by "udev sees it properly", as above, all the tests I thought of look OK.

Can you query the udev database to see the attribute values?

Quoted 4 lines

It is uABI at this point that real userspace software relies on, so we can't change the sysfs paths. If there is a more right way to code it then let me know I can have a go - Kees also recently found some bad stuff here I hope to get to soon.

It's on my long "list of things to get to eventually"...

As you say, it's uABI for now, so odds are nothing can be changed. It's just no fun for when other subsystems want to do this same thing, they point at this code and say "see, they did it!" :)

thanks,

greg k-h

maintainer
#101 lore raw

Re: [PATCH 037/190] Revert "RDMA/core: Fix several reference count leaks."

Quoted 8 lines · Greg Kroah-Hartman
Quoted 6 lines

We've talked about this specifically before:

http://lore.kernel.org/r/[email protected]

I still don't understand what you mean by "udev sees it properly", as above, all the tests I thought of look OK.

Can you query the udev database to see the attribute values?

It appears so unless I misunderstand your ask:

$ udevadm info -a /sys/class/infiniband/ibp0s9
    ATTR{ports/1/cm_rx_duplicates/dreq}=="0"
Quoted 3 lines

As you say, it's uABI for now, so odds are nothing can be changed. It's just no fun for when other subsystems want to do this same thing, they point at this code and say "see, they did it!" :)

Are you sure we shouldn't just formally support this?

What is the exact technical blocker?

Jason

author maintainer
#102 lore raw

Re: [PATCH 037/190] Revert "RDMA/core: Fix several reference count leaks."

Quoted 9 lines · Jason Gunthorpe
Quoted 7 lines · Greg Kroah-Hartman
Quoted 6 lines

We've talked about this specifically before:

http://lore.kernel.org/r/[email protected]

I still don't understand what you mean by "udev sees it properly", as above, all the tests I thought of look OK.

Quoted 6 lines
Quoted 1 line

Can you query the udev database to see the attribute values?

It appears so unless I misunderstand your ask:

$ udevadm info -a /sys/class/infiniband/ibp0s9
    ATTR{ports/1/cm_rx_duplicates/dreq}=="0"

That works? Nice, I didn't think it did.

But what about the uevent that fired for "1", isn't there attibutes assigned to it that udev ignores?

Quoted 7 lines
Quoted 3 lines

As you say, it's uABI for now, so odds are nothing can be changed. It's just no fun for when other subsystems want to do this same thing, they point at this code and say "see, they did it!" :)

Are you sure we shouldn't just formally support this?

What is the exact technical blocker?

Placing a raw kobject below a struct device breaks the "device tree" model. You now have devices with an arbritrary number of levels deep set of attributes, making it impossible to determine all attributes for a device in a simple way.

thanks,

greg k-h

maintainer
#103 lore raw

Re: [PATCH 037/190] Revert "RDMA/core: Fix several reference count leaks."

Quoted 14 lines · Greg Kroah-Hartman
Quoted 13 lines · Jason Gunthorpe
Quoted 8 lines · Greg Kroah-Hartman
Quoted 6 lines

We've talked about this specifically before:

http://lore.kernel.org/r/[email protected]

I still don't understand what you mean by "udev sees it properly", as above, all the tests I thought of look OK.

Can you query the udev database to see the attribute values?

It appears so unless I misunderstand your ask:

Quoted 7 lines
Quoted 2 lines
$ udevadm info -a /sys/class/infiniband/ibp0s9
    ATTR{ports/1/cm_rx_duplicates/dreq}=="0"

That works? Nice, I didn't think it did.

But what about the uevent that fired for "1", isn't there attibutes assigned to it that udev ignores?

I'm not completely familiar with uevents, but:

$ find /sys/class/infiniband/ibp0s9/ -name "uevent"
/sys/class/infiniband/ibp0s9/uevent
$ udevadm monitor & modprobe mlx5_ib
KERNEL[169.337295] add      /bus/auxiliary/drivers/mlx5_ib.multiport (drivers)
UDEV  [169.354621] add      /bus/auxiliary/drivers/mlx5_ib.multiport (drivers)
KERNEL[169.393088] add      /devices/pci0000:00/0000:00:09.0/infiniband_verbs/uverbs0 (infiniband_verbs)
KERNEL[169.393516] add      /devices/pci0000:00/0000:00:09.0/infiniband_mad/umad0 (infiniband_mad)
KERNEL[169.394040] add      /devices/pci0000:00/0000:00:09.0/infiniband_mad/issm0 (infiniband_mad)
UDEV  [169.395189] add      /devices/pci0000:00/0000:00:09.0/infiniband_verbs/uverbs0 (infiniband_verbs)
UDEV  [169.397812] add      /devices/pci0000:00/0000:00:09.0/infiniband_mad/issm0 (infiniband_mad)
KERNEL[169.407727] add      /devices/pci0000:00/0000:00:09.0/net/ib0 (net)
KERNEL[169.407851] add      /devices/pci0000:00/0000:00:09.0/net/ib0/queues/rx-0 (queues)
KERNEL[169.408113] add      /devices/pci0000:00/0000:00:09.0/net/ib0/queues/tx-0 (queues)
KERNEL[169.409059] add      /devices/pci0000:00/0000:00:09.0/infiniband/mlx5_0 (infiniband)
KERNEL[169.411483] bind     /devices/pci0000:00/0000:00:09.0/mlx5_core.rdma.0 (auxiliary)
KERNEL[169.411836] add      /bus/auxiliary/drivers/mlx5_ib.rdma (drivers)
KERNEL[169.411973] add      /module/mlx5_ib (module)
UDEV  [169.420570] bind     /devices/pci0000:00/0000:00:09.0/mlx5_core.rdma.0 (auxiliary)
UDEV  [169.421365] add      /bus/auxiliary/drivers/mlx5_ib.rdma (drivers)
UDEV  [169.447853] add      /module/mlx5_ib (module)
KERNEL[169.482293] move     /devices/pci0000:00/0000:00:09.0/infiniband/ibp0s9 (infiniband)
UDEV  [169.486395] add      /devices/pci0000:00/0000:00:09.0/infiniband/mlx5_0 (infiniband)
UDEV  [169.495193] move     /devices/pci0000:00/0000:00:09.0/infiniband/ibp0s9 (infiniband)
UDEV  [169.698592] add      /devices/pci0000:00/0000:00:09.0/net/ib0 (net)
UDEV  [169.700436] add      /devices/pci0000:00/0000:00:09.0/net/ib0/queues/rx-0 (queues)
UDEV  [169.700712] add      /devices/pci0000:00/0000:00:09.0/net/ib0/queues/tx-0 (queues)
UDEV  [170.042132] add      /devices/pci0000:00/0000:00:09.0/infiniband_mad/umad0 (infiniband_mad)

I don't see any uevents related to the nested attributes. Same on removal.

As far I can tell udev is working perfectly fine with 4 levels of attributes..

Quoted 4 lines

Placing a raw kobject below a struct device breaks the "device tree" model. You now have devices with an arbritrary number of levels deep set of attributes, making it impossible to determine all attributes for a device in a simple way.

Since udev is able to determine the attributes, does this mean at some point it abandoned the simple way and is now doing something complex?

Jason

#104 lore raw

Re: [PATCH 037/190] Revert "RDMA/core: Fix several reference count leaks."

Quoted 54 lines · Jason Gunthorpe
Quoted 14 lines · Greg Kroah-Hartman
Quoted 13 lines · Jason Gunthorpe
Quoted 8 lines · Greg Kroah-Hartman
Quoted 6 lines

We've talked about this specifically before:

http://lore.kernel.org/r/[email protected]

I still don't understand what you mean by "udev sees it properly", as above, all the tests I thought of look OK.

Can you query the udev database to see the attribute values?

It appears so unless I misunderstand your ask:

Quoted 7 lines
Quoted 2 lines
$ udevadm info -a /sys/class/infiniband/ibp0s9
    ATTR{ports/1/cm_rx_duplicates/dreq}=="0"

That works? Nice, I didn't think it did.

But what about the uevent that fired for "1", isn't there attibutes assigned to it that udev ignores?

I'm not completely familiar with uevents, but:

$ find /sys/class/infiniband/ibp0s9/ -name "uevent"
/sys/class/infiniband/ibp0s9/uevent
$ udevadm monitor & modprobe mlx5_ib
KERNEL[169.337295] add      /bus/auxiliary/drivers/mlx5_ib.multiport (drivers)
UDEV  [169.354621] add      /bus/auxiliary/drivers/mlx5_ib.multiport (drivers)
KERNEL[169.393088] add      /devices/pci0000:00/0000:00:09.0/infiniband_verbs/uverbs0 (infiniband_verbs)
KERNEL[169.393516] add      /devices/pci0000:00/0000:00:09.0/infiniband_mad/umad0 (infiniband_mad)
KERNEL[169.394040] add      /devices/pci0000:00/0000:00:09.0/infiniband_mad/issm0 (infiniband_mad)
UDEV  [169.395189] add      /devices/pci0000:00/0000:00:09.0/infiniband_verbs/uverbs0 (infiniband_verbs)
UDEV  [169.397812] add      /devices/pci0000:00/0000:00:09.0/infiniband_mad/issm0 (infiniband_mad)
KERNEL[169.407727] add      /devices/pci0000:00/0000:00:09.0/net/ib0 (net)
KERNEL[169.407851] add      /devices/pci0000:00/0000:00:09.0/net/ib0/queues/rx-0 (queues)
KERNEL[169.408113] add      /devices/pci0000:00/0000:00:09.0/net/ib0/queues/tx-0 (queues)
KERNEL[169.409059] add      /devices/pci0000:00/0000:00:09.0/infiniband/mlx5_0 (infiniband)
KERNEL[169.411483] bind     /devices/pci0000:00/0000:00:09.0/mlx5_core.rdma.0 (auxiliary)
KERNEL[169.411836] add      /bus/auxiliary/drivers/mlx5_ib.rdma (drivers)
KERNEL[169.411973] add      /module/mlx5_ib (module)
UDEV  [169.420570] bind     /devices/pci0000:00/0000:00:09.0/mlx5_core.rdma.0 (auxiliary)
UDEV  [169.421365] add      /bus/auxiliary/drivers/mlx5_ib.rdma (drivers)
UDEV  [169.447853] add      /module/mlx5_ib (module)
KERNEL[169.482293] move     /devices/pci0000:00/0000:00:09.0/infiniband/ibp0s9 (infiniband)
UDEV  [169.486395] add      /devices/pci0000:00/0000:00:09.0/infiniband/mlx5_0 (infiniband)
UDEV  [169.495193] move     /devices/pci0000:00/0000:00:09.0/infiniband/ibp0s9 (infiniband)
UDEV  [169.698592] add      /devices/pci0000:00/0000:00:09.0/net/ib0 (net)
UDEV  [169.700436] add      /devices/pci0000:00/0000:00:09.0/net/ib0/queues/rx-0 (queues)
UDEV  [169.700712] add      /devices/pci0000:00/0000:00:09.0/net/ib0/queues/tx-0 (queues)
UDEV  [170.042132] add      /devices/pci0000:00/0000:00:09.0/infiniband_mad/umad0 (infiniband_mad)
Quoted 2 lines

I don't see any uevents related to the nested attributes. Same on removal.

With some debugging, the uevent situation is like this..

When '1' is created as a kobj the code does call

		kobject_uevent(&port->kobj, KOBJ_ADD);

However DEBUG_KOBJECT reveals:

kobject: '1' (00000000d2367083): kobject_uevent_env: filter function caused the event to drop!

Which happens because
top_kobj == mlx5 (ie the struct device)
top_kobj->kset->uevent_ops == device_uevent_ops
get_ktype(kobj "1") == &port_type

Thus calling
dev_uevent_filter(mlx5 kset, kobj "1") == 0

As get_ktype(kobj "1") != &device_ktype

Which I read to mean these nested attributes under a struct device won't generate a uevent.

The uevent for the struct device is supressed until all the child kobjects are created and this explains how udev sees the child kobj's and doesn't see extra uevents to confuse it.

Jason

author maintainer
#105 lore raw

PATCH 38/190 Revert "cpuidle: Fix three reference count leaks"

In reply to Greg Kroah-Hartman

This reverts commit c343bf1ba5efcbf2266a1fe3baefec9cc82f867f.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
---
 drivers/cpuidle/sysfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/cpuidle/sysfs.c +3 -3
index 53ec9585ccd4..23a219cedbdb 100644
@@ -487,7 +487,7 @@ static int cpuidle_add_state_sysfs(struct cpuidle_device *device)
 		ret = kobject_init_and_add(&kobj->kobj, &ktype_state_cpuidle,
 					   &kdev->kobj, "state%d", i);
 		if (ret) {
-			kobject_put(&kobj->kobj);
+			kfree(kobj);
 			goto error_state;
 		}
 		cpuidle_add_s2idle_attr_group(kobj);
@@ -618,7 +618,7 @@ static int cpuidle_add_driver_sysfs(struct cpuidle_device *dev)
 	ret = kobject_init_and_add(&kdrv->kobj, &ktype_driver_cpuidle,
 				   &kdev->kobj, "driver");
 	if (ret) {
-		kobject_put(&kdrv->kobj);
+		kfree(kdrv);
 		return ret;
 	}
 
@@ -712,7 +712,7 @@ int cpuidle_add_sysfs(struct cpuidle_device *dev)
 	error = kobject_init_and_add(&kdev->kobj, &ktype_cpuidle, &cpu_dev->kobj,
 				   "cpuidle");
 	if (error) {
-		kobject_put(&kdev->kobj);
+		kfree(kdev);
 		return error;
 	}
 
Signature · 1 line
2.31.1
Acked-by on v1 38/190
#106 lore raw

Re: [PATCH 038/190] Revert "cpuidle: Fix three reference count leaks"

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit c343bf1ba5efcbf2266a1fe3baefec9cc82f867f.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 3 lines
Cc Qiushi Wu <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Quoted 35 lines
---
  drivers/cpuidle/sysfs.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/cpuidle/sysfs.c +3 -3
index 53ec9585ccd4..23a219cedbdb 100644
@@ -487,7 +487,7 @@ static int cpuidle_add_state_sysfs(struct cpuidle_device *device)
  		ret = kobject_init_and_add(&kobj->kobj, &ktype_state_cpuidle,
  					   &kdev->kobj, "state%d", i);
  		if (ret) {
-			kobject_put(&kobj->kobj);
+			kfree(kobj);
  			goto error_state;
  		}
  		cpuidle_add_s2idle_attr_group(kobj);
@@ -618,7 +618,7 @@ static int cpuidle_add_driver_sysfs(struct cpuidle_device *dev)
  	ret = kobject_init_and_add(&kdrv->kobj, &ktype_driver_cpuidle,
  				   &kdev->kobj, "driver");
  	if (ret) {
-		kobject_put(&kdrv->kobj);
+		kfree(kdrv);
  		return ret;
  	}
 
@@ -712,7 +712,7 @@ int cpuidle_add_sysfs(struct cpuidle_device *dev)
  	error = kobject_init_and_add(&kdev->kobj, &ktype_cpuidle, &cpu_dev->kobj,
  				   "cpuidle");
  	if (error) {
-		kobject_put(&kdev->kobj);
+		kfree(kdev);
  		return error;
  	}
 
author maintainer
#107 lore raw

Re: [PATCH 038/190] Revert "cpuidle: Fix three reference count leaks"

Quoted 49 lines · Rafael J. Wysocki
Quoted 16 lines · Greg Kroah-Hartman

This reverts commit c343bf1ba5efcbf2266a1fe3baefec9cc82f867f.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 3 lines
Cc Qiushi Wu <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Quoted 25 lines
---
  drivers/cpuidle/sysfs.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/cpuidle/sysfs.c +2 -2
index 53ec9585ccd4..23a219cedbdb 100644
@@ -487,7 +487,7 @@ static int cpuidle_add_state_sysfs(struct cpuidle_device *device)
  		ret = kobject_init_and_add(&kobj->kobj, &ktype_state_cpuidle,
  					   &kdev->kobj, "state%d", i);
  		if (ret) {
-			kobject_put(&kobj->kobj);
+			kfree(kobj);
  			goto error_state;
  		}
  		cpuidle_add_s2idle_attr_group(kobj);
@@ -618,7 +618,7 @@ static int cpuidle_add_driver_sysfs(struct cpuidle_device *dev)
  	ret = kobject_init_and_add(&kdrv->kobj, &ktype_driver_cpuidle,
  				   &kdev->kobj, "driver");
  	if (ret) {
-		kobject_put(&kdrv->kobj);
+		kfree(kdrv);
  		return ret;
  	}
Quoted 10 lines

drivers/cpuidle/sysfs.c int cpuidle_add_sysfs(struct cpuidle_device *dev) · line 717

Quoted 8 lines
drivers/cpuidle/sysfs.c +1 -1
@@ -712,7 +712,7 @@ int cpuidle_add_sysfs(struct cpuidle_device *dev)
  	error = kobject_init_and_add(&kdev->kobj, &ktype_cpuidle, &cpu_dev->kobj,
  				   "cpuidle");
  	if (error) {
-		kobject_put(&kdev->kobj);
+		kfree(kdev);
  		return error;
  	}

This looks correct so I'll drop the revert.

greg k-h

author maintainer
#108 lore raw

PATCH 39/190 Revert "iommu: Fix reference count leak in iommu_group_alloc."

In reply to Greg Kroah-Hartman

This reverts commit 7cc31613734c4870ae32f5265d576ef296621343.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc https
Cc Joerg Roedel <[email protected]>
---
 drivers/iommu/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/iommu.c +1 -1
index d0b0a15dba84..cd22cd0e6517 100644
@@ -596,7 +596,7 @@ struct iommu_group *iommu_group_alloc(void)
 				   NULL, "%d", group->id);
 	if (ret) {
 		ida_simple_remove(&iommu_group_ida, group->id);
-		kobject_put(&group->kobj);
+		kfree(group);
 		return ERR_PTR(ret);
 	}
 
Signature · 1 line
2.31.1
#109 lore raw

Re: [PATCH 039/190] Revert "iommu: Fix reference count leak in iommu_group_alloc."

Hi Greg,

Quoted 1 line · Greg Kroah-Hartman

This reverts commit 7cc31613734c4870ae32f5265d576ef296621343.

I reviewed this fix again and it looks still valid and correct to me. There is no need for a revert.

Thanks,

Joerg

author maintainer
#110 lore raw

Re: [PATCH 039/190] Revert "iommu: Fix reference count leak in iommu_group_alloc."

Quoted 7 lines · Joerg Roedel

Hi Greg,

Quoted 1 line · Greg Kroah-Hartman

This reverts commit 7cc31613734c4870ae32f5265d576ef296621343.

I reviewed this fix again and it looks still valid and correct to me. There is no need for a revert.

Wonderful, thanks for the review, I appreciate it!

greg k-h

author maintainer
#111 lore raw

PATCH 40/190 Revert "ACPI: CPPC: Fix reference count leak in acpi_cppc_processor_probe()"

In reply to Greg Kroah-Hartman

This reverts commit 4d8be4bc94f74bb7d096e1c2e44457b530d5a170.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc 4.10+ <[email protected]> # 4.10+
Cc Rafael J. Wysocki <[email protected]>
---
 drivers/acpi/cppc_acpi.c | 1 -
 1 file changed, 1 deletion(-)
drivers/acpi/cppc_acpi.c +0 -1
index 69057fcd2c04..42650b34e45e 100644
@@ -830,7 +830,6 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
 			"acpi_cppc");
 	if (ret) {
 		per_cpu(cpc_desc_ptr, pr->id) = NULL;
-		kobject_put(&cpc_ptr->kobj);
 		goto out_free;
 	}
 
Signature · 1 line
2.31.1
Acked-by on v1 40/190
#112 lore raw

Re: [PATCH 040/190] Revert "ACPI: CPPC: Fix reference count leak in acpi_cppc_processor_probe()"

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 4d8be4bc94f74bb7d096e1c2e44457b530d5a170.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 4 lines
Cc Qiushi Wu <[email protected]>
Cc 4.10+ <[email protected]> # 4.10+
Cc Rafael J. Wysocki <[email protected]>
Quoted 16 lines
---
  drivers/acpi/cppc_acpi.c | 1 -
  1 file changed, 1 deletion(-)
drivers/acpi/cppc_acpi.c +0 -1
index 69057fcd2c04..42650b34e45e 100644
@@ -830,7 +830,6 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
  			"acpi_cppc");
  	if (ret) {
  		per_cpu(cpc_desc_ptr, pr->id) = NULL;
-		kobject_put(&cpc_ptr->kobj);
  		goto out_free;
  	}
 
author maintainer
#113 lore raw

Re: [PATCH 040/190] Revert "ACPI: CPPC: Fix reference count leak in acpi_cppc_processor_probe()"

In reply to Greg Kroah-Hartman
Quoted 39 lines · Greg Kroah-Hartman

This reverts commit 4d8be4bc94f74bb7d096e1c2e44457b530d5a170.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc 4.10+ <[email protected]> # 4.10+
Cc Rafael J. Wysocki <[email protected]>
---
 drivers/acpi/cppc_acpi.c | 1 -
 1 file changed, 1 deletion(-)
drivers/acpi/cppc_acpi.c +0 -1
index 69057fcd2c04..42650b34e45e 100644
@@ -830,7 +830,6 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
 			"acpi_cppc");
 	if (ret) {
 		per_cpu(cpc_desc_ptr, pr->id) = NULL;
-		kobject_put(&cpc_ptr->kobj);
 		goto out_free;
 	}
 
Signature · 1 line
2.31.1

The original change here looks correct, so I will drop this revert from my tree.

greg k-h

author maintainer
#114 lore raw

PATCH 41/190 Revert "ACPI: sysfs: Fix reference count leak in acpi_sysfs_add_hotplug_profile()"

In reply to Greg Kroah-Hartman

This reverts commit 6e6c25283dff866308c87b49434c7dbad4774cc0.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc 3.10+ <[email protected]> # 3.10+
Cc Rafael J. Wysocki <[email protected]>
---
 drivers/acpi/sysfs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/acpi/sysfs.c +1 -3
index 8baf7644a0d0..842bf63b91e9 100644
@@ -986,10 +986,8 @@ void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug,
 
 	error = kobject_init_and_add(&hotplug->kobj,
 		&acpi_hotplug_profile_ktype, hotplug_kobj, "%s", name);
-	if (error) {
-		kobject_put(&hotplug->kobj);
+	if (error)
 		goto err_out;
-	}
 
 	kobject_uevent(&hotplug->kobj, KOBJ_ADD);
 	return;
Signature · 1 line
2.31.1
Acked-by on v1 41/190
#115 lore raw

Re: [PATCH 041/190] Revert "ACPI: sysfs: Fix reference count leak in acpi_sysfs_add_hotplug_profile()"

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 6e6c25283dff866308c87b49434c7dbad4774cc0.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 4 lines
Cc Qiushi Wu <[email protected]>
Cc 3.10+ <[email protected]> # 3.10+
Cc Rafael J. Wysocki <[email protected]>
Quoted 20 lines
---
  drivers/acpi/sysfs.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)
drivers/acpi/sysfs.c +1 -3
index 8baf7644a0d0..842bf63b91e9 100644
@@ -986,10 +986,8 @@ void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug,
 
  	error = kobject_init_and_add(&hotplug->kobj,
  		&acpi_hotplug_profile_ktype, hotplug_kobj, "%s", name);
-	if (error) {
-		kobject_put(&hotplug->kobj);
+	if (error)
  		goto err_out;
-	}
 
  	kobject_uevent(&hotplug->kobj, KOBJ_ADD);
  	return;
author maintainer
#116 lore raw

Re: [PATCH 041/190] Revert "ACPI: sysfs: Fix reference count leak in acpi_sysfs_add_hotplug_profile()"

Quoted 17 lines · Rafael J. Wysocki
Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 6e6c25283dff866308c87b49434c7dbad4774cc0.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 6 lines
Quoted 4 lines
Cc Qiushi Wu <[email protected]>
Cc 3.10+ <[email protected]> # 3.10+
Cc Rafael J. Wysocki <[email protected]>

Thanks for the review (and on the other acpi patch), but this commit looks like it was correct, so I am going to drop the revert from my tree.

greg k-h

author maintainer
#117 lore raw

PATCH 42/190 Revert "ASoC: fix incomplete error-handling in img_i2s_in_probe."

In reply to Greg Kroah-Hartman

This reverts commit 25bf943e4e7b47282bd86ae7d39e039217ebb007.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc https
Cc Mark Brown <[email protected]>
---
 sound/soc/img/img-i2s-in.c | 1 -
 1 file changed, 1 deletion(-)
sound/soc/img/img-i2s-in.c +0 -1
index e30b66b94bf6..a495d1050d49 100644
@@ -482,7 +482,6 @@ static int img_i2s_in_probe(struct platform_device *pdev)
 	if (IS_ERR(rst)) {
 		if (PTR_ERR(rst) == -EPROBE_DEFER) {
 			ret = -EPROBE_DEFER;
-			pm_runtime_put(&pdev->dev);
 			goto err_suspend;
 		}
 
Signature · 1 line
2.31.1
#118 lore raw

Re: [PATCH 042/190] Revert "ASoC: fix incomplete error-handling in img_i2s_in_probe."

Quoted 10 lines · Greg Kroah-Hartman

This reverts commit 25bf943e4e7b47282bd86ae7d39e039217ebb007.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Quoted 8 lines

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc https

Cc https looks wrong.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
author maintainer
#119 lore raw

Re: [PATCH 042/190] Revert "ASoC: fix incomplete error-handling in img_i2s_in_probe."

Quoted 18 lines · Kalle Valo
Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 25bf943e4e7b47282bd86ae7d39e039217ebb007.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 4 lines
Quoted 2 lines
Cc Qiushi Wu <[email protected]>
Cc https

Cc https looks wrong.

My script sucks, sorry about that, will fix up...

thanks,

greg k-h

author maintainer
#120 lore raw

Re: [PATCH 042/190] Revert "ASoC: fix incomplete error-handling in img_i2s_in_probe."

In reply to Greg Kroah-Hartman
Quoted 39 lines · Greg Kroah-Hartman

This reverts commit 25bf943e4e7b47282bd86ae7d39e039217ebb007.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc https
Cc Mark Brown <[email protected]>
---
 sound/soc/img/img-i2s-in.c | 1 -
 1 file changed, 1 deletion(-)
sound/soc/img/img-i2s-in.c +0 -1
index e30b66b94bf6..a495d1050d49 100644
@@ -482,7 +482,6 @@ static int img_i2s_in_probe(struct platform_device *pdev)
 	if (IS_ERR(rst)) {
 		if (PTR_ERR(rst) == -EPROBE_DEFER) {
 			ret = -EPROBE_DEFER;
-			pm_runtime_put(&pdev->dev);
 			goto err_suspend;
 		}
 
Signature · 1 line
2.31.1

Looks correct, dropping.

greg k-h

author maintainer
#121 lore raw

PATCH 43/190 Revert "qlcnic: fix missing release in qlcnic_83xx_interrupt_test."

In reply to Greg Kroah-Hartman

This reverts commit 15c973858903009e995b2037683de29dfe968621.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +1 -3
index d8882d0b6b49..edefeeff60f4 100644
@@ -3649,7 +3649,7 @@ int qlcnic_83xx_interrupt_test(struct net_device *netdev)
 	ahw->diag_cnt = 0;
 	ret = qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_INTRPT_TEST);
 	if (ret)
-		goto fail_mbx_args;
+		goto fail_diag_irq;
 
 	if (adapter->flags & QLCNIC_MSIX_ENABLED)
 		intrpt_id = ahw->intr_tbl[0].id;
@@ -3679,8 +3679,6 @@ int qlcnic_83xx_interrupt_test(struct net_device *netdev)
 
 done:
 	qlcnic_free_mbx_args(&cmd);
-
-fail_mbx_args:
 	qlcnic_83xx_diag_free_res(netdev, drv_sds_rings);
 
 fail_diag_irq:
Signature · 1 line
2.31.1
author maintainer
#122 lore raw

Re: [PATCH 043/190] Revert "qlcnic: fix missing release in qlcnic_83xx_interrupt_test."

Quoted 48 lines · Greg Kroah-Hartman

This reverts commit 15c973858903009e995b2037683de29dfe968621.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +1 -3
index d8882d0b6b49..edefeeff60f4 100644
@@ -3649,7 +3649,7 @@ int qlcnic_83xx_interrupt_test(struct net_device *netdev)
 	ahw->diag_cnt = 0;
 	ret = qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_INTRPT_TEST);
 	if (ret)
-		goto fail_mbx_args;
+		goto fail_diag_irq;
 
 	if (adapter->flags & QLCNIC_MSIX_ENABLED)
 		intrpt_id = ahw->intr_tbl[0].id;
@@ -3679,8 +3679,6 @@ int qlcnic_83xx_interrupt_test(struct net_device *netdev)
 
 done:
 	qlcnic_free_mbx_args(&cmd);
-
-fail_mbx_args:
 	qlcnic_83xx_diag_free_res(netdev, drv_sds_rings);
 
 fail_diag_irq:
Signature · 1 line
2.31.1

The original change here looks correct, I will drop the revert.

greg k-h

author maintainer
#123 lore raw

PATCH 44/190 Revert "RDMA/pvrdma: Fix missing pci disable in pvrdma_pci_probe()"

In reply to Greg Kroah-Hartman

This reverts commit db857e6ae548f0f4f4a0f63fffeeedf3cca21f9d.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc https
Cc Qiushi Wu <[email protected]>
Cc Jason Gunthorpe <[email protected]>
---
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c +1 -1
index 4b6019e7de67..c5f8d2da07f6 100644
@@ -800,7 +800,7 @@ static int pvrdma_pci_probe(struct pci_dev *pdev,
 	    !(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) {
 		dev_err(&pdev->dev, "PCI BAR region not MMIO\n");
 		ret = -ENOMEM;
-		goto err_disable_pdev;
+		goto err_free_device;
 	}
 
 	ret = pci_request_regions(pdev, DRV_NAME);
Signature · 1 line
2.31.1
maintainer
#124 lore raw

Re: [PATCH 044/190] Revert "RDMA/pvrdma: Fix missing pci disable in pvrdma_pci_probe()"

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit db857e6ae548f0f4f4a0f63fffeeedf3cca21f9d.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 7 lines
Cc https
Cc Qiushi Wu <[email protected]>
Cc Jason Gunthorpe <[email protected]>
---
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Can't see a reason to revert this one

Jason

author maintainer
#125 lore raw

Re: [PATCH 044/190] Revert "RDMA/pvrdma: Fix missing pci disable in pvrdma_pci_probe()"

Quoted 25 lines · Jason Gunthorpe
Quoted 16 lines · Greg Kroah-Hartman

This reverts commit db857e6ae548f0f4f4a0f63fffeeedf3cca21f9d.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 7 lines
Cc https
Cc Qiushi Wu <[email protected]>
Cc Jason Gunthorpe <[email protected]>
---
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 1 line

Can't see a reason to revert this one

thanks for the review, will drop this from my tree.

greg k-h

#126 lore raw

Re: [PATCH 044/190] Revert "RDMA/pvrdma: Fix missing pci disable in pvrdma_pci_probe()"

In reply to Greg Kroah-Hartman

This is a really weird one because the patch actually looks correct and the revert looks wrong??

	ret = pci_enable_device(pdev);

[...dbg statements...]

	if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM) ||
	    !(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) {
		dev_err(&pdev->dev, "PCI BAR region not MMIO\n");
		ret = -ENOMEM;
		goto err_disable_pdev;
	}

- R.

author maintainer
#127 lore raw

Re: [PATCH 044/190] Revert "RDMA/pvrdma: Fix missing pci disable in pvrdma_pci_probe()"

Quoted 7 lines · Roland Dreier

This is a really weird one because the patch actually looks correct and the revert looks wrong??

	ret = pci_enable_device(pdev);

[...dbg statements...]

Quoted 8 lines
	if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM) ||
	    !(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) {
		dev_err(&pdev->dev, "PCI BAR region not MMIO\n");
		ret = -ENOMEM;
		goto err_disable_pdev;
	}

- R.

git revert sometimes does odd things :)

I'll go drop this from the tree, thanks.

greg k-h

author maintainer
#128 lore raw

PATCH 45/190 Revert "usb: gadget: fix potential double-free in m66592_probe."

In reply to Greg Kroah-Hartman

This reverts commit 44734a594196bf1d474212f38fe3a0d37a73278b.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

---
 drivers/usb/gadget/udc/m66592-udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/udc/m66592-udc.c +1 -1
index 931e6362a13d..75d16a8902e6 100644
@@ -1667,7 +1667,7 @@ static int m66592_probe(struct platform_device *pdev)
 
 err_add_udc:
 	m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req);
-	m66592->ep0_req = NULL;
+
 clean_up3:
 	if (m66592->pdata->on_chip) {
 		clk_disable(m66592->clk);
Signature · 1 line
2.31.1
#129 lore raw

Re: [PATCH 045/190] Revert "usb: gadget: fix potential double-free in m66592_probe."

Quoted 28 lines · Greg Kroah-Hartman

This reverts commit 44734a594196bf1d474212f38fe3a0d37a73278b.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

---
 drivers/usb/gadget/udc/m66592-udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/udc/m66592-udc.c +0 -0
index 931e6362a13d..75d16a8902e6 100644

drivers/usb/gadget/udc/m66592-udc.c static int m66592_probe(struct platform_device *pdev) · line 1670

Quoted 4 lines
drivers/usb/gadget/udc/m66592-udc.c +0 -1
@@ -1667,7 +1667,7 @@ static int m66592_probe(struct platform_device *pdev)
 
 err_add_udc:
 	m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req);
-	m66592->ep0_req = NULL;

harmless, can be reverted and left reverted, I guess.

Signature · 1 line
balbi
author maintainer
#130 lore raw

Re: [PATCH 045/190] Revert "usb: gadget: fix potential double-free in m66592_probe."

Quoted 31 lines · Felipe Balbi
Quoted 29 lines · Greg Kroah-Hartman

This reverts commit 44734a594196bf1d474212f38fe3a0d37a73278b.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

---
 drivers/usb/gadget/udc/m66592-udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/udc/m66592-udc.c +0 -0
index 931e6362a13d..75d16a8902e6 100644
@@ -1667,7 +1667,7 @@ static int m66592_probe(struct platform_device *pdev)
 
Quoted 5 lines

drivers/usb/gadget/udc/m66592-udc.c static int m66592_probe(struct platform_device *pdev) · line 1670

Quoted 3 lines
drivers/usb/gadget/udc/m66592-udc.c +0 -1
 err_add_udc:
 	m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req);
-	m66592->ep0_req = NULL;

harmless, can be reverted and left reverted, I guess.

I'll drop it, thanks.

greg k-h

author maintainer
#131 lore raw

PATCH 46/190 Revert "net/mlx4_core: fix a memory leak bug."

In reply to Greg Kroah-Hartman

This reverts commit febfd9d3c7f74063e8e630b15413ca91b567f963.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx4/fw.c +1 -1
index f6cfec81ccc3..380e027ba5df 100644
@@ -2734,7 +2734,7 @@ void mlx4_opreq_action(struct work_struct *work)
 		if (err) {
 			mlx4_err(dev, "Failed to retrieve required operation: %d\n",
 				 err);
-			goto out;
+			return;
 		}
 		MLX4_GET(modifier, outbox, GET_OP_REQ_MODIFIER_OFFSET);
 		MLX4_GET(token, outbox, GET_OP_REQ_TOKEN_OFFSET);
Signature · 1 line
2.31.1
Reviewed-by on v1 46/190
#132 lore raw

Re: [PATCH 046/190] Revert "net/mlx4_core: fix a memory leak bug."

Quoted 29 lines · Greg Kroah-Hartman

This reverts commit febfd9d3c7f74063e8e630b15413ca91b567f963.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc David S. Miller <[email protected]>
---
  drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx4/fw.c +0 -0
index f6cfec81ccc3..380e027ba5df 100644

drivers/net/ethernet/mellanox/mlx4/fw.c void mlx4_opreq_action(struct work_struct *work) · line 2740

Quoted 8 lines
drivers/net/ethernet/mellanox/mlx4/fw.c +1 -1
@@ -2734,7 +2734,7 @@ void mlx4_opreq_action(struct work_struct *work)
  		if (err) {
  			mlx4_err(dev, "Failed to retrieve required operation: %d\n",
  				 err);
-			goto out;
+			return;
  		}
  		MLX4_GET(modifier, outbox, GET_OP_REQ_MODIFIER_OFFSET);
  		MLX4_GET(token, outbox, GET_OP_REQ_TOKEN_OFFSET);

The original commit febfd9d3c7f74063e8e630b15413ca91b567f963 is a bad commit. Not to be re-submitted.

Regards,
Tariq

author maintainer
#133 lore raw

Re: [PATCH 046/190] Revert "net/mlx4_core: fix a memory leak bug."

Quoted 43 lines · Tariq Toukan
Quoted 29 lines · Greg Kroah-Hartman

This reverts commit febfd9d3c7f74063e8e630b15413ca91b567f963.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc David S. Miller <[email protected]>
---
  drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx4/fw.c +0 -0
index f6cfec81ccc3..380e027ba5df 100644

drivers/net/ethernet/mellanox/mlx4/fw.c void mlx4_opreq_action(struct work_struct *work) · line 2740

Quoted 8 lines
drivers/net/ethernet/mellanox/mlx4/fw.c +1 -1
@@ -2734,7 +2734,7 @@ void mlx4_opreq_action(struct work_struct *work)
  		if (err) {
  			mlx4_err(dev, "Failed to retrieve required operation: %d\n",
  				 err);
-			goto out;
+			return;
  		}
  		MLX4_GET(modifier, outbox, GET_OP_REQ_MODIFIER_OFFSET);
  		MLX4_GET(token, outbox, GET_OP_REQ_TOKEN_OFFSET);
Quoted 2 lines

The original commit febfd9d3c7f74063e8e630b15413ca91b567f963 is a bad commit. Not to be re-submitted.

Thanks for the review, will keep!

greg k-h

author maintainer
#134 lore raw

Re: [PATCH 046/190] Revert "net/mlx4_core: fix a memory leak bug."

Quoted 44 lines · Greg Kroah-Hartman
Quoted 43 lines · Tariq Toukan
Quoted 29 lines · Greg Kroah-Hartman

This reverts commit febfd9d3c7f74063e8e630b15413ca91b567f963.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc David S. Miller <[email protected]>
---
  drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx4/fw.c +0 -0
index f6cfec81ccc3..380e027ba5df 100644

drivers/net/ethernet/mellanox/mlx4/fw.c void mlx4_opreq_action(struct work_struct *work) · line 2740

Quoted 8 lines
drivers/net/ethernet/mellanox/mlx4/fw.c +1 -1
@@ -2734,7 +2734,7 @@ void mlx4_opreq_action(struct work_struct *work)
  		if (err) {
  			mlx4_err(dev, "Failed to retrieve required operation: %d\n",
  				 err);
-			goto out;
+			return;
  		}
  		MLX4_GET(modifier, outbox, GET_OP_REQ_MODIFIER_OFFSET);
  		MLX4_GET(token, outbox, GET_OP_REQ_TOKEN_OFFSET);
Quoted 4 lines
Quoted 2 lines

The original commit febfd9d3c7f74063e8e630b15413ca91b567f963 is a bad commit. Not to be re-submitted.

Thanks for the review, will keep!

In looking closer (well, Atul looked closer after I asked them too), it seems that the original commit is ok, so I'm going to drop this revert from my tree.

Tariq, unless you can point out the problem you see here?

thanks,

greg k-h

#135 lore raw

Re: [PATCH 046/190] Revert "net/mlx4_core: fix a memory leak bug."

In reply to Greg Kroah-Hartman
Quoted 44 lines · Greg Kroah-Hartman
Quoted 43 lines · Tariq Toukan
Quoted 29 lines · Greg Kroah-Hartman

This reverts commit febfd9d3c7f74063e8e630b15413ca91b567f963.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc David S. Miller <[email protected]>
---
   drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx4/fw.c +0 -0
index f6cfec81ccc3..380e027ba5df 100644

drivers/net/ethernet/mellanox/mlx4/fw.c void mlx4_opreq_action(struct work_struct *work) · line 2740

Quoted 8 lines
drivers/net/ethernet/mellanox/mlx4/fw.c +1 -1
@@ -2734,7 +2734,7 @@ void mlx4_opreq_action(struct work_struct *work)
   		if (err) {
   			mlx4_err(dev, "Failed to retrieve required operation: %d\n",
   				 err);
-			goto out;
+			return;
   		}
   		MLX4_GET(modifier, outbox, GET_OP_REQ_MODIFIER_OFFSET);
   		MLX4_GET(token, outbox, GET_OP_REQ_TOKEN_OFFSET);
Quoted 7 lines
Quoted 2 lines

The original commit febfd9d3c7f74063e8e630b15413ca91b567f963 is a bad commit. Not to be re-submitted.

Thanks for the review, will keep!

greg k-h

Hi Greg,

I got confused with another error handling code in same function.

After a second look, original commit febfd9d3c7f74063e8e630b15413ca91b567f963 looks fine to me.

Regards,
Tariq

author maintainer
#136 lore raw

Re: [PATCH 046/190] Revert "net/mlx4_core: fix a memory leak bug."

Quoted 55 lines · Tariq Toukan
Quoted 44 lines · Greg Kroah-Hartman
Quoted 43 lines · Tariq Toukan
Quoted 29 lines · Greg Kroah-Hartman

This reverts commit febfd9d3c7f74063e8e630b15413ca91b567f963.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc David S. Miller <[email protected]>
---
   drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx4/fw.c +0 -0
index f6cfec81ccc3..380e027ba5df 100644

drivers/net/ethernet/mellanox/mlx4/fw.c void mlx4_opreq_action(struct work_struct *work) · line 2740

Quoted 8 lines
drivers/net/ethernet/mellanox/mlx4/fw.c +1 -1
@@ -2734,7 +2734,7 @@ void mlx4_opreq_action(struct work_struct *work)
   		if (err) {
   			mlx4_err(dev, "Failed to retrieve required operation: %d\n",
   				 err);
-			goto out;
+			return;
   		}
   		MLX4_GET(modifier, outbox, GET_OP_REQ_MODIFIER_OFFSET);
   		MLX4_GET(token, outbox, GET_OP_REQ_TOKEN_OFFSET);
Quoted 7 lines
Quoted 2 lines

The original commit febfd9d3c7f74063e8e630b15413ca91b567f963 is a bad commit. Not to be re-submitted.

Thanks for the review, will keep!

greg k-h

Quoted 6 lines

Hi Greg,

I got confused with another error handling code in same function.

After a second look, original commit febfd9d3c7f74063e8e630b15413ca91b567f963 looks fine to me.

Thanks for the information, and the re-review.

greg k-h

author maintainer
#137 lore raw

PATCH 47/190 Revert "rxrpc: Fix a memory leak in rxkad_verify_response()"

In reply to Greg Kroah-Hartman

This reverts commit f45d01f4f30b53c3a0a1c6c1c154acb7ff74ab9f.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc David Howells <[email protected]>
Cc Markus Elfring <[email protected]>
---
 net/rxrpc/rxkad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/rxrpc/rxkad.c +1 -1
index e2e9e9b0a6d7..6cdbfb4f8cda 100644
@@ -1241,7 +1241,7 @@ static int rxkad_verify_response(struct rxrpc_connection *conn,
 	ret = rxkad_decrypt_ticket(conn, server_key, skb, ticket, ticket_len,
 				   &session_key, &expiry, _abort_code);
 	if (ret < 0)
-		goto temporary_error_free_ticket;
+		goto temporary_error_free_resp;
 
 	/* use the session key from inside the ticket to decrypt the
 	 * response */
Signature · 1 line
2.31.1
maintainer
#138 lore raw

Re: [PATCH 047/190] Revert "rxrpc: Fix a memory leak in rxkad_verify_response()"

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit f45d01f4f30b53c3a0a1c6c1c154acb7ff74ab9f.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 4 lines
Cc Qiushi Wu <[email protected]>
Cc David Howells <[email protected]>
Cc Markus Elfring <[email protected]>

This is actually a good patch, so please don't revert it.

David

author maintainer
#139 lore raw

Re: [PATCH 047/190] Revert "rxrpc: Fix a memory leak in rxkad_verify_response()"

Quoted 18 lines · David Howells
Quoted 16 lines · Greg Kroah-Hartman

This reverts commit f45d01f4f30b53c3a0a1c6c1c154acb7ff74ab9f.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 6 lines
Quoted 4 lines
Cc Qiushi Wu <[email protected]>
Cc David Howells <[email protected]>
Cc Markus Elfring <[email protected]>

This is actually a good patch, so please don't revert it.

Now dropped from my series, thanks!

greg k-h

author maintainer
#140 lore raw

PATCH 48/190 Revert "net: sun: fix missing release regions in cas_init_one()."

In reply to Greg Kroah-Hartman

This reverts commit 5a730153984dd13f82ffae93d7170d76eba204e9.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/net/ethernet/sun/cassini.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/sun/cassini.c +2 -1
index 9ff894ba8d3e..d9cdf51c5a33 100644
@@ -4956,7 +4956,7 @@ static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 					  cas_cacheline_size)) {
 			dev_err(&pdev->dev, "Could not set PCI cache "
 			       "line size\n");
-			goto err_out_free_res;
+			goto err_write_cacheline;
 		}
 	}
 #endif
@@ -5128,6 +5128,7 @@ static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 err_out_free_res:
 	pci_release_regions(pdev);
 
+err_write_cacheline:
 	/* Try to restore it in case the error occurred after we
 	 * set it.
 	 */
Signature · 1 line
2.31.1
author maintainer
#141 lore raw

Re: [PATCH 048/190] Revert "net: sun: fix missing release regions in cas_init_one()."

Quoted 47 lines · Greg Kroah-Hartman

This reverts commit 5a730153984dd13f82ffae93d7170d76eba204e9.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/net/ethernet/sun/cassini.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/sun/cassini.c +2 -1
index 9ff894ba8d3e..d9cdf51c5a33 100644
@@ -4956,7 +4956,7 @@ static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 					  cas_cacheline_size)) {
 			dev_err(&pdev->dev, "Could not set PCI cache "
 			       "line size\n");
-			goto err_out_free_res;
+			goto err_write_cacheline;
 		}
 	}
 #endif
@@ -5128,6 +5128,7 @@ static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 err_out_free_res:
 	pci_release_regions(pdev);
 
+err_write_cacheline:
 	/* Try to restore it in case the error occurred after we
 	 * set it.
 	 */
Signature · 1 line
2.31.1

This change looks correct to me, so I will drop the revert.

greg k-h

author maintainer
#142 lore raw

PATCH 49/190 Revert "agp/intel: Fix a memory leak on module initialisation failure"

In reply to Greg Kroah-Hartman

This reverts commit b975abbd382fe442713a4c233549abb90e57c22b.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Chris Wilson <[email protected]>
Cc https
---
 drivers/char/agp/intel-gtt.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/char/agp/intel-gtt.c +1 -3
index 5bfdf222d5f9..4b34a5195c65 100644
@@ -304,10 +304,8 @@ static int intel_gtt_setup_scratch_page(void)
 	if (intel_private.needs_dmar) {
 		dma_addr = pci_map_page(intel_private.pcidev, page, 0,
 				    PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
-		if (pci_dma_mapping_error(intel_private.pcidev, dma_addr)) {
-			__free_page(page);
+		if (pci_dma_mapping_error(intel_private.pcidev, dma_addr))
 			return -EINVAL;
-		}
 
 		intel_private.scratch_page_dma = dma_addr;
 	} else
Signature · 1 line
2.31.1
author maintainer
#143 lore raw

Re: [PATCH 049/190] Revert "agp/intel: Fix a memory leak on module initialisation failure"

Quoted 44 lines · Greg Kroah-Hartman

This reverts commit b975abbd382fe442713a4c233549abb90e57c22b.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Chris Wilson <[email protected]>
Cc https
---
 drivers/char/agp/intel-gtt.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/char/agp/intel-gtt.c +1 -3
index 5bfdf222d5f9..4b34a5195c65 100644
@@ -304,10 +304,8 @@ static int intel_gtt_setup_scratch_page(void)
 	if (intel_private.needs_dmar) {
 		dma_addr = pci_map_page(intel_private.pcidev, page, 0,
 				    PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
-		if (pci_dma_mapping_error(intel_private.pcidev, dma_addr)) {
-			__free_page(page);
+		if (pci_dma_mapping_error(intel_private.pcidev, dma_addr))
 			return -EINVAL;
-		}
 
 		intel_private.scratch_page_dma = dma_addr;
 	} else
Signature · 1 line
2.31.1

Original looks correct, I'll drop this revert.

greg k-h

author maintainer
#144 lore raw

PATCH 50/190 Revert "nfp: abm: fix a memory leak bug"

In reply to Greg Kroah-Hartman

This reverts commit bd4af432cc71b5fbfe4833510359a6ad3ada250d.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Jakub Kicinski <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/net/ethernet/netronome/nfp/abm/main.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/netronome/nfp/abm/main.c +0 -1
index bdbf0726145e..341773b43a4d 100644
@@ -283,7 +283,6 @@ nfp_abm_vnic_set_mac(struct nfp_pf *pf, struct nfp_abm *abm, struct nfp_net *nn,
 	if (!nfp_nsp_has_hwinfo_lookup(nsp)) {
 		nfp_warn(pf->cpp, "NSP doesn't support PF MAC generation\n");
 		eth_hw_addr_random(nn->dp.netdev);
-		nfp_nsp_close(nsp);
 		return;
 	}
 
Signature · 1 line
2.31.1
maintainer
#145 lore raw

Re: [PATCH 050/190] Revert "nfp: abm: fix a memory leak bug"

Quoted 29 lines · On Wed, 21 Apr 2021 14:58:45 +0200 Greg Kroah-Hartman wrote:

This reverts commit bd4af432cc71b5fbfe4833510359a6ad3ada250d.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Jakub Kicinski <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/net/ethernet/netronome/nfp/abm/main.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/netronome/nfp/abm/main.c +0 -0
index bdbf0726145e..341773b43a4d 100644

drivers/net/ethernet/netronome/nfp/abm/main.c nfp_abm_vnic_set_mac(struct nfp_pf *pf, struct nfp_abm *abm, struct nfp_net *nn, · line 288

Quoted 7 lines
drivers/net/ethernet/netronome/nfp/abm/main.c +0 -1
@@ -283,7 +283,6 @@ nfp_abm_vnic_set_mac(struct nfp_pf *pf, struct nfp_abm *abm, struct nfp_net *nn,
 	if (!nfp_nsp_has_hwinfo_lookup(nsp)) {
 		nfp_warn(pf->cpp, "NSP doesn't support PF MAC generation\n");
 		eth_hw_addr_random(nn->dp.netdev);
-		nfp_nsp_close(nsp);
 		return;
 	}
 

This one still looks correct to me :S

author maintainer
#146 lore raw

Re: [PATCH 050/190] Revert "nfp: abm: fix a memory leak bug"

Quoted 25 lines · Jakub Kicinski
Quoted 24 lines · On Wed, 21 Apr 2021 14:58:45 +0200 Greg Kroah-Hartman wrote:

This reverts commit bd4af432cc71b5fbfe4833510359a6ad3ada250d.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Qiushi Wu <[email protected]>
Cc Jakub Kicinski <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/net/ethernet/netronome/nfp/abm/main.c | 1 -
 1 file changed, 1 deletion(-)
Quoted 14 lines

drivers/net/ethernet/netronome/nfp/abm/main.c nfp_abm_vnic_set_mac(struct nfp_pf *pf, struct nfp_abm *abm, struct nfp_net *nn, · line 288

Quoted 12 lines
drivers/net/ethernet/netronome/nfp/abm/main.c +0 -1
index bdbf0726145e..341773b43a4d 100644
@@ -283,7 +283,6 @@ nfp_abm_vnic_set_mac(struct nfp_pf *pf, struct nfp_abm *abm, struct nfp_net *nn,
 	if (!nfp_nsp_has_hwinfo_lookup(nsp)) {
 		nfp_warn(pf->cpp, "NSP doesn't support PF MAC generation\n");
 		eth_hw_addr_random(nn->dp.netdev);
-		nfp_nsp_close(nsp);
 		return;
 	}
 

This one still looks correct to me :S

Thanks for the review, now dropped.

greg k-h

author maintainer
#147 lore raw

PATCH 51/190 Revert "power: supply: core: fix memory leak in HWMON error path"

In reply to Greg Kroah-Hartman

This reverts commit 1d7a7128a2e9e1f137c99b0a44e94d70a77343e3.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

---
 drivers/power/supply/power_supply_hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/power_supply_hwmon.c +1 -1
index bffe6d84c429..62ca29e0d47a 100644
@@ -356,7 +356,7 @@ int power_supply_add_hwmon_sysfs(struct power_supply *psy)
 		goto error;
 	}
 
-	ret = devm_add_action_or_reset(dev, power_supply_hwmon_bitmap_free,
+	ret = devm_add_action(dev, power_supply_hwmon_bitmap_free,
 			      psyhw->props);
 	if (ret)
 		goto error;
Signature · 1 line
2.31.1
#148 lore raw

Re: [PATCH 051/190] Revert "power: supply: core: fix memory leak in HWMON error path"

Hi,

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 1d7a7128a2e9e1f137c99b0a44e94d70a77343e3.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 5 lines

---

Change is quite simple, so doing another review now:

It is correct that power_supply_hwmon_bitmap_free() must be called when devm_add_action() fails. This is not already done in the error path, so the original patch is correct and the revert reintroduces a memory leak in error path.

I suggest dropping the revert.

Thanks,

-- Sebastian

Quoted 19 lines
 drivers/power/supply/power_supply_hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/power_supply_hwmon.c +1 -1
index bffe6d84c429..62ca29e0d47a 100644
@@ -356,7 +356,7 @@ int power_supply_add_hwmon_sysfs(struct power_supply *psy)
 		goto error;
 	}
 
-	ret = devm_add_action_or_reset(dev, power_supply_hwmon_bitmap_free,
+	ret = devm_add_action(dev, power_supply_hwmon_bitmap_free,
 			      psyhw->props);
 	if (ret)
 		goto error;
Signature · 1 line
2.31.1
author maintainer
#149 lore raw

Re: [PATCH 051/190] Revert "power: supply: core: fix memory leak in HWMON error path"

Quoted 25 lines · Sebastian Reichel

Hi,

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 1d7a7128a2e9e1f137c99b0a44e94d70a77343e3.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 5 lines

---

Quoted 8 lines

Change is quite simple, so doing another review now:

It is correct that power_supply_hwmon_bitmap_free() must be called when devm_add_action() fails. This is not already done in the error path, so the original patch is correct and the revert reintroduces a memory leak in error path.

I suggest dropping the revert.

Now dropped, thanks!

greg k-h

author maintainer
#150 lore raw

PATCH 52/190 Revert "media: media/saa7146: fix incorrect assertion in saa7146_buffer_finish"

In reply to Greg Kroah-Hartman

This reverts commit 639c0a5b0503fb57127fa8972208d43020a9bcf6.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/common/saa7146/saa7146_fops.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/common/saa7146/saa7146_fops.c +2 -0
index baf5772c52a9..c256146fd3b6 100644
@@ -95,6 +95,8 @@ void saa7146_buffer_finish(struct saa7146_dev *dev,
 	DEB_EE("dev:%p, dmaq:%p, state:%d\n", dev, q, state);
 	DEB_EE("q->curr:%p\n", q->curr);
 
+	BUG_ON(!q->curr);
+
 	/* finish current buffer */
 	if (NULL == q->curr) {
 		DEB_D("aiii. no current buffer\n");
Signature · 1 line
2.31.1
#151 lore raw

Re: [PATCH 052/190] Revert "media: media/saa7146: fix incorrect assertion in saa7146_buffer_finish"

Hi!

Quoted 13 lines
Cc Aditya Pakki <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/common/saa7146/saa7146_fops.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/common/saa7146/saa7146_fops.c +0 -0
index baf5772c52a9..c256146fd3b6 100644

drivers/media/common/saa7146/saa7146_fops.c void saa7146_buffer_finish(struct saa7146_dev *dev, · line 102

Quoted 8 lines
drivers/media/common/saa7146/saa7146_fops.c +2 -0
@@ -95,6 +95,8 @@ void saa7146_buffer_finish(struct saa7146_dev *dev,
 	DEB_EE("dev:%p, dmaq:%p, state:%d\n", dev, q, state);
 	DEB_EE("q->curr:%p\n", q->curr);
 
+	BUG_ON(!q->curr);
+
 	/* finish current buffer */
 	if (NULL == q->curr) {
 		DEB_D("aiii. no current buffer\n");

The code is obviously crazy _after_ the revert, so I'd suggest not reverting it.

But whether this code has any security problems is quite hard to decide, it was not written with readability in mind :-(.

Pavel

Signature · 1 line
http://www.livejournal.com/~pavelmachek
author maintainer
#152 lore raw

PATCH 53/190 Revert "ecryptfs: replace BUG_ON with error handling code"

In reply to Greg Kroah-Hartman

This reverts commit 2c2a7552dd6465e8fde6bc9cccf8d66ed1c1eb72.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

---
 fs/ecryptfs/crypto.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
fs/ecryptfs/crypto.c +2 -4
index 943e523f4c9d..3d8623139538 100644
@@ -296,10 +296,8 @@ static int crypt_scatterlist(struct ecryptfs_crypt_stat *crypt_stat,
 	struct extent_crypt_result ecr;
 	int rc = 0;
 
-	if (!crypt_stat || !crypt_stat->tfm
-	       || !(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED))
-		return -EINVAL;
-
+	BUG_ON(!crypt_stat || !crypt_stat->tfm
+	       || !(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED));
 	if (unlikely(ecryptfs_verbosity > 0)) {
 		ecryptfs_printk(KERN_DEBUG, "Key size [%zd]; key:\n",
 				crypt_stat->key_size);
Signature · 1 line
2.31.1
#153 lore raw

Re: [PATCH 053/190] Revert "ecryptfs: replace BUG_ON with error handling code"

Quoted 10 lines · Greg Kroah-Hartman

This reverts commit 2c2a7552dd6465e8fde6bc9cccf8d66ed1c1eb72.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Quoted 5 lines

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

FWIW, commit message on the original (
ecryptfs: replace BUG_ON with error handling code

In crypt_scatterlist, if the crypt_stat argument is not set up correctly, the kernel crashes. Instead, by returning an error code upstream, the error is handled safely.

The issue is detected via a static analysis tool written by us.

Fixes 237fead619984 (ecryptfs: fs/Makefile and fs/Kconfig)

)
really stinks. First, the analysis: condition being tested is (!crypt_stat || !crypt_stat->tfm

               || !(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED))
and their patch replaces BUG_ON() with return of -EINVAL.  So the

only thing their tool had detected the presence of BUG_ON(). Was it grep, by any chance?

IOW, the commit message is "we'd found BUG_ON(); let's replace it with returning some error value and hope everything works. Whaddya mean, how do we know? Our tool [git grep BUG_ON, that is] says it's there and look, it *is* there, so if it's ever reached there'll be trouble. What, assertion that returning an error will be handled
safely? 'Cuz we saiz so, that's why"

It *is* functionally harmless, AFAICS, but only because the condition is really impossible. However,
* it refers to vague (s)tool they'd produced, nevermind that
all they really do is "find BUG_ON(), replace with returning an error".
* unlike BUG_ON(), the replacement does *NOT* document the
fact that condition should be impossible.
IMO either should be sufficient for rejecting the patch.

maintainer Acked-by
#154 lore raw

Re: [PATCH 053/190] Revert "ecryptfs: replace BUG_ON with error handling code"

Quoted 45 lines · Al Viro
Quoted 10 lines · Greg Kroah-Hartman

This reverts commit 2c2a7552dd6465e8fde6bc9cccf8d66ed1c1eb72.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Quoted 5 lines

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

FWIW, commit message on the original (
ecryptfs: replace BUG_ON with error handling code

In crypt_scatterlist, if the crypt_stat argument is not set up correctly, the kernel crashes. Instead, by returning an error code upstream, the error is handled safely.

The issue is detected via a static analysis tool written by us.

Fixes 237fead619984 (ecryptfs: fs/Makefile and fs/Kconfig)

)
really stinks. First, the analysis: condition being tested is (!crypt_stat || !crypt_stat->tfm

               || !(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED))
and their patch replaces BUG_ON() with return of -EINVAL.  So the

only thing their tool had detected the presence of BUG_ON(). Was it grep, by any chance?

IOW, the commit message is "we'd found BUG_ON(); let's replace it with returning some error value and hope everything works. Whaddya mean, how do we know? Our tool [git grep BUG_ON, that is] says it's there and look, it *is* there, so if it's ever reached there'll be trouble. What, assertion that returning an error will be handled
safely? 'Cuz we saiz so, that's why"

Quoted 7 lines

It *is* functionally harmless, AFAICS, but only because the condition is really impossible. However,
* it refers to vague (s)tool they'd produced, nevermind that
all they really do is "find BUG_ON(), replace with returning an error".
* unlike BUG_ON(), the replacement does *NOT* document the
fact that condition should be impossible.
IMO either should be sufficient for rejecting the patch.

I agree that it was not a malicious change. There are other places within the same function that return -EINVAL and the expectation is that errors from this function should be handled safely.

That said, I can find no real-world reports of this BUG_ON() ever being a problem and I don't think that there's any actual need for this change. So, I'm alright with it being reverted considering the circumstances.

Tyler

#155 lore raw

Re: [PATCH 053/190] Revert "ecryptfs: replace BUG_ON with error handling code"

Quoted 11 lines · Tyler Hicks
Quoted 7 lines

It *is* functionally harmless, AFAICS, but only because the condition is really impossible. However,
* it refers to vague (s)tool they'd produced, nevermind that
all they really do is "find BUG_ON(), replace with returning an error".
* unlike BUG_ON(), the replacement does *NOT* document the
fact that condition should be impossible.
IMO either should be sufficient for rejecting the patch.

I agree that it was not a malicious change. There are other places within the same function that return -EINVAL and the expectation is that errors from this function should be handled safely.

Umm... Assuming that failure exits in the callers will function properly if those conditions are true. Which is not obvious at all.

Quoted 4 lines

That said, I can find no real-world reports of this BUG_ON() ever being a problem and I don't think that there's any actual need for this change. So, I'm alright with it being reverted considering the circumstances.

AFAICS, at least some parts of that BUG_ON() are provably impossible (e.g. NULL crypt_stat would've oopsed well upstream of the only call of that function). ECRYPTFS_STRUCT_INITIALIZED is set after ecryptfs_alloc_inode() and never cleared, i.e. it should be present in ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat.flags for all inodes. And crypt_stat we are passing to that thing is calculated as &(ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat), which is another reason why it can't be NULL.

Incidentally, what's ecryptfs_setattr() doing with similar check?
It had been introduced in e10f281bca03 "eCryptfs: initialize crypt_stat in setattr", which claims
Recent changes in eCryptfs have made it possible to get to ecryptfs_setattr() with an uninitialized crypt_stat struct. This results in a wide and colorful variety of unpleasantries. This patch properly initializes the crypt_stat structure in ecryptfs_setattr() when it is necessary to do so.
and AFAICS at that point the call of ecryptfs_init_crypt_stat() in ecryptfs_alloc_inode() had already been there and EXCRYPTFS_STRUCT_INITIALIZED had been (unconditionally) set by it. So how could that check trigger in ecryptfs_setattr()? No direct calls of that function (then as well as now), it's only reachable as ecryptfs_{symlink,dir,main}_iops.setattr. The first two could only end up set by ecryptfs_interpose(), for inode returned by iget5_locked() (i.e. one that had been returned by ->alloc_inode()), the last is set by ecryptfs_init_inode(), called by ecryptfs_inode_set(), passed as callback to iget5_locked() by the same ecryptfs_interpose(). IOW, again, the inode must have been returned by ->alloc_inode().

I realize that it had been a long time ago, but... could somebody recall what that patch had been about? Michael?

Commit in question contains another (and much bigger) chunk; do the comments in commit message refer to it? Because it really looks like

	if (!(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED))
		ecryptfs_init_crypt_stat(crypt_stat);

part in ecryptfs_setattr() is a confusing no-op...

maintainer
#156 lore raw

Re: [PATCH 053/190] Revert "ecryptfs: replace BUG_ON with error handling code"

Quoted 22 lines · Al Viro
Quoted 11 lines · Tyler Hicks
Quoted 7 lines

It *is* functionally harmless, AFAICS, but only because the condition is really impossible. However,
* it refers to vague (s)tool they'd produced, nevermind that
all they really do is "find BUG_ON(), replace with returning an error".
* unlike BUG_ON(), the replacement does *NOT* document the
fact that condition should be impossible.
IMO either should be sufficient for rejecting the patch.

I agree that it was not a malicious change. There are other places within the same function that return -EINVAL and the expectation is that errors from this function should be handled safely.

Umm... Assuming that failure exits in the callers will function properly if those conditions are true. Which is not obvious at all.

Quoted 4 lines

That said, I can find no real-world reports of this BUG_ON() ever being a problem and I don't think that there's any actual need for this change. So, I'm alright with it being reverted considering the circumstances.

Quoted 8 lines

AFAICS, at least some parts of that BUG_ON() are provably impossible (e.g. NULL crypt_stat would've oopsed well upstream of the only call of that function). ECRYPTFS_STRUCT_INITIALIZED is set after ecryptfs_alloc_inode() and never cleared, i.e. it should be present in ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat.flags for all inodes. And crypt_stat we are passing to that thing is calculated as &(ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat), which is another reason why it can't be NULL.

I agree.

Quoted 19 lines

Incidentally, what's ecryptfs_setattr() doing with similar check?
It had been introduced in e10f281bca03 "eCryptfs: initialize crypt_stat in setattr", which claims
Recent changes in eCryptfs have made it possible to get to ecryptfs_setattr() with an uninitialized crypt_stat struct. This results in a wide and colorful variety of unpleasantries. This patch properly initializes the crypt_stat structure in ecryptfs_setattr() when it is necessary to do so.
and AFAICS at that point the call of ecryptfs_init_crypt_stat() in ecryptfs_alloc_inode() had already been there and EXCRYPTFS_STRUCT_INITIALIZED had been (unconditionally) set by it. So how could that check trigger in ecryptfs_setattr()? No direct calls of that function (then as well as now), it's only reachable as ecryptfs_{symlink,dir,main}_iops.setattr. The first two could only end up set by ecryptfs_interpose(), for inode returned by iget5_locked() (i.e. one that had been returned by ->alloc_inode()), the last is set by ecryptfs_init_inode(), called by ecryptfs_inode_set(), passed as callback to iget5_locked() by the same ecryptfs_interpose(). IOW, again, the inode must have been returned by ->alloc_inode().

Quoted 2 lines

I realize that it had been a long time ago, but... could somebody recall what that patch had been about? Michael?

I looked through the commits that proceeded e10f281bca03 and the only thing I can think of is the addition of "passthrough" mode where the lower, encrypted data can be directly read from the eCryptfs mount. It was introduced in commit e77a56ddceee ("[PATCH] eCryptfs: Encrypted passthrough"), several months before e10f281bca03. However, I don't see how it would have left us with an uninitialized crypt_stat in setattr.

Tyler

Quoted 6 lines

Commit in question contains another (and much bigger) chunk; do the comments in commit message refer to it? Because it really looks like

	if (!(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED))
		ecryptfs_init_crypt_stat(crypt_stat);

part in ecryptfs_setattr() is a confusing no-op...

author maintainer
#157 lore raw

Re: [PATCH 053/190] Revert "ecryptfs: replace BUG_ON with error handling code"

In reply to Tyler Hicks
Quoted 58 lines · Tyler Hicks
Quoted 45 lines · Al Viro
Quoted 10 lines · Greg Kroah-Hartman

This reverts commit 2c2a7552dd6465e8fde6bc9cccf8d66ed1c1eb72.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Quoted 5 lines

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

FWIW, commit message on the original (
ecryptfs: replace BUG_ON with error handling code

In crypt_scatterlist, if the crypt_stat argument is not set up correctly, the kernel crashes. Instead, by returning an error code upstream, the error is handled safely.

The issue is detected via a static analysis tool written by us.

Fixes 237fead619984 (ecryptfs: fs/Makefile and fs/Kconfig)

)
really stinks. First, the analysis: condition being tested is (!crypt_stat || !crypt_stat->tfm

               || !(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED))
and their patch replaces BUG_ON() with return of -EINVAL.  So the

only thing their tool had detected the presence of BUG_ON(). Was it grep, by any chance?

IOW, the commit message is "we'd found BUG_ON(); let's replace it with returning some error value and hope everything works. Whaddya mean, how do we know? Our tool [git grep BUG_ON, that is] says it's there and look, it *is* there, so if it's ever reached there'll be trouble. What, assertion that returning an error will be handled
safely? 'Cuz we saiz so, that's why"

Quoted 7 lines

It *is* functionally harmless, AFAICS, but only because the condition is really impossible. However,
* it refers to vague (s)tool they'd produced, nevermind that
all they really do is "find BUG_ON(), replace with returning an error".
* unlike BUG_ON(), the replacement does *NOT* document the
fact that condition should be impossible.
IMO either should be sufficient for rejecting the patch.

I agree that it was not a malicious change. There are other places within the same function that return -EINVAL and the expectation is that errors from this function should be handled safely.

Quoted 6 lines

That said, I can find no real-world reports of this BUG_ON() ever being a problem and I don't think that there's any actual need for this change. So, I'm alright with it being reverted considering the circumstances.

Thanks for the review, I've update the commit log message and added your ack here.

greg k-h

author maintainer
#158 lore raw

PATCH 54/190 Revert "clk: samsung: Remove redundant check in samsung_cmu_register_one"

In reply to Greg Kroah-Hartman

This reverts commit 8d7a577d04e8ce24b1b81ee44ec8cd1dda2a9cd9.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc https
Cc Chanwoo Choi <[email protected]>
Cc Stephen Boyd <[email protected]>
---
 drivers/clk/samsung/clk.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/clk/samsung/clk.c +4 -0
index 1949ae7851b2..dad31308c071 100644
@@ -356,6 +356,10 @@ struct samsung_clk_provider * __init samsung_cmu_register_one(
 	}
 
 	ctx = samsung_clk_init(np, reg_base, cmu->nr_clk_ids);
+	if (!ctx) {
+		panic("%s: unable to allocate ctx\n", __func__);
+		return ctx;
+	}
 
 	if (cmu->pll_clks)
 		samsung_clk_register_pll(ctx, cmu->pll_clks, cmu->nr_pll_clks,
Signature · 1 line
2.31.1
#159 lore raw

Re: [PATCH 054/190] Revert "clk: samsung: Remove redundant check in samsung_cmu_register_one"

Quoted 30 lines · Greg Kroah-Hartman

This reverts commit 8d7a577d04e8ce24b1b81ee44ec8cd1dda2a9cd9.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc https
Cc Chanwoo Choi <[email protected]>
Cc Stephen Boyd <[email protected]>
---
 drivers/clk/samsung/clk.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/clk/samsung/clk.c +0 -0
index 1949ae7851b2..dad31308c071 100644

drivers/clk/samsung/clk.c struct samsung_clk_provider * __init samsung_cmu_register_one( · line 362

Quoted 7 lines
drivers/clk/samsung/clk.c +4 -0
@@ -356,6 +356,10 @@ struct samsung_clk_provider * __init samsung_cmu_register_one(
 	}
 
 	ctx = samsung_clk_init(np, reg_base, cmu->nr_clk_ids);
+	if (!ctx) {
+		panic("%s: unable to allocate ctx\n", __func__);
+		return ctx;
+	}

Hi Greg,

The commit was fine here, so please keep it. NAK for the revert.

Best regards,
Krzysztof

author maintainer
#160 lore raw

Re: [PATCH 054/190] Revert "clk: samsung: Remove redundant check in samsung_cmu_register_one"

Quoted 41 lines · Krzysztof Kozlowski
Quoted 30 lines · Greg Kroah-Hartman

This reverts commit 8d7a577d04e8ce24b1b81ee44ec8cd1dda2a9cd9.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc https
Cc Chanwoo Choi <[email protected]>
Cc Stephen Boyd <[email protected]>
---
 drivers/clk/samsung/clk.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/clk/samsung/clk.c +0 -0
index 1949ae7851b2..dad31308c071 100644

drivers/clk/samsung/clk.c struct samsung_clk_provider * __init samsung_cmu_register_one( · line 362

Quoted 7 lines
drivers/clk/samsung/clk.c +4 -0
@@ -356,6 +356,10 @@ struct samsung_clk_provider * __init samsung_cmu_register_one(
 	}
 
 	ctx = samsung_clk_init(np, reg_base, cmu->nr_clk_ids);
+	if (!ctx) {
+		panic("%s: unable to allocate ctx\n", __func__);
+		return ctx;
+	}

Hi Greg,

Quoted 1 line

The commit was fine here, so please keep it. NAK for the revert.

Now dropped, thanks!

greg k-h

author maintainer
#161 lore raw

PATCH 55/190 Revert "fs: ocfs: remove unnecessary assertion in dlm_migrate_lockres"

In reply to Greg Kroah-Hartman

This reverts commit 67e2d2eb542338145a2e0b2336c1cdabd2424fd3.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc http
Cc Aditya Pakki <[email protected]>
Cc Mark Fasheh <[email protected]>
Cc Joel Becker <[email protected]>
Cc Junxiao Bi <[email protected]>
Cc Joseph Qi <[email protected]>
Cc Changwei Ge <[email protected]>
Cc Gang He <[email protected]>
Cc Jun Piao <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Linus Torvalds <[email protected]>
---
 fs/ocfs2/dlm/dlmmaster.c | 2 ++
 1 file changed, 2 insertions(+)
fs/ocfs2/dlm/dlmmaster.c +2 -0
index f105746063ed..f89dcf9b6217 100644
@@ -2554,6 +2554,8 @@ static int dlm_migrate_lockres(struct dlm_ctxt *dlm,
 	if (!dlm_grab(dlm))
 		return -EINVAL;
 
+	BUG_ON(target == O2NM_MAX_NODES);
+
 	name = res->lockname.name;
 	namelen = res->lockname.len;
 
Signature · 1 line
2.31.1
#162 lore raw

Re: [PATCH 055/190] Revert "fs: ocfs: remove unnecessary assertion in dlm_migrate_lockres"

Quoted 9 lines · Greg Kroah-Hartman

This reverts commit 67e2d2eb542338145a2e0b2336c1cdabd2424fd3.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

This patch is correct AFAICT.
Pavel

Quoted 12 lines

index f105746063ed..f89dcf9b6217 100644

fs/ocfs2/dlm/dlmmaster.c +2 -0
@@ -2554,6 +2554,8 @@ static int dlm_migrate_lockres(struct dlm_ctxt *dlm,
 	if (!dlm_grab(dlm))
 		return -EINVAL;
 
+	BUG_ON(target == O2NM_MAX_NODES);
+
 	name = res->lockname.name;
 	namelen = res->lockname.len;
 
Signature · 1 line
http://www.livejournal.com/~pavelmachek
author maintainer
#163 lore raw

Re: [PATCH 055/190] Revert "fs: ocfs: remove unnecessary assertion in dlm_migrate_lockres"

Quoted 11 lines · Pavel Machek
Quoted 9 lines · Greg Kroah-Hartman

This reverts commit 67e2d2eb542338145a2e0b2336c1cdabd2424fd3.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Quoted 1 line

This patch is correct AFAICT.

Now dropped, thanks.

greg k-h

author maintainer
#164 lore raw

PATCH 56/190 Revert "media: davinci/vpfe_capture.c: Avoid BUG_ON for register failure"

In reply to Greg Kroah-Hartman

This reverts commit b0e4cfae483fe1e3db71ab2d8509490df60e52c6.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/davinci/vpfe_capture.c | 31 +++++++++----------
 1 file changed, 15 insertions(+), 16 deletions(-)
drivers/media/platform/davinci/vpfe_capture.c +15 -16
index f9f7dd17c57c..bcedaf4523e0 100644
@@ -168,22 +168,21 @@ int vpfe_register_ccdc_device(const struct ccdc_hw_device *dev)
 	int ret = 0;
 	printk(KERN_NOTICE "vpfe_register_ccdc_device: %s\n", dev->name);
 
-	if (!dev->hw_ops.open ||
-	    !dev->hw_ops.enable ||
-	    !dev->hw_ops.set_hw_if_params ||
-	    !dev->hw_ops.configure ||
-	    !dev->hw_ops.set_buftype ||
-	    !dev->hw_ops.get_buftype ||
-	    !dev->hw_ops.enum_pix ||
-	    !dev->hw_ops.set_frame_format ||
-	    !dev->hw_ops.get_frame_format ||
-	    !dev->hw_ops.get_pixel_format ||
-	    !dev->hw_ops.set_pixel_format ||
-	    !dev->hw_ops.set_image_window ||
-	    !dev->hw_ops.get_image_window ||
-	    !dev->hw_ops.get_line_length ||
-	    !dev->hw_ops.getfid)
-		return -EINVAL;
+	BUG_ON(!dev->hw_ops.open);
+	BUG_ON(!dev->hw_ops.enable);
+	BUG_ON(!dev->hw_ops.set_hw_if_params);
+	BUG_ON(!dev->hw_ops.configure);
+	BUG_ON(!dev->hw_ops.set_buftype);
+	BUG_ON(!dev->hw_ops.get_buftype);
+	BUG_ON(!dev->hw_ops.enum_pix);
+	BUG_ON(!dev->hw_ops.set_frame_format);
+	BUG_ON(!dev->hw_ops.get_frame_format);
+	BUG_ON(!dev->hw_ops.get_pixel_format);
+	BUG_ON(!dev->hw_ops.set_pixel_format);
+	BUG_ON(!dev->hw_ops.set_image_window);
+	BUG_ON(!dev->hw_ops.get_image_window);
+	BUG_ON(!dev->hw_ops.get_line_length);
+	BUG_ON(!dev->hw_ops.getfid);
 
 	mutex_lock(&ccdc_lock);
 	if (!ccdc_cfg) {
Signature · 1 line
2.31.1
#165 lore raw

Re: [PATCH 056/190] Revert "media: davinci/vpfe_capture.c: Avoid BUG_ON for register failure"

Hi!

This is no big deal either way, and I doubt it is malicious. It will only hit during development. Returning error is more in line with linux style.

I'd suggest keeping it.

Best regards,
Pavel

ci/vpfe_capture.c

Quoted 41 lines

index f9f7dd17c57c..bcedaf4523e0 100644

drivers/media/platform/davinci/vpfe_capture.c +15 -16
@@ -168,22 +168,21 @@ int vpfe_register_ccdc_device(const struct ccdc_hw_device *dev)
 	int ret = 0;
 	printk(KERN_NOTICE "vpfe_register_ccdc_device: %s\n", dev->name);
 
-	if (!dev->hw_ops.open ||
-	    !dev->hw_ops.enable ||
-	    !dev->hw_ops.set_hw_if_params ||
-	    !dev->hw_ops.configure ||
-	    !dev->hw_ops.set_buftype ||
-	    !dev->hw_ops.get_buftype ||
-	    !dev->hw_ops.enum_pix ||
-	    !dev->hw_ops.set_frame_format ||
-	    !dev->hw_ops.get_frame_format ||
-	    !dev->hw_ops.get_pixel_format ||
-	    !dev->hw_ops.set_pixel_format ||
-	    !dev->hw_ops.set_image_window ||
-	    !dev->hw_ops.get_image_window ||
-	    !dev->hw_ops.get_line_length ||
-	    !dev->hw_ops.getfid)
-		return -EINVAL;
+	BUG_ON(!dev->hw_ops.open);
+	BUG_ON(!dev->hw_ops.enable);
+	BUG_ON(!dev->hw_ops.set_hw_if_params);
+	BUG_ON(!dev->hw_ops.configure);
+	BUG_ON(!dev->hw_ops.set_buftype);
+	BUG_ON(!dev->hw_ops.get_buftype);
+	BUG_ON(!dev->hw_ops.enum_pix);
+	BUG_ON(!dev->hw_ops.set_frame_format);
+	BUG_ON(!dev->hw_ops.get_frame_format);
+	BUG_ON(!dev->hw_ops.get_pixel_format);
+	BUG_ON(!dev->hw_ops.set_pixel_format);
+	BUG_ON(!dev->hw_ops.set_image_window);
+	BUG_ON(!dev->hw_ops.get_image_window);
+	BUG_ON(!dev->hw_ops.get_line_length);
+	BUG_ON(!dev->hw_ops.getfid);
 
 	mutex_lock(&ccdc_lock);
 	if (!ccdc_cfg) {
Signature · 1 line
http://www.livejournal.com/~pavelmachek
author maintainer
#166 lore raw

PATCH 57/190 Revert "media: saa7146: Avoid using BUG_ON as an assertion"

In reply to Greg Kroah-Hartman

This reverts commit 1ec4c6efe23154b4ab44c1a34dbc0eb121eb614a.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/common/saa7146/saa7146_video.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/media/common/saa7146/saa7146_video.c +2 -4
index 7b8795eca589..d9d7d82ca451 100644
@@ -345,8 +345,7 @@ static int video_begin(struct saa7146_fh *fh)
 
 	fmt = saa7146_format_by_fourcc(dev, vv->video_fmt.pixelformat);
 	/* we need to have a valid format set here */
-	if (!fmt)
-		return -EINVAL;
+	BUG_ON(NULL == fmt);
 
 	if (0 != (fmt->flags & FORMAT_IS_PLANAR)) {
 		resource = RESOURCE_DMA1_HPS|RESOURCE_DMA2_CLP|RESOURCE_DMA3_BRS;
@@ -399,8 +398,7 @@ static int video_end(struct saa7146_fh *fh, struct file *file)
 
 	fmt = saa7146_format_by_fourcc(dev, vv->video_fmt.pixelformat);
 	/* we need to have a valid format set here */
-	if (!fmt)
-		return -EINVAL;
+	BUG_ON(NULL == fmt);
 
 	if (0 != (fmt->flags & FORMAT_IS_PLANAR)) {
 		resource = RESOURCE_DMA1_HPS|RESOURCE_DMA2_CLP|RESOURCE_DMA3_BRS;
Signature · 1 line
2.31.1
#167 lore raw

Re: [PATCH 057/190] Revert "media: saa7146: Avoid using BUG_ON as an assertion"

Hi!

I doubt this is malicious, and BUG()s are ugly. I'd suggest keeping this.

Best regards,
Pavel

Quoted 24 lines
drivers/media/common/saa7146/saa7146_video.c +2 -4
index 7b8795eca589..d9d7d82ca451 100644
@@ -345,8 +345,7 @@ static int video_begin(struct saa7146_fh *fh)
 
 	fmt = saa7146_format_by_fourcc(dev, vv->video_fmt.pixelformat);
 	/* we need to have a valid format set here */
-	if (!fmt)
-		return -EINVAL;
+	BUG_ON(NULL == fmt);
 
 	if (0 != (fmt->flags & FORMAT_IS_PLANAR)) {
 		resource = RESOURCE_DMA1_HPS|RESOURCE_DMA2_CLP|RESOURCE_DMA3_BRS;
@@ -399,8 +398,7 @@ static int video_end(struct saa7146_fh *fh, struct file *file)
 
 	fmt = saa7146_format_by_fourcc(dev, vv->video_fmt.pixelformat);
 	/* we need to have a valid format set here */
-	if (!fmt)
-		return -EINVAL;
+	BUG_ON(NULL == fmt);
 
 	if (0 != (fmt->flags & FORMAT_IS_PLANAR)) {
 		resource = RESOURCE_DMA1_HPS|RESOURCE_DMA2_CLP|RESOURCE_DMA3_BRS;
Signature · 1 line
http://www.livejournal.com/~pavelmachek
author maintainer
#168 lore raw

PATCH 58/190 Revert "media: cx231xx: replace BUG_ON with recovery code"

In reply to Greg Kroah-Hartman

This reverts commit 93a24578de721006055b422c7772e0e417e1983c.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/usb/cx231xx/cx231xx-i2c.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/usb/cx231xx/cx231xx-i2c.c +1 -2
index c6659253c6fb..f33b6a077d57 100644
@@ -515,8 +515,7 @@ int cx231xx_i2c_register(struct cx231xx_i2c *bus)
 {
 	struct cx231xx *dev = bus->dev;
 
-	if (!dev->cx231xx_send_usb_command)
-		return -EINVAL;
+	BUG_ON(!dev->cx231xx_send_usb_command);
 
 	bus->i2c_adap = cx231xx_adap_template;
 	bus->i2c_adap.dev.parent = dev->dev;
Signature · 1 line
2.31.1
#169 lore raw

Re: [PATCH 058/190] Revert "media: cx231xx: replace BUG_ON with recovery code"

Hi!

i2c.c

drivers/media/usb/cx231xx/cx231xx-i2c.c int cx231xx_i2c_register(struct cx231xx_i2c *bus) · line 521

Quoted 13 lines

index c6659253c6fb..f33b6a077d57 100644

drivers/media/usb/cx231xx/cx231xx-i2c.c +1 -2
@@ -515,8 +515,7 @@ int cx231xx_i2c_register(struct cx231xx_i2c *bus)
 {
 	struct cx231xx *dev = bus->dev;
 
-	if (!dev->cx231xx_send_usb_command)
-		return -EINVAL;
+	BUG_ON(!dev->cx231xx_send_usb_command);
 
 	bus->i2c_adap = cx231xx_adap_template;
 	bus->i2c_adap.dev.parent = dev->dev;

No big deal either way, and this will only be hit during development. Linus does not like BUGs, so I'd keep this.

Best regards,
Pavel

Signature · 1 line
http://www.livejournal.com/~pavelmachek
author maintainer
#170 lore raw

PATCH 59/190 Revert "RDMA/srpt: Remove unnecessary assertion in srpt_queue_response"

In reply to Greg Kroah-Hartman

This reverts commit 9f48db0d4a08624bb9ba847ea40c8abad753b396.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc https
Cc Aditya Pakki <[email protected]>
Cc Bart Van Assche <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Jason Gunthorpe <[email protected]>
---
 drivers/infiniband/ulp/srpt/ib_srpt.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/infiniband/ulp/srpt/ib_srpt.c +2 -0
index 6be60aa5ffe2..b5a7c4fbf23b 100644
@@ -2807,6 +2807,8 @@ static void srpt_queue_response(struct se_cmd *cmd)
 	int resp_len, ret, i;
 	u8 srp_tm_status;
 
+	BUG_ON(!ch);
+
 	state = ioctx->state;
 	switch (state) {
 	case SRPT_STATE_NEW:
Signature · 1 line
2.31.1
maintainer
#171 lore raw

Re: [PATCH 059/190] Revert "RDMA/srpt: Remove unnecessary assertion in srpt_queue_response"

Quoted 22 lines · Greg Kroah-Hartman

This reverts commit 9f48db0d4a08624bb9ba847ea40c8abad753b396.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc https
Cc Aditya Pakki <[email protected]>
Cc Bart Van Assche <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Quoted 3 lines
---
 drivers/infiniband/ulp/srpt/ib_srpt.c | 2 ++
 1 file changed, 2 insertions(+)

I think this one is fine

Jason

maintainer
#172 lore raw

Re: [PATCH 059/190] Revert "RDMA/srpt: Remove unnecessary assertion in srpt_queue_response"

Quoted 26 lines · Jason Gunthorpe
Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 9f48db0d4a08624bb9ba847ea40c8abad753b396.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 8 lines
Cc https
Cc Aditya Pakki <[email protected]>
Cc Bart Van Assche <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Jason Gunthorpe <[email protected]>
 drivers/infiniband/ulp/srpt/ib_srpt.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 1 line

I think this one is fine

Sorry, I realize that is unclear. I mean I don't see a reason to revert this patch.

Jason

maintainer
#173 lore raw

Re: [PATCH 059/190] Revert "RDMA/srpt: Remove unnecessary assertion in srpt_queue_response"

Quoted 27 lines · Jason Gunthorpe
Quoted 26 lines · Jason Gunthorpe
Quoted 24 lines · Greg Kroah-Hartman

This reverts commit 9f48db0d4a08624bb9ba847ea40c8abad753b396.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc https
Cc Aditya Pakki <[email protected]>
Cc Bart Van Assche <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Jason Gunthorpe <[email protected]>
  drivers/infiniband/ulp/srpt/ib_srpt.c | 2 ++
  1 file changed, 2 insertions(+)
Quoted 4 lines
Quoted 1 line

I think this one is fine

Sorry, I realize that is unclear. I mean I don't see a reason to revert this patch.

Greg, I share Jason's opinion and would like to see this revert dropped. The function srpt_queue_response() dereferences the 'ch' pointer before the BUG_ON(ch) statement is reached. I think this makes the BUG_ON() statement that would be reintroduced by this revert superfluous.

Thanks,

Bart.

author maintainer
#174 lore raw

Re: [PATCH 059/190] Revert "RDMA/srpt: Remove unnecessary assertion in srpt_queue_response"

Quoted 30 lines · Bart Van Assche
Quoted 29 lines · Jason Gunthorpe
Quoted 27 lines · Jason Gunthorpe
Quoted 16 lines · Greg Kroah-Hartman

This reverts commit 9f48db0d4a08624bb9ba847ea40c8abad753b396.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 8 lines
Cc https
Cc Aditya Pakki <[email protected]>
Cc Bart Van Assche <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Jason Gunthorpe <[email protected]>
  drivers/infiniband/ulp/srpt/ib_srpt.c | 2 ++
  1 file changed, 2 insertions(+)

I think this one is fine

Quoted 7 lines
Quoted 2 lines

Sorry, I realize that is unclear. I mean I don't see a reason to revert this patch.

Greg, I share Jason's opinion and would like to see this revert dropped. The function srpt_queue_response() dereferences the 'ch' pointer before the BUG_ON(ch) statement is reached. I think this makes the BUG_ON() statement that would be reintroduced by this revert superfluous.

Thanks for the review, I will go drop this commit from my tree.

greg k-h

author maintainer
#175 lore raw

PATCH 60/190 Revert "staging: kpc2000: remove unnecessary assertions in kpc_dma_transfer"

In reply to Greg Kroah-Hartman

This reverts commit d7a336d67ab5443a0ef14b8335d139e855e8a682.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc https
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/kpc2000/kpc_dma/fileops.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/staging/kpc2000/kpc_dma/fileops.c +2 -0
index 10dcd6646b01..7fdad86044ca 100644
@@ -49,7 +49,9 @@ static int kpc_dma_transfer(struct dev_private_data *priv,
 	u64 dma_addr;
 	u64 user_ctl;
 
+	BUG_ON(priv == NULL);
 	ldev = priv->ldev;
+	BUG_ON(ldev == NULL);
 
 	acd = kzalloc(sizeof(*acd), GFP_KERNEL);
 	if (!acd) {
Signature · 1 line
2.31.1
author maintainer
#176 lore raw

Re: [PATCH 060/190] Revert "staging: kpc2000: remove unnecessary assertions in kpc_dma_transfer"

Quoted 40 lines · Greg Kroah-Hartman

This reverts commit d7a336d67ab5443a0ef14b8335d139e855e8a682.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc https
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/kpc2000/kpc_dma/fileops.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/staging/kpc2000/kpc_dma/fileops.c +2 -0
index 10dcd6646b01..7fdad86044ca 100644
@@ -49,7 +49,9 @@ static int kpc_dma_transfer(struct dev_private_data *priv,
 	u64 dma_addr;
 	u64 user_ctl;
 
+	BUG_ON(priv == NULL);
 	ldev = priv->ldev;
+	BUG_ON(ldev == NULL);
 
 	acd = kzalloc(sizeof(*acd), GFP_KERNEL);
 	if (!acd) {
Signature · 1 line
2.31.1

This one looks fine, I'm dropping it.

greg k-h

author maintainer
#177 lore raw

PATCH 61/190 Revert "xen/grant-table: remove multiple BUG_ON on gnttab_interface"

In reply to Greg Kroah-Hartman

This reverts commit d6bd6cf9feb81737f9f64d2c1acf98fdaacebad1.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Juergen Gross <[email protected]>
Cc Juergen Gross <[email protected]>
---
 drivers/xen/grant-table.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/xen/grant-table.c +4 -0
index 3729bea0c989..5065d36c602e 100644
@@ -663,6 +663,7 @@ static int grow_gnttab_list(unsigned int more_frames)
 	unsigned int nr_glist_frames, new_nr_glist_frames;
 	unsigned int grefs_per_frame;
 
+	BUG_ON(gnttab_interface == NULL);
 	grefs_per_frame = gnttab_interface->grefs_per_grant_frame;
 
 	new_nr_grant_frames = nr_grant_frames + more_frames;
@@ -1281,6 +1282,7 @@ EXPORT_SYMBOL_GPL(gnttab_unmap_refs_sync);
 
 static unsigned int nr_status_frames(unsigned int nr_grant_frames)
 {
+	BUG_ON(gnttab_interface == NULL);
 	return gnttab_frames(nr_grant_frames, SPP);
 }
 
@@ -1508,6 +1510,7 @@ static int gnttab_expand(unsigned int req_entries)
 	int rc;
 	unsigned int cur, extra;
 
+	BUG_ON(gnttab_interface == NULL);
 	cur = nr_grant_frames;
 	extra = ((req_entries + gnttab_interface->grefs_per_grant_frame - 1) /
 		 gnttab_interface->grefs_per_grant_frame);
@@ -1542,6 +1545,7 @@ int gnttab_init(void)
 	/* Determine the maximum number of frames required for the
 	 * grant reference free list on the current hypervisor.
 	 */
+	BUG_ON(gnttab_interface == NULL);
 	max_nr_glist_frames = (max_nr_grant_frames *
 			       gnttab_interface->grefs_per_grant_frame / RPP);
 
Signature · 1 line
2.31.1
maintainer
#178 lore raw

Re: [PATCH 061/190] Revert "xen/grant-table: remove multiple BUG_ON on gnttab_interface"

Quoted 16 lines · Greg Kroah-Hartman

This reverts commit d6bd6cf9feb81737f9f64d2c1acf98fdaacebad1.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 4 lines
Cc Aditya Pakki <[email protected]>
Cc Juergen Gross <[email protected]>
Cc Juergen Gross <[email protected]>

The reverted patch didn't introduce any issue. I have verified that the BUG_ON()s are really impossible to trigger, and even if they would have been triggering, they'd be now replaced by NULL dereferences.

So I believe you can just drop this revert.

Juergen

Quoted 41 lines
---
  drivers/xen/grant-table.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/xen/grant-table.c +4 -0
index 3729bea0c989..5065d36c602e 100644
@@ -663,6 +663,7 @@ static int grow_gnttab_list(unsigned int more_frames)
  	unsigned int nr_glist_frames, new_nr_glist_frames;
  	unsigned int grefs_per_frame;
 
+	BUG_ON(gnttab_interface == NULL);
  	grefs_per_frame = gnttab_interface->grefs_per_grant_frame;
 
  	new_nr_grant_frames = nr_grant_frames + more_frames;
@@ -1281,6 +1282,7 @@ EXPORT_SYMBOL_GPL(gnttab_unmap_refs_sync);
 
  static unsigned int nr_status_frames(unsigned int nr_grant_frames)
  {
+	BUG_ON(gnttab_interface == NULL);
  	return gnttab_frames(nr_grant_frames, SPP);
  }
 
@@ -1508,6 +1510,7 @@ static int gnttab_expand(unsigned int req_entries)
  	int rc;
  	unsigned int cur, extra;
 
+	BUG_ON(gnttab_interface == NULL);
  	cur = nr_grant_frames;
  	extra = ((req_entries + gnttab_interface->grefs_per_grant_frame - 1) /
  		 gnttab_interface->grefs_per_grant_frame);
@@ -1542,6 +1545,7 @@ int gnttab_init(void)
  	/* Determine the maximum number of frames required for the
  	 * grant reference free list on the current hypervisor.
  	 */
+	BUG_ON(gnttab_interface == NULL);
  	max_nr_glist_frames = (max_nr_grant_frames *
  			       gnttab_interface->grefs_per_grant_frame / RPP);
 
author maintainer
#179 lore raw

Re: [PATCH 061/190] Revert "xen/grant-table: remove multiple BUG_ON on gnttab_interface"

Quoted 22 lines · Juergen Gross
Quoted 16 lines · Greg Kroah-Hartman

This reverts commit d6bd6cf9feb81737f9f64d2c1acf98fdaacebad1.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Quoted 4 lines
Cc Aditya Pakki <[email protected]>
Cc Juergen Gross <[email protected]>
Cc Juergen Gross <[email protected]>
Quoted 5 lines

The reverted patch didn't introduce any issue. I have verified that the BUG_ON()s are really impossible to trigger, and even if they would have been triggering, they'd be now replaced by NULL dereferences.

So I believe you can just drop this revert.

Thanks for the review, now dropped.

greg k-h

author maintainer
#180 lore raw

PATCH 62/190 Revert "scsi: libfc: remove unnecessary assertion on ep variable"

In reply to Greg Kroah-Hartman

This reverts commit 52b894393cecdc303990e834778d39b85d0553fc.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc https
Cc Hannes Reinecke <[email protected]>
Cc Aditya Pakki <[email protected]>
Cc Martin K. Petersen <[email protected]>
---
 drivers/target/tcm_fc/tfc_io.c | 1 +
 1 file changed, 1 insertion(+)
drivers/target/tcm_fc/tfc_io.c +1 -0
index bbe2e29612fa..15d557a11f63 100644
@@ -220,6 +220,7 @@ void ft_recv_write_data(struct ft_cmd *cmd, struct fc_frame *fp)
 	ep = fc_seq_exch(seq);
 	lport = ep->lp;
 	if (cmd->was_ddp_setup) {
+		BUG_ON(!ep);
 		BUG_ON(!lport);
 		/*
 		 * Since DDP (Large Rx offload) was setup for this request,
Signature · 1 line
2.31.1
author maintainer
#181 lore raw

Re: [PATCH 062/190] Revert "scsi: libfc: remove unnecessary assertion on ep variable"

Quoted 40 lines · Greg Kroah-Hartman

This reverts commit 52b894393cecdc303990e834778d39b85d0553fc.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc https
Cc Hannes Reinecke <[email protected]>
Cc Aditya Pakki <[email protected]>
Cc Martin K. Petersen <[email protected]>
---
 drivers/target/tcm_fc/tfc_io.c | 1 +
 1 file changed, 1 insertion(+)
drivers/target/tcm_fc/tfc_io.c +1 -0
index bbe2e29612fa..15d557a11f63 100644
@@ -220,6 +220,7 @@ void ft_recv_write_data(struct ft_cmd *cmd, struct fc_frame *fp)
 	ep = fc_seq_exch(seq);
 	lport = ep->lp;
 	if (cmd->was_ddp_setup) {
+		BUG_ON(!ep);
 		BUG_ON(!lport);
 		/*
 		 * Since DDP (Large Rx offload) was setup for this request,
Signature · 1 line
2.31.1

The original was obviously correct, so I'll drop this revert.

thanks,

greg k-h

author maintainer
#182 lore raw

PATCH 63/190 Revert "hdlcdrv: replace unnecessary assertion in hdlcdrv_register"

In reply to Greg Kroah-Hartman

This reverts commit a886ca6fcfffd337482352f383c1002c72786b17.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/net/hamradio/hdlcdrv.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/hamradio/hdlcdrv.c +2 -0
index 9e0058154ac3..d8df4e2b162e 100644
@@ -687,6 +687,8 @@ struct net_device *hdlcdrv_register(const struct hdlcdrv_ops *ops,
 	struct hdlcdrv_state *s;
 	int err;
 
+	BUG_ON(ops == NULL);
+
 	if (privsize < sizeof(struct hdlcdrv_state))
 		privsize = sizeof(struct hdlcdrv_state);
 
Signature · 1 line
2.31.1
author maintainer
#183 lore raw

Re: [PATCH 063/190] Revert "hdlcdrv: replace unnecessary assertion in hdlcdrv_register"

Quoted 39 lines · Greg Kroah-Hartman

This reverts commit a886ca6fcfffd337482352f383c1002c72786b17.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/net/hamradio/hdlcdrv.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/hamradio/hdlcdrv.c +2 -0
index 9e0058154ac3..d8df4e2b162e 100644
@@ -687,6 +687,8 @@ struct net_device *hdlcdrv_register(const struct hdlcdrv_ops *ops,
 	struct hdlcdrv_state *s;
 	int err;
 
+	BUG_ON(ops == NULL);
+
 	if (privsize < sizeof(struct hdlcdrv_state))
 		privsize = sizeof(struct hdlcdrv_state);
 
Signature · 1 line
2.31.1

Original was fine, dropping the revert now.

greg k-h

author maintainer
#184 lore raw

PATCH 64/190 Revert "nfc: s3fwrn5: replace the assertion with a WARN_ON"

In reply to Greg Kroah-Hartman

This reverts commit 615f22f58029aa747b12768985e7f91cd053daa2.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/nfc/s3fwrn5/firmware.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/nfc/s3fwrn5/firmware.c +1 -4
index eb5d7a5beac7..f77f183c9bd0 100644
@@ -492,10 +492,7 @@ int s3fwrn5_fw_recv_frame(struct nci_dev *ndev, struct sk_buff *skb)
 	struct s3fwrn5_info *info = nci_get_drvdata(ndev);
 	struct s3fwrn5_fw_info *fw_info = &info->fw_info;
 
-	if (WARN_ON(fw_info->rsp)) {
-		kfree_skb(skb);
-		return -EINVAL;
-	}
+	BUG_ON(fw_info->rsp);
 
 	fw_info->rsp = skb;
 
Signature · 1 line
2.31.1
#185 lore raw

Re: [PATCH 064/190] Revert "nfc: s3fwrn5: replace the assertion with a WARN_ON"

Quoted 28 lines · Greg Kroah-Hartman

This reverts commit 615f22f58029aa747b12768985e7f91cd053daa2.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/nfc/s3fwrn5/firmware.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/nfc/s3fwrn5/firmware.c +0 -0
index eb5d7a5beac7..f77f183c9bd0 100644

drivers/nfc/s3fwrn5/firmware.c int s3fwrn5_fw_recv_frame(struct nci_dev *ndev, struct sk_buff *skb) · line 495

Quoted 8 lines
drivers/nfc/s3fwrn5/firmware.c +1 -4
@@ -492,10 +492,7 @@ int s3fwrn5_fw_recv_frame(struct nci_dev *ndev, struct sk_buff *skb)
 	struct s3fwrn5_info *info = nci_get_drvdata(ndev);
 	struct s3fwrn5_fw_info *fw_info = &info->fw_info;
 
-	if (WARN_ON(fw_info->rsp)) {
-		kfree_skb(skb);
-		return -EINVAL;
-	}
+	BUG_ON(fw_info->rsp);

It took me some time to understand this but the original commit looks correct. The recv_frame functions s3fwrn5_recv_frame() or nci_recv_frame() should free the skb buffer on errors. Here, the s3fwrn5_fw_recv_frame() should be called only after sending a FW msg and is expected to have fw_info->rsp=NULL. Otherwise it could mean that frame came twice or it came when we did not ask for it.

Original code looks good, please drop the revert.

Best regards,
Krzysztof

author maintainer
#186 lore raw

Re: [PATCH 064/190] Revert "nfc: s3fwrn5: replace the assertion with a WARN_ON"

Quoted 45 lines · Krzysztof Kozlowski
Quoted 28 lines · Greg Kroah-Hartman

This reverts commit 615f22f58029aa747b12768985e7f91cd053daa2.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/nfc/s3fwrn5/firmware.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/nfc/s3fwrn5/firmware.c +0 -0
index eb5d7a5beac7..f77f183c9bd0 100644

drivers/nfc/s3fwrn5/firmware.c int s3fwrn5_fw_recv_frame(struct nci_dev *ndev, struct sk_buff *skb) · line 495

Quoted 8 lines
drivers/nfc/s3fwrn5/firmware.c +1 -4
@@ -492,10 +492,7 @@ int s3fwrn5_fw_recv_frame(struct nci_dev *ndev, struct sk_buff *skb)
 	struct s3fwrn5_info *info = nci_get_drvdata(ndev);
 	struct s3fwrn5_fw_info *fw_info = &info->fw_info;
 
-	if (WARN_ON(fw_info->rsp)) {
-		kfree_skb(skb);
-		return -EINVAL;
-	}
+	BUG_ON(fw_info->rsp);

It took me some time to understand this but the original commit looks correct. The recv_frame functions s3fwrn5_recv_frame() or nci_recv_frame() should free the skb buffer on errors. Here, the s3fwrn5_fw_recv_frame() should be called only after sending a FW msg and is expected to have fw_info->rsp=NULL. Otherwise it could mean that frame came twice or it came when we did not ask for it.

Quoted 1 line

Original code looks good, please drop the revert.

Thanks for the review, I've dropped the revert now.

greg k-h

author maintainer
#187 lore raw

PATCH 65/190 Revert "nfsd: remove unnecessary assertion in nfsd4_encode_replay"

In reply to Greg Kroah-Hartman

This reverts commit fc1b20659597015a30e8ea032f168e97848c1d39.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc J. Bruce Fields <[email protected]>
---
 fs/nfsd/nfs4xdr.c | 2 ++
 1 file changed, 2 insertions(+)
fs/nfsd/nfs4xdr.c +2 -0
index eaaa1605b5b5..a3609562671c 100644
@@ -5385,6 +5385,8 @@ nfsd4_encode_replay(struct xdr_stream *xdr, struct nfsd4_op *op)
 	__be32 *p;
 	struct nfs4_replay *rp = op->replay;
 
+	BUG_ON(!rp);
+
 	p = xdr_reserve_space(xdr, 8 + rp->rp_buflen);
 	if (!p) {
 		WARN_ON_ONCE(1);
Signature · 1 line
2.31.1
#188 lore raw

Re: [PATCH 065/190] Revert "nfsd: remove unnecessary assertion in nfsd4_encode_replay"

This patch was fine, NAK to the revert.

--b.

Quoted 39 lines · Greg Kroah-Hartman

This reverts commit fc1b20659597015a30e8ea032f168e97848c1d39.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc J. Bruce Fields <[email protected]>
---
 fs/nfsd/nfs4xdr.c | 2 ++
 1 file changed, 2 insertions(+)
fs/nfsd/nfs4xdr.c +2 -0
index eaaa1605b5b5..a3609562671c 100644
@@ -5385,6 +5385,8 @@ nfsd4_encode_replay(struct xdr_stream *xdr, struct nfsd4_op *op)
 	__be32 *p;
 	struct nfs4_replay *rp = op->replay;
 
+	BUG_ON(!rp);
+
 	p = xdr_reserve_space(xdr, 8 + rp->rp_buflen);
 	if (!p) {
 		WARN_ON_ONCE(1);
Signature · 1 line
2.31.1
author maintainer
#189 lore raw

Re: [PATCH 065/190] Revert "nfsd: remove unnecessary assertion in nfsd4_encode_replay"

Quoted 1 line · J. Bruce Fields

This patch was fine, NAK to the revert.

Thanks for the review, I have dropped the revert from my tree.

greg k-h

author maintainer
#190 lore raw

PATCH 66/190 Revert "bpf: Remove unnecessary assertion on fp_old"

In reply to Greg Kroah-Hartman

This reverts commit 5bf2fc1f9c88397b125d5ec5f65b1ed9300ba59d.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Daniel Borkmann <[email protected]>
Cc https
---
 kernel/bpf/core.c | 2 ++
 1 file changed, 2 insertions(+)
kernel/bpf/core.c +2 -0
index 75244ecb2389..da29211ea5d8 100644
@@ -230,6 +230,8 @@ struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size,
 	struct bpf_prog *fp;
 	u32 pages;
 
+	BUG_ON(fp_old == NULL);
+
 	size = round_up(size, PAGE_SIZE);
 	pages = size / PAGE_SIZE;
 	if (pages <= fp_old->pages)
Signature · 1 line
2.31.1
author maintainer
#191 lore raw

Re: [PATCH 066/190] Revert "bpf: Remove unnecessary assertion on fp_old"

Quoted 40 lines · Greg Kroah-Hartman

This reverts commit 5bf2fc1f9c88397b125d5ec5f65b1ed9300ba59d.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Daniel Borkmann <[email protected]>
Cc https
---
 kernel/bpf/core.c | 2 ++
 1 file changed, 2 insertions(+)
kernel/bpf/core.c +2 -0
index 75244ecb2389..da29211ea5d8 100644
@@ -230,6 +230,8 @@ struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size,
 	struct bpf_prog *fp;
 	u32 pages;
 
+	BUG_ON(fp_old == NULL);
+
 	size = round_up(size, PAGE_SIZE);
 	pages = size / PAGE_SIZE;
 	if (pages <= fp_old->pages)
Signature · 1 line
2.31.1

The original commit here is correct, I'll drop this revert.

thanks,

greg k-h

#192 lore raw

Re: [PATCH 066/190] Revert "bpf: Remove unnecessary assertion on fp_old"

Quoted 34 lines · Greg Kroah-Hartman
Quoted 32 lines · Greg Kroah-Hartman

This reverts commit 5bf2fc1f9c88397b125d5ec5f65b1ed9300ba59d.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc Daniel Borkmann <[email protected]>
Cc https
---
 kernel/bpf/core.c | 2 ++
 1 file changed, 2 insertions(+)
kernel/bpf/core.c +0 -0
index 75244ecb2389..da29211ea5d8 100644
@@ -230,6 +230,8 @@ struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size,
      struct bpf_prog *fp;
      u32 pages;
 
Quoted 10 lines
Quoted 8 lines
kernel/bpf/core.c +2 -1
+     BUG_ON(fp_old == NULL);
+
      size = round_up(size, PAGE_SIZE);
      pages = size / PAGE_SIZE;
      if (pages <= fp_old->pages)
--

2.31.1

The original commit here is correct, I'll drop this revert.

Yes. No need to revert. The original commit removed BUG_ON and it's fine. Thanks for checking.

maintainer
#193 lore raw

Re: [PATCH 066/190] Revert "bpf: Remove unnecessary assertion on fp_old"

In reply to Greg Kroah-Hartman
Quoted 1 line · Greg Kroah-Hartman

On Wed, Apr 21, 2021 at 02:59:01PM +0200, Greg Kroah-Hartman wrote:

[...]

Quoted 11 lines
Quoted 11 lines
  kernel/bpf/core.c | 2 ++
  1 file changed, 2 insertions(+)
kernel/bpf/core.c +0 -0
index 75244ecb2389..da29211ea5d8 100644
@@ -230,6 +230,8 @@ struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size,
  	struct bpf_prog *fp;
  	u32 pages;
 
Quoted 7 lines

kernel/bpf/core.c struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size, · line 237

Quoted 5 lines
kernel/bpf/core.c +2 -0
+	BUG_ON(fp_old == NULL);
+
  	size = round_up(size, PAGE_SIZE);
  	pages = size / PAGE_SIZE;
  	if (pages <= fp_old->pages)

The original commit here is correct, I'll drop this revert.

Ok, sounds good to me, thanks! (If there would ever be an incorrect fp_old with NULL, then at latest we crash in fp_old->pages anyway, so the BUG_ON() was not needed.)

Quoted 4 lines

thanks,

greg k-h

author maintainer
#194 lore raw

Re: [PATCH 066/190] Revert "bpf: Remove unnecessary assertion on fp_old"

Quoted 21 lines · Daniel Borkmann
Quoted 1 line · Greg Kroah-Hartman

On Wed, Apr 21, 2021 at 02:59:01PM +0200, Greg Kroah-Hartman wrote:

[...]

Quoted 17 lines
Quoted 8 lines
  kernel/bpf/core.c | 2 ++
  1 file changed, 2 insertions(+)
kernel/bpf/core.c +0 -0
index 75244ecb2389..da29211ea5d8 100644

kernel/bpf/core.c struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size, · line 236

Quoted 7 lines
kernel/bpf/core.c +2 -0
@@ -230,6 +230,8 @@ struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size,
  	struct bpf_prog *fp;
  	u32 pages;
+	BUG_ON(fp_old == NULL);
+
  	size = round_up(size, PAGE_SIZE);
  	pages = size / PAGE_SIZE;
  	if (pages <= fp_old->pages)

The original commit here is correct, I'll drop this revert.

Quoted 2 lines

Ok, sounds good to me, thanks! (If there would ever be an incorrect fp_old with NULL, then at latest we crash in fp_old->pages anyway, so the BUG_ON() was not needed.)

Thanks for the re-review, much appreciated.

greg k-h

author maintainer
#195 lore raw

PATCH 67/190 Revert "net: caif: replace BUG_ON with recovery code"

In reply to Greg Kroah-Hartman

This reverts commit c5dea815834c7d2e9fc633785455bc428b7a1956.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/net/caif/caif_serial.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/caif/caif_serial.c +1 -3
index 8215cd77301f..4720a7bac4fb 100644
@@ -269,9 +269,7 @@ static netdev_tx_t caif_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct ser_device *ser;
 
-	if (WARN_ON(!dev))
-		return -EINVAL;
-
+	BUG_ON(dev == NULL);
 	ser = netdev_priv(dev);
 
 	/* Send flow off once, on high water mark */
Signature · 1 line
2.31.1
author maintainer
#196 lore raw

Re: [PATCH 067/190] Revert "net: caif: replace BUG_ON with recovery code"

Quoted 41 lines · Greg Kroah-Hartman

This reverts commit c5dea815834c7d2e9fc633785455bc428b7a1956.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/net/caif/caif_serial.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/caif/caif_serial.c +1 -3
index 8215cd77301f..4720a7bac4fb 100644
@@ -269,9 +269,7 @@ static netdev_tx_t caif_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct ser_device *ser;
 
-	if (WARN_ON(!dev))
-		return -EINVAL;
-
+	BUG_ON(dev == NULL);
 	ser = netdev_priv(dev);
 
 	/* Send flow off once, on high water mark */
Signature · 1 line
2.31.1

This commit was pointless, the check should just be removed entirely as it is impossible to hit. I'll keep the revert and fix it up properly in a follow-on patch.

thanks,

greg k-h

author maintainer
#197 lore raw

PATCH 68/190 Revert "fore200e: Fix incorrect checks of NULL pointer dereference"

In reply to Greg Kroah-Hartman

This reverts commit bbd20c939c8aa3f27fa30e86691af250bf92973a.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/atm/fore200e.c | 25 +++++++------------------
 1 file changed, 7 insertions(+), 18 deletions(-)
drivers/atm/fore200e.c +7 -18
index 495fd0a1f040..e83286e3216e 100644
@@ -1412,14 +1412,12 @@ fore200e_open(struct atm_vcc *vcc)
 static void
 fore200e_close(struct atm_vcc* vcc)
 {
+    struct fore200e*        fore200e = FORE200E_DEV(vcc->dev);
     struct fore200e_vcc*    fore200e_vcc;
-    struct fore200e*        fore200e;
     struct fore200e_vc_map* vc_map;
     unsigned long           flags;
 
     ASSERT(vcc);
-    fore200e = FORE200E_DEV(vcc->dev);
-
     ASSERT((vcc->vpi >= 0) && (vcc->vpi < 1<<FORE200E_VPI_BITS));
     ASSERT((vcc->vci >= 0) && (vcc->vci < 1<<FORE200E_VCI_BITS));
 
@@ -1464,10 +1462,10 @@ fore200e_close(struct atm_vcc* vcc)
 static int
 fore200e_send(struct atm_vcc *vcc, struct sk_buff *skb)
 {
-    struct fore200e*        fore200e;
-    struct fore200e_vcc*    fore200e_vcc;
+    struct fore200e*        fore200e     = FORE200E_DEV(vcc->dev);
+    struct fore200e_vcc*    fore200e_vcc = FORE200E_VCC(vcc);
     struct fore200e_vc_map* vc_map;
-    struct host_txq*        txq;
+    struct host_txq*        txq          = &fore200e->host_txq;
     struct host_txq_entry*  entry;
     struct tpd*             tpd;
     struct tpd_haddr        tpd_haddr;
@@ -1480,18 +1478,9 @@ fore200e_send(struct atm_vcc *vcc, struct sk_buff *skb)
     unsigned char*          data;
     unsigned long           flags;
 
-    if (!vcc)
-        return -EINVAL;
-
-    fore200e = FORE200E_DEV(vcc->dev);
-    fore200e_vcc = FORE200E_VCC(vcc);
-
-    if (!fore200e)
-        return -EINVAL;
-
-    txq = &fore200e->host_txq;
-    if (!fore200e_vcc)
-        return -EINVAL;
+    ASSERT(vcc);
+    ASSERT(fore200e);
+    ASSERT(fore200e_vcc);
 
     if (!test_bit(ATM_VF_READY, &vcc->flags)) {
 	DPRINTK(1, "VC %d.%d.%d not ready for tx\n", vcc->itf, vcc->vpi, vcc->vpi);
Signature · 1 line
2.31.1
author maintainer
#198 lore raw

Re: [PATCH 068/190] Revert "fore200e: Fix incorrect checks of NULL pointer dereference"

Quoted 82 lines · Greg Kroah-Hartman

This reverts commit bbd20c939c8aa3f27fa30e86691af250bf92973a.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/atm/fore200e.c | 25 +++++++------------------
 1 file changed, 7 insertions(+), 18 deletions(-)
drivers/atm/fore200e.c +7 -18
index 495fd0a1f040..e83286e3216e 100644
@@ -1412,14 +1412,12 @@ fore200e_open(struct atm_vcc *vcc)
 static void
 fore200e_close(struct atm_vcc* vcc)
 {
+    struct fore200e*        fore200e = FORE200E_DEV(vcc->dev);
     struct fore200e_vcc*    fore200e_vcc;
-    struct fore200e*        fore200e;
     struct fore200e_vc_map* vc_map;
     unsigned long           flags;
 
     ASSERT(vcc);
-    fore200e = FORE200E_DEV(vcc->dev);
-
     ASSERT((vcc->vpi >= 0) && (vcc->vpi < 1<<FORE200E_VPI_BITS));
     ASSERT((vcc->vci >= 0) && (vcc->vci < 1<<FORE200E_VCI_BITS));
 
@@ -1464,10 +1462,10 @@ fore200e_close(struct atm_vcc* vcc)
 static int
 fore200e_send(struct atm_vcc *vcc, struct sk_buff *skb)
 {
-    struct fore200e*        fore200e;
-    struct fore200e_vcc*    fore200e_vcc;
+    struct fore200e*        fore200e     = FORE200E_DEV(vcc->dev);
+    struct fore200e_vcc*    fore200e_vcc = FORE200E_VCC(vcc);
     struct fore200e_vc_map* vc_map;
-    struct host_txq*        txq;
+    struct host_txq*        txq          = &fore200e->host_txq;
     struct host_txq_entry*  entry;
     struct tpd*             tpd;
     struct tpd_haddr        tpd_haddr;
@@ -1480,18 +1478,9 @@ fore200e_send(struct atm_vcc *vcc, struct sk_buff *skb)
     unsigned char*          data;
     unsigned long           flags;
 
-    if (!vcc)
-        return -EINVAL;
-
-    fore200e = FORE200E_DEV(vcc->dev);
-    fore200e_vcc = FORE200E_VCC(vcc);
-
-    if (!fore200e)
-        return -EINVAL;
-
-    txq = &fore200e->host_txq;
-    if (!fore200e_vcc)
-        return -EINVAL;
+    ASSERT(vcc);
+    ASSERT(fore200e);
+    ASSERT(fore200e_vcc);
 
     if (!test_bit(ATM_VF_READY, &vcc->flags)) {
 	DPRINTK(1, "VC %d.%d.%d not ready for tx\n", vcc->itf, vcc->vpi, vcc->vpi);
Signature · 1 line
2.31.1

Wow, the names in this code bring back memories...

Anyway, the original looks correct, but could have been written a lot better, it's quite "twisty" for something that should have been very simple to make "obvious".

I'll drop this revert.

thanks,

greg k-h

author maintainer
#199 lore raw

PATCH 69/190 Revert "mac80211: Remove redundant assertion"

In reply to Greg Kroah-Hartman

This reverts commit 1ee7826ab68f7e9fa1a01533983acf6a6f62e297.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc https
Cc Johannes Berg <[email protected]>
---
 net/mac80211/util.c | 1 +
 1 file changed, 1 insertion(+)
net/mac80211/util.c +1 -0
index c0fa526a45b4..2de2e655be59 100644
@@ -39,6 +39,7 @@ const void *const mac80211_wiphy_privid = &mac80211_wiphy_privid;
 struct ieee80211_hw *wiphy_to_ieee80211_hw(struct wiphy *wiphy)
 {
 	struct ieee80211_local *local;
+	BUG_ON(!wiphy);
 
 	local = wiphy_priv(wiphy);
 	return &local->hw;
Signature · 1 line
2.31.1
maintainer
#200 lore raw

Re: [PATCH 069/190] Revert "mac80211: Remove redundant assertion"

Quoted 2 lines · Greg Kroah-Hartman

This reverts commit 1ee7826ab68f7e9fa1a01533983acf6a6f62e297.

That commit was actually correct, though sort of irrelevant. I think we can go either way on it, but better not spend any (more) time on it.

johannes

author maintainer
#201 lore raw

Re: [PATCH 069/190] Revert "mac80211: Remove redundant assertion"

Quoted 6 lines · Johannes Berg
Quoted 2 lines · Greg Kroah-Hartman

This reverts commit 1ee7826ab68f7e9fa1a01533983acf6a6f62e297.

That commit was actually correct, though sort of irrelevant. I think we can go either way on it, but better not spend any (more) time on it.

I'll drop it, thanks!

greg k-h

author maintainer
#202 lore raw

PATCH 70/190 Revert "rfkill: Fix incorrect check to avoid NULL pointer dereference"

In reply to Greg Kroah-Hartman

This reverts commit 6fc232db9e8cd50b9b83534de9cd91ace711b2d7.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc https
Cc Johannes Berg <[email protected]>
---
 net/rfkill/core.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
net/rfkill/core.c +2 -5
index ac15a944573f..8a27164d7f5f 100644
@@ -1033,13 +1033,10 @@ static void rfkill_sync_work(struct work_struct *work)
 int __must_check rfkill_register(struct rfkill *rfkill)
 {
 	static unsigned long rfkill_no;
-	struct device *dev;
+	struct device *dev = &rfkill->dev;
 	int error;
 
-	if (!rfkill)
-		return -EINVAL;
-
-	dev = &rfkill->dev;
+	BUG_ON(!rfkill);
 
 	mutex_lock(&rfkill_global_mutex);
 
Signature · 1 line
2.31.1
maintainer
#203 lore raw

Re: [PATCH 070/190] Revert "rfkill: Fix incorrect check to avoid NULL pointer dereference"

Quoted 1 line · Greg Kroah-Hartman

This reverts commit 6fc232db9e8cd50b9b83534de9cd91ace711b2d7.

This commit was fine, though the commit log is misleading since there's no dereference yet, just a pointer calculation. I may not have seen that at the time, or have decided that the slight commit log inaccuracy didn't matter.

I'm inclined towards keeping it, since it removed a BUG_ON(), but there's no reasonable scenario where somebody could end up calling this function with a NULL pointer.

johannes

author maintainer
#204 lore raw

Re: [PATCH 070/190] Revert "rfkill: Fix incorrect check to avoid NULL pointer dereference"

Quoted 11 lines · Johannes Berg
Quoted 1 line · Greg Kroah-Hartman

This reverts commit 6fc232db9e8cd50b9b83534de9cd91ace711b2d7.

This commit was fine, though the commit log is misleading since there's no dereference yet, just a pointer calculation. I may not have seen that at the time, or have decided that the slight commit log inaccuracy didn't matter.

I'm inclined towards keeping it, since it removed a BUG_ON(), but there's no reasonable scenario where somebody could end up calling this function with a NULL pointer.

Yeah, these "pointless" patches are not good as they waste maintainers bandwidth, which is why I want to discourage them.

thanks for reviewing these reverts, much apprecated.

greg k-h

author maintainer
#205 lore raw

Re: [PATCH 070/190] Revert "rfkill: Fix incorrect check to avoid NULL pointer dereference"

In reply to Johannes Berg
Quoted 11 lines · Johannes Berg
Quoted 1 line · Greg Kroah-Hartman

This reverts commit 6fc232db9e8cd50b9b83534de9cd91ace711b2d7.

This commit was fine, though the commit log is misleading since there's no dereference yet, just a pointer calculation. I may not have seen that at the time, or have decided that the slight commit log inaccuracy didn't matter.

I'm inclined towards keeping it, since it removed a BUG_ON(), but there's no reasonable scenario where somebody could end up calling this function with a NULL pointer.

I've dropped this revert from my tree now, thanks.

greg k-h

author maintainer
#206 lore raw

PATCH 71/190 Revert "pppoe: remove redundant BUG_ON() check in pppoe_pernet"

In reply to Greg Kroah-Hartman

This reverts commit 02a896ca84874bbfcedc006303f2951dda89b298.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/net/ppp/pppoe.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ppp/pppoe.c +2 -0
index d7f50b835050..803a4fe1ca18 100644
@@ -119,6 +119,8 @@ static inline bool stage_session(__be16 sid)
 
 static inline struct pppoe_net *pppoe_pernet(struct net *net)
 {
+	BUG_ON(!net);
+
 	return net_generic(net, pppoe_net_id);
 }
 
Signature · 1 line
2.31.1
author maintainer
#207 lore raw

Re: [PATCH 071/190] Revert "pppoe: remove redundant BUG_ON() check in pppoe_pernet"

Quoted 39 lines · Greg Kroah-Hartman

This reverts commit 02a896ca84874bbfcedc006303f2951dda89b298.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/net/ppp/pppoe.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ppp/pppoe.c +2 -0
index d7f50b835050..803a4fe1ca18 100644
@@ -119,6 +119,8 @@ static inline bool stage_session(__be16 sid)
 
 static inline struct pppoe_net *pppoe_pernet(struct net *net)
 {
+	BUG_ON(!net);
+
 	return net_generic(net, pppoe_net_id);
 }
 
Signature · 1 line
2.31.1

THe original here was correct so I'll drop this revert.

greg k-h

author maintainer
#208 lore raw

PATCH 72/190 Revert "net: atm: Reduce the severity of logging in unlink_clip_vcc"

In reply to Greg Kroah-Hartman

This reverts commit 60f5c4aaae452ae9252128ef7f9ae222aa70c569.

Commits from @umn.edu addresses have been found to be submitted in "bad faith" to try to test the kernel community's ability to review "known malicious" changes. The result of these submissions can be found in a paper published at the 42nd IEEE Symposium on Security and Privacy entitled, "Open Source Insecurity: Stealthily Introducing Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University of Minnesota) and Kangjie Lu (University of Minnesota).

Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase.

Cc Aditya Pakki <[email protected]>
Cc David S. Miller <[email protected]>
---
 net/atm/clip.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
net/atm/clip.c +3 -3
index 294cb9efe3d3..a7972da7235d 100644
@@ -89,7 +89,7 @@ static void unlink_clip_vcc(struct clip_vcc *clip_vcc)
 	struct clip_vcc **walk;
 
 	if (!entry) {
-		pr_err("!clip_vcc->entry (clip_vcc %p)\n", clip_vcc);
+		pr_crit("!clip_vcc->entry (clip_vcc %p)\n", clip_vcc);
 		return;
 	}
 	netif_tx_lock_bh(entry->neigh->dev);	/* block clip_start_xmit() */
@@ -109,10 +109,10 @@ static void unlink_clip_vcc(struct clip_vcc *clip_vcc)
 			error = neigh_update(entry->neigh, NULL, NUD_NONE,
 					     NEIGH_UPDATE_F_ADMIN, 0);
 			if (error)
-				pr_err("neigh_update failed with %d\n", error);
+				pr_crit("neigh_update failed with %d\n", error);
 			goto out;
 		}
-	pr_err("ATMARP: failed (entry %p, vcc 0x%p)\n", entry, clip_vcc);
+	pr_crit("ATMARP: failed (entry %p, vcc 0x%p)\n", entry, clip_vcc);
 out:
 	netif_tx_unlock_bh(entry->neigh->dev);
 }
Signature · 1 line
2.31.1