ci2 starts bisection 2025-03-23 05:15:12.705223657 +0000 UTC m=+6929.803451350 bisecting fixing commit since 0a51d2d4527b43c5e467ffa6897deefeaf499358 building syzkaller on cfe3a04a188eb9a2c407783d8d6e6f55a4b30886 ensuring issue is reproducible on original commit 0a51d2d4527b43c5e467ffa6897deefeaf499358 testing commit 0a51d2d4527b43c5e467ffa6897deefeaf499358 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 91bdbb44fbf1caa1e5cfcc81e75340a9d97a38831b24fe856f78d2451726dc8e all runs: crashed: possible deadlock in ocfs2_reserve_suballoc_bits representative crash: possible deadlock in ocfs2_reserve_suballoc_bits, types: [LOCKDEP] check whether we can drop unnecessary instrumentation disabling configs for [ATOMIC_SLEEP HANG LEAK UBSAN BUG KASAN], they are not needed testing commit 0a51d2d4527b43c5e467ffa6897deefeaf499358 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 5e7632426dee95b6aac9d55e9a4d8b3e364be4fe6643c5cda6e75392c845e9c3 all runs: crashed: possible deadlock in ocfs2_reserve_suballoc_bits representative crash: possible deadlock in ocfs2_reserve_suballoc_bits, types: [LOCKDEP] the bug reproduces without the instrumentation disabling configs for [UBSAN BUG KASAN ATOMIC_SLEEP HANG LEAK], they are not needed kconfig minimization: base=3706 full=7302 leaves diff=2037 split chunks (needed=false): <2037> split chunk #0 of len 2037 into 5 parts testing without sub-chunk 1/5 disabling configs for [KASAN ATOMIC_SLEEP HANG LEAK UBSAN BUG], they are not needed testing commit 0a51d2d4527b43c5e467ffa6897deefeaf499358 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 1ea60d73c12933b9b36f80b89f32782cf973ee1c4a24b2f1b1daa9b77e00742c all runs: crashed: possible deadlock in ocfs2_reserve_suballoc_bits representative crash: possible deadlock in ocfs2_reserve_suballoc_bits, types: [LOCKDEP] the chunk can be dropped testing without sub-chunk 2/5 disabling configs for [UBSAN BUG KASAN ATOMIC_SLEEP HANG LEAK], they are not needed testing commit 0a51d2d4527b43c5e467ffa6897deefeaf499358 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 43fbc6878be7e2b045f73d4162153e4540f2c67b1432c79dfdd465d2b8b584f2 all runs: crashed: possible deadlock in ocfs2_reserve_suballoc_bits representative crash: possible deadlock in ocfs2_reserve_suballoc_bits, types: [LOCKDEP] the chunk can be dropped testing without sub-chunk 3/5 disabling configs for [BUG KASAN ATOMIC_SLEEP HANG LEAK UBSAN], they are not needed testing commit 0a51d2d4527b43c5e467ffa6897deefeaf499358 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: ca7b9c8a57af022cc7f747daddc22eabc57cd9b940bc1ba12e475433fd0176d3 all runs: crashed: possible deadlock in ocfs2_reserve_suballoc_bits representative crash: possible deadlock in ocfs2_reserve_suballoc_bits, types: [LOCKDEP] the chunk can be dropped testing without sub-chunk 4/5 disabling configs for [UBSAN BUG KASAN ATOMIC_SLEEP HANG LEAK], they are not needed testing commit 0a51d2d4527b43c5e467ffa6897deefeaf499358 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: b9f3470561446ddbd32f09b210e6742a2c0fdfa3f4eb8513f6331ca4312b4bb4 all runs: OK false negative chance: 0.000 testing without sub-chunk 5/5 disabling configs for [HANG LEAK UBSAN BUG KASAN ATOMIC_SLEEP], they are not needed testing commit 0a51d2d4527b43c5e467ffa6897deefeaf499358 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 95011a4e92bb91e9493626deeae746aaee32d7601a486928af1f2764efc2380e all runs: crashed: possible deadlock in ocfs2_reserve_suballoc_bits representative crash: possible deadlock in ocfs2_reserve_suballoc_bits, types: [LOCKDEP] the chunk can be dropped minimized to 408 configs; suspects: [AF_RXRPC ARCH_ENABLE_MEMORY_HOTREMOVE ASYMMETRIC_TPM_KEY_SUBTYPE ATM AX25 BXT_WC_PMIC_OPREGION CFG80211 CMA DAX DLM DVB_CORE ENCRYPTED_KEYS EXTCON GENEVE GPIOLIB HAMRADIO HID_PLAYSTATION HID_SENSOR_HUB HID_SMARTJOYPLUS HID_THRUSTMASTER IIO INFINIBAND INFINIBAND_ADDR_TRANS INFINIBAND_IPOIB INFINIBAND_USER_ACCESS INFINIBAND_VIRT_DMA INPUT_TABLET INPUT_TOUCHSCREEN INTEL_SCU_IPC INTEL_SOC_PMIC_BXTWC IP_SCTP L2TP LIBCRC32C LIBNVDIMM MEDIA_COMMON_OPTIONS MEDIA_DIGITAL_TV_SUPPORT MEDIA_PLATFORM_SUPPORT MEDIA_RADIO_SUPPORT MEDIA_SDR_SUPPORT MEDIA_SUPPORT MEDIA_USB_SUPPORT MEMORY_HOTPLUG MEMORY_HOTREMOVE MFD_DLN2 MFD_INTEL_PMC_BXT MFD_MT6360 MFD_RETU MMC MTD MTD_UBI NETFILTER_CONNCOUNT NET_IPGRE NET_IPGRE_DEMUX NFS_V4_1 NLS_CODEPAGE_869 NLS_CODEPAGE_874 NLS_CODEPAGE_932 NLS_CODEPAGE_936 NLS_CODEPAGE_949 NLS_CODEPAGE_950 NLS_ISO8859_13 NLS_ISO8859_14 NLS_ISO8859_15 NLS_ISO8859_2 NLS_ISO8859_3 NLS_ISO8859_4 NLS_ISO8859_5 NLS_ISO8859_6 NLS_ISO8859_7 NLS_ISO8859_8 NLS_ISO8859_9 NLS_KOI8_R NLS_KOI8_U NLS_MAC_CELTIC NLS_MAC_CENTEURO NLS_MAC_CROATIAN NLS_MAC_CYRILLIC NLS_MAC_GAELIC NLS_MAC_GREEK NLS_MAC_ICELAND NLS_MAC_INUIT NLS_MAC_ROMAN NLS_MAC_ROMANIAN NLS_MAC_TURKISH NOP_USB_XCEIV NOZOMI NTFS3_FS NTFS3_FS_POSIX_ACL NTFS3_LZX_XPRESS NTFS_FS NTFS_RW NULL_TTY NUMA_BALANCING NUMA_BALANCING_DEFAULT_ENABLED NUMA_EMU NUMA_KEEP_MEMINFO NVDIMM_DAX NVDIMM_KEYS NVDIMM_PFN NVME_CORE NVME_FABRICS NVME_FC NVME_MULTIPATH NVME_RDMA NVME_TARGET NVME_TARGET_FC NVME_TARGET_FCLOOP NVME_TARGET_LOOP NVME_TARGET_RDMA NVME_TARGET_TCP NVME_TCP N_GSM N_HDLC OCFS2_DEBUG_FS OCFS2_FS OCFS2_FS_O2CB OCFS2_FS_STATS OCFS2_FS_USERSPACE_CLUSTER OF_GPIO OF_PMEM OMFS_FS OPENVSWITCH OPENVSWITCH_GENEVE OPENVSWITCH_GRE OPENVSWITCH_VXLAN ORANGEFS_FS OSF_PARTITION OVERLAY_FS OVERLAY_FS_INDEX OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW OVERLAY_FS_REDIRECT_DIR PACKET_DIAG PADATA PAGE_IDLE_FLAG PAGE_REPORTING PAHOLE_HAS_SPLIT_BTF PARPORT PARPORT_NOT_PC PARTITION_ADVANCED PCCARD PCCARD_NONSTATIC PCIEAER PCI_ENDPOINT PCI_IOV PCMCIA PCMCIA_LOAD_CIS PERCPU_STATS PERSISTENT_KEYRINGS PHONET PHYLINK PHY_CPCAP_USB PHY_QCOM_USB_HS PHY_QCOM_USB_HSIC PHY_SAMSUNG_USB2 PHY_TUSB1210 PKCS7_TEST_KEY PKCS8_PRIVATE_KEY_PARSER PLAYSTATION_FF PMIC_OPREGION PNFS_BLOCK PNFS_FILE_LAYOUT PNFS_FLEXFILE_LAYOUT PPP PPPOATM PPPOE PPPOL2TP PPP_ASYNC PPP_BSDCOMP PPP_DEFLATE PPP_FILTER PPP_MPPE PPP_MULTILINK PPP_SYNC_TTY PPTP PREEMPT PREEMPT_DYNAMIC PREEMPT_NOTIFIERS PREEMPT_RCU PRISM2_USB PROC_CHILDREN PROC_MEM_ALWAYS_FORCE PSI PSTORE PSTORE_842_COMPRESS PSTORE_COMPRESS PSTORE_DEFLATE_COMPRESS PSTORE_DEFLATE_COMPRESS_DEFAULT PSTORE_LZ4HC_COMPRESS PSTORE_LZ4_COMPRESS PSTORE_LZO_COMPRESS PSTORE_ZSTD_COMPRESS QCOM_QMI_HELPERS QNX4FS_FS QNX6FS_FS QRTR QRTR_TUN R8712U RADIO_ADAPTERS RADIO_SHARK RADIO_SHARK2 RADIO_TEA575X RAID6_PQ RAID_ATTRS RC_ATI_REMOTE RC_CORE RC_DEVICES RC_XBOX_DVD RDMA_RXE RDMA_SIW RDS RDS_RDMA RDS_TCP READ_ONLY_THP_FOR_FS REALTEK_AUTOPM REED_SOLOMON REED_SOLOMON_DEC8 REGMAP REGMAP_I2C REGMAP_IRQ REGMAP_MMIO REGULATOR REGULATOR_FIXED_VOLTAGE REGULATOR_TWL4030 REISERFS_FS REISERFS_FS_POSIX_ACL REISERFS_FS_SECURITY REISERFS_FS_XATTR REISERFS_PROC_INFO RESET_CONTROLLER RFKILL RFKILL_INPUT RFKILL_LEDS RMI4_2D_SENSOR RMI4_CORE RMI4_F03 RMI4_F03_SERIO RMI4_F11 RMI4_F12 RMI4_F30 ROMFS_BACKED_BY_BOTH ROMFS_FS ROMFS_ON_BLOCK ROMFS_ON_MTD ROSE RTC_DRV_HID_SENSOR_TIME RXKAD SCHED_CORE SCSI_FC_ATTRS SCSI_HPSA SCSI_ISCSI_ATTRS SCSI_LOGGING SCSI_NETLINK SCSI_SAS_ATA SCSI_SAS_ATTRS SCSI_SAS_LIBSAS SCSI_SCAN_ASYNC SCSI_SRP_ATTRS SCTP_COOKIE_HMAC_MD5 SCTP_COOKIE_HMAC_SHA1 SCTP_DEFAULT_COOKIE_HMAC_MD5 SECONDARY_TRUSTED_KEYRING SECURITY_INFINIBAND SECURITY_NETWORK_XFRM SENSORS_AQUACOMPUTER_D5NEXT SENSORS_CORSAIR_CPRO SENSORS_CORSAIR_PSU SENSORS_NZXT_KRAKEN2 SERIAL_DEV_BUS SERIAL_DEV_CTRL_TTYPORT SERIAL_MCTRL_GPIO SGI_PARTITION SIGNATURE SIGNED_PE_FILE_VERIFICATION SLHC SLIP SLIP_COMPRESSED SLIP_MODE_SLIP6 SLIP_SMART SMARTJOYPLUS_FF SMBFS_COMMON SMC SMC_DIAG SMSC_PHY SMS_SDIO_DRV SMS_SIANO_DEBUGFS SMS_SIANO_MDTV SMS_SIANO_RC SMS_USB_DRV SND SND_ALOOP SND_BCD2000 SND_CTL_LED SND_CTL_VALIDATION SND_DEBUG SND_DMA_SGBUF SND_DRIVERS SND_DUMMY SND_DYNAMIC_MINORS SND_HDA SND_HDA_CODEC_ANALOG SND_HDA_CODEC_CA0110 SND_HDA_CODEC_CA0132 SND_HDA_CODEC_CIRRUS SND_HDA_CODEC_CMEDIA SND_HDA_CODEC_CONEXANT SND_HDA_CODEC_HDMI SND_HDA_CODEC_REALTEK SND_HDA_CODEC_SI3054 SND_HDA_CODEC_SIGMATEL SND_HDA_CODEC_VIA SND_HDA_COMPONENT SND_HDA_CORE SND_HDA_GENERIC SND_HDA_GENERIC_LEDS SND_HDA_HWDEP SND_HDA_I915 SND_HDA_INPUT_BEEP SND_HDA_INTEL SND_HDA_PATCH_LOADER SND_HDA_RECONFIG SND_HRTIMER SND_HWDEP SND_INTEL_DSP_CONFIG SND_INTEL_NHLT SND_INTEL_SOUNDWIRE_ACPI SND_JACK SND_JACK_INPUT_DEV SND_MIXER_OSS SND_OSSEMUL SND_PCI SND_PCM SND_PCMCIA SND_PCM_OSS SND_PCM_OSS_PLUGINS SND_PCM_TIMER SND_PCM_XRUN_DEBUG SND_PROC_FS SND_RAWMIDI SND_SEQUENCER SND_SEQUENCER_OSS SND_SEQ_DEVICE SND_SEQ_DUMMY SND_SEQ_HRTIMER_DEFAULT SND_SEQ_MIDI SND_SEQ_MIDI_EVENT SND_SEQ_VIRMIDI SND_SUPPORT_OLD_API SND_TIMER SND_USB SND_USB_6FIRE SND_USB_AUDIO SND_USB_AUDIO_USE_MEDIA_CONTROLLER SND_USB_CAIAQ SND_USB_CAIAQ_INPUT SND_USB_HIFACE SND_USB_LINE6 SND_USB_POD SND_USB_PODHD SND_USB_TONEPORT SND_USB_UA101 SND_USB_US122L SND_USB_USX2Y SND_USB_VARIAX SND_VERBOSE_PROCFS SND_VIRMIDI SND_VIRTIO SND_VMASTER SND_X86 SOCK_CGROUP_DATA SOCK_VALIDATE_XMIT SOLARIS_X86_PARTITION SONY_FF SOUND SOUND_OSS_CORE SOUND_OSS_CORE_PRECLAIM SPI SPI_DLN2 SPI_DYNAMIC SPI_MASTER SQUASHFS SQUASHFS_4K_DEVBLK_SIZE SQUASHFS_DECOMP_SINGLE SQUASHFS_FILE_DIRECT SQUASHFS_LZ4 SQUASHFS_LZO SQUASHFS_XATTR SQUASHFS_XZ SQUASHFS_ZLIB SQUASHFS_ZSTD SSB SSB_PCIHOST_POSSIBLE SSB_PCMCIAHOST_POSSIBLE SSB_SDIOHOST_POSSIBLE STAGING STP STREAM_PARSER SUNRPC_BACKCHANNEL SUN_PARTITION SW_SYNC SYSV68_PARTITION SYSV_FS TABLET_USB_ACECAD TABLET_USB_AIPTEK TABLET_USB_HANWANG TABLET_USB_KBTAB TABLET_USB_PEGASUS TAHVO_USB TAHVO_USB_HOST_BY_DEFAULT TASKS_RCU TASKS_RCU_GENERIC TASKS_TRACE_RCU TCG_CRB TCG_TIS TCG_TIS_CORE TCG_TPM TCP_CONG_BBR TCP_CONG_BIC TCP_CONG_CDG TCP_CONG_DCTCP TCP_CONG_HSTCP TCP_CONG_HTCP TCP_CONG_HYBLA TCP_CONG_ILLINOIS TCP_CONG_LP TCP_CONG_NV TCP_CONG_SCALABLE TCP_CONG_VEGAS TCP_CONG_VENO TCP_CONG_WESTWOOD TCP_CONG_YEAH TEXTSEARCH TEXTSEARCH_BM TEXTSEARCH_FSM TEXTSEARCH_KMP THERMAL_NETLINK THP_SWAP THRUSTMASTER_FF TIPC TIPC_CRYPTO TIPC_DIAG TIPC_MEDIA_IB TIPC_MEDIA_UDP TLS TLS_TOE TOUCHSCREEN_SUR40 TOUCHSCREEN_USB_3M TOUCHSCREEN_USB_COMPOSITE TOUCHSCREEN_USB_DMC_TSC10 TOUCHSCREEN_USB_E2I TOUCHSCREEN_USB_EASYTOUCH TOUCHSCREEN_USB_EGALAX TOUCHSCREEN_USB_ELO TOUCHSCREEN_USB_ETT_TC45USB TOUCHSCREEN_USB_ETURBO TOUCHSCREEN_USB_GENERAL_TOUCH TOUCHSCREEN_USB_GOTOP TOUCHSCREEN_USB_GUNZE TOUCHSCREEN_USB_IDEALTEK TOUCHSCREEN_USB_IRTOUCH TOUCHSCREEN_USB_ITM TOUCHSCREEN_USB_JASTEC TOUCHSCREEN_USB_NEXIO TOUCHSCREEN_USB_PANJIT TOUCHSCREEN_USB_ZYTRONIC TPM_KEY_PARSER TRANSPARENT_HUGEPAGE TRANSPARENT_HUGEPAGE_MADVISE TRUSTED_KEYS TTPCI_EEPROM TTY_PRINTK TUN_VNET_CROSS_LE TWL4030_CORE TYPEC TYPEC_DP_ALTMODE TYPEC_FUSB302 TYPEC_HD3SS3220 TYPEC_MT6360 TYPEC_MUX_INTEL_PMC TYPEC_NVIDIA_ALTMODE TYPEC_RT1711H TYPEC_STUSB160X TYPEC_TCPCI TYPEC_TCPCI_MAXIM TYPEC_TCPM TYPEC_TPS6598X TYPEC_UCSI TYPEC_WCOVE UBIFS_ATIME_SUPPORT UBIFS_FS UBIFS_FS_ADVANCED_COMPR UBIFS_FS_LZO UBIFS_FS_SECURITY UBIFS_FS_XATTR UBIFS_FS_ZLIB UBIFS_FS_ZSTD UCSI_ACPI UCSI_CCG UDF_FS UDMABUF UFS_FS UFS_FS_WRITE UHID ULTRIX_PARTITION UNICODE UNIXWARE_DISKLABEL UNIX_DIAG USB4 USB4_NET USBIP_CORE USBIP_HOST USBIP_VHCI_HCD USBIP_VUDC USBPCWATCHDOG USB_ACM USB_ADUTUX USB_AIRSPY USB_ALI_M5632 USB_AN2720 USB_APPLEDISPLAY USB_ARMLINUX USB_BDC_UDC USB_BELKIN USB_C67X00_HCD USB_CATC USB_CDC_PHONET USB_CDNS3 USB_CDNS3_GADGET USB_CDNS3_HOST USB_CDNS3_PCI_WRAP USB_CDNSP_GADGET USB_CDNSP_HOST USB_CDNSP_PCI USB_CDNS_HOST USB_CDNS_SUPPORT USB_CHAOSKEY USB_CHIPIDEA USB_CHIPIDEA_GENERIC USB_CHIPIDEA_HOST USB_CHIPIDEA_IMX USB_CHIPIDEA_MSM USB_CHIPIDEA_PCI USB_CHIPIDEA_TEGRA USB_CHIPIDEA_UDC USB_CONFIGFS USB_CONFIGFS_ACM USB_CONFIGFS_ECM USB_CONFIGFS_ECM_SUBSET USB_CONFIGFS_EEM USB_CONFIGFS_F_FS USB_CONFIGFS_F_HID USB_CONFIGFS_F_LB_SS USB_CONFIGFS_F_MIDI USB_DWC2 USB_GADGET USB_MUSB_HDRC USB_NET_CDC_SUBSET USB_ROLE_SWITCH USB_STORAGE_REALTEK USB_ULPI_BUS USB_USBNET VIDEO_DEV VIDEO_V4L2 VXLAN WIRELESS WLAN ZONE_DEVICE] disabling configs for [HANG LEAK UBSAN BUG KASAN ATOMIC_SLEEP], they are not needed determining the merge base between 0a51d2d4527b43c5e467ffa6897deefeaf499358 and 586de92313fcab8ed84ac5f78f4d2aae2db92c59 8bb7eca972ad531c9b149c0a51ab43a417385813/Linux 5.15 is a merge base, check if it has the bug testing commit 8bb7eca972ad531c9b149c0a51ab43a417385813 gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 605e8bcc49e24b4877bf76745d9eb2a81c7b0e899d3ee98c522f4d5832f1298b all runs: crashed: possible deadlock in ocfs2_reserve_suballoc_bits representative crash: possible deadlock in ocfs2_reserve_suballoc_bits, types: [LOCKDEP] testing current HEAD 586de92313fcab8ed84ac5f78f4d2aae2db92c59 testing commit 586de92313fcab8ed84ac5f78f4d2aae2db92c59 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: fc3e7cf913f62e993200603026d7de2efc39f0d8556ad7d1052206b631bba49d all runs: OK false negative chance: 0.000 # git bisect start 586de92313fcab8ed84ac5f78f4d2aae2db92c59 8bb7eca972ad531c9b149c0a51ab43a417385813 Bisecting: 146007 revisions left to test after this (roughly 17 steps) [3a8a670eeeaa40d87bd38a587438952741980c18] Merge tag 'net-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next determine whether the revision contains the guilty commit revision 8bb7eca972ad531c9b149c0a51ab43a417385813 crashed and is reachable testing commit 3a8a670eeeaa40d87bd38a587438952741980c18 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: f12a2bcc57a6db1aea4ef5c4e246d773d07fed928d4d2556cbe798fe184b441a all runs: OK false negative chance: 0.000 # git bisect bad 3a8a670eeeaa40d87bd38a587438952741980c18 Bisecting: 73313 revisions left to test after this (roughly 16 steps) [48a577dc1b09c1d35f2b8b37e7fa9a7169d50f5d] Merge tag 'perf-tools-for-v6.0-2022-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux determine whether the revision contains the guilty commit revision 8bb7eca972ad531c9b149c0a51ab43a417385813 crashed and is reachable testing commit 48a577dc1b09c1d35f2b8b37e7fa9a7169d50f5d gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 9ed5f845261068c3d93107922c92106cccfb5f141760cf73d0d2bb0ad7197e2d all runs: crashed: possible deadlock in ocfs2_reserve_suballoc_bits representative crash: possible deadlock in ocfs2_reserve_suballoc_bits, types: [LOCKDEP] # git bisect good 48a577dc1b09c1d35f2b8b37e7fa9a7169d50f5d Bisecting: 36664 revisions left to test after this (roughly 15 steps) [b3c588cd553d6996cc97f3dc0a7081b9a9b36b48] Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net determine whether the revision contains the guilty commit revision 48a577dc1b09c1d35f2b8b37e7fa9a7169d50f5d crashed and is reachable testing commit b3c588cd553d6996cc97f3dc0a7081b9a9b36b48 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 63ccb5606e623b9aef9590eaada6483166a79fbc38951d702d2fe2d47bfd3bff all runs: crashed: possible deadlock in ocfs2_reserve_suballoc_bits representative crash: possible deadlock in ocfs2_reserve_suballoc_bits, types: [LOCKDEP] # git bisect good b3c588cd553d6996cc97f3dc0a7081b9a9b36b48 Bisecting: 18335 revisions left to test after this (roughly 14 steps) [ca288965801572fe41386560d4e6c5cc0e5cc56d] Merge tag 'wireless-next-2023-04-21' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next determine whether the revision contains the guilty commit revision b3c588cd553d6996cc97f3dc0a7081b9a9b36b48 crashed and is reachable testing commit ca288965801572fe41386560d4e6c5cc0e5cc56d gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 67de845bc7720dc736f4a26248110a9465317d87483697bfee194e76aff8fb2a all runs: crashed: possible deadlock in ocfs2_reserve_suballoc_bits representative crash: possible deadlock in ocfs2_reserve_suballoc_bits, types: [LOCKDEP] # git bisect good ca288965801572fe41386560d4e6c5cc0e5cc56d Bisecting: 9177 revisions left to test after this (roughly 13 steps) [bedf1495271bc2ea57903762b722f339ea680d0d] Merge tag 'iomap-6.4-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux determine whether the revision contains the guilty commit revision 48a577dc1b09c1d35f2b8b37e7fa9a7169d50f5d crashed and is reachable testing commit bedf1495271bc2ea57903762b722f339ea680d0d gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 086966e11e4f0a1385d170dd250aba7730a92eefbf95562b3bb5f09b26ce84e3 all runs: OK false negative chance: 0.000 # git bisect bad bedf1495271bc2ea57903762b722f339ea680d0d Bisecting: 4588 revisions left to test after this (roughly 12 steps) [5e0ca0bfc33b7196ae3a5cbe26289a4025618f5a] Merge tag 'thermal-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm determine whether the revision contains the guilty commit revision 8bb7eca972ad531c9b149c0a51ab43a417385813 crashed and is reachable testing commit 5e0ca0bfc33b7196ae3a5cbe26289a4025618f5a gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: c1725002e2ee042882cb201a7cc886f392717f62db45eb8f8034f60cb54b9f35 all runs: OK false negative chance: 0.000 # git bisect bad 5e0ca0bfc33b7196ae3a5cbe26289a4025618f5a Bisecting: 2689 revisions left to test after this (roughly 11 steps) [736b378b29d89c8c3567fa4b2e948be5568aebb8] Merge tag 'slab-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab determine whether the revision contains the guilty commit revision 8bb7eca972ad531c9b149c0a51ab43a417385813 crashed and is reachable testing commit 736b378b29d89c8c3567fa4b2e948be5568aebb8 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 278145fb21b3253c910c286f91470781f2ba022fd16adbe6bc92b8ec6e603204 all runs: OK false negative chance: 0.000 # git bisect bad 736b378b29d89c8c3567fa4b2e948be5568aebb8 Bisecting: 992 revisions left to test after this (roughly 10 steps) [672d2dae19012cb2c40fdf36711ee3b5f5420724] Merge tag 'soc-defconfig-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc determine whether the revision contains the guilty commit revision 8bb7eca972ad531c9b149c0a51ab43a417385813 crashed and is reachable testing commit 672d2dae19012cb2c40fdf36711ee3b5f5420724 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 74045fbdf8e5450580d9566d42bf8b9e303b32f80612f973fb6ca045c62d07e7 all runs: OK false negative chance: 0.000 # git bisect bad 672d2dae19012cb2c40fdf36711ee3b5f5420724 Bisecting: 441 revisions left to test after this (roughly 9 steps) [7bcff5a3969b0e396087516ba4131596296a4478] Merge tag 'v6.4/vfs.acl' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs determine whether the revision contains the guilty commit revision 8bb7eca972ad531c9b149c0a51ab43a417385813 crashed and is reachable testing commit 7bcff5a3969b0e396087516ba4131596296a4478 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 44a2d0a0e10089b03f7b2300906c23740100ade16bbba5abc018ce20749249a2 all runs: crashed: possible deadlock in ocfs2_reserve_suballoc_bits representative crash: possible deadlock in ocfs2_reserve_suballoc_bits, types: [LOCKDEP] # git bisect good 7bcff5a3969b0e396087516ba4131596296a4478 Bisecting: 228 revisions left to test after this (roughly 8 steps) [18032df5ef5c0eec2adf120142bd95a3a8807866] Merge tag 'soc-arm-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc determine whether the revision contains the guilty commit revision 8bb7eca972ad531c9b149c0a51ab43a417385813 crashed and is reachable testing commit 18032df5ef5c0eec2adf120142bd95a3a8807866 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 1ef992794e6444fba497f6a81a50ef51d7003924b9197e64ac46a59c8fd558f6 all runs: OK false negative chance: 0.000 # git bisect bad 18032df5ef5c0eec2adf120142bd95a3a8807866 Bisecting: 107 revisions left to test after this (roughly 7 steps) [4a4a28fca6966ff2aee7d8313db6defcc8fcf70b] Merge tag 'x86_misc_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip determine whether the revision contains the guilty commit revision 7bcff5a3969b0e396087516ba4131596296a4478 crashed and is reachable testing commit 4a4a28fca6966ff2aee7d8313db6defcc8fcf70b gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: c7feeff69c7c27d56c30628c9aed9eb4753572ed1c90e932cde128157327b2ed all runs: OK false negative chance: 0.000 # git bisect bad 4a4a28fca6966ff2aee7d8313db6defcc8fcf70b Bisecting: 52 revisions left to test after this (roughly 6 steps) [11b32219cba462b1e12cfd91069ba82574bc2dcc] Merge tag 'pull-old-dio' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs determine whether the revision contains the guilty commit revision 48a577dc1b09c1d35f2b8b37e7fa9a7169d50f5d crashed and is reachable testing commit 11b32219cba462b1e12cfd91069ba82574bc2dcc gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 92eabc0fd40e7d89a890a29fa0f0eb267d1e87ddf4f18ccda87cb412ee938be0 all runs: OK false negative chance: 0.000 # git bisect bad 11b32219cba462b1e12cfd91069ba82574bc2dcc Bisecting: 31 revisions left to test after this (roughly 5 steps) [745ed7d77834048879bf24088c94e5a6462b613f] erofs: cleanup i_format-related stuffs determine whether the revision contains the guilty commit revision 48a577dc1b09c1d35f2b8b37e7fa9a7169d50f5d crashed and is reachable testing commit 745ed7d77834048879bf24088c94e5a6462b613f gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 7bb6f4c3a805adee4928811365662aeb09519ed72739bdda31b767e821701e63 all runs: crashed: possible deadlock in ocfs2_reserve_suballoc_bits representative crash: possible deadlock in ocfs2_reserve_suballoc_bits, types: [LOCKDEP] # git bisect good 745ed7d77834048879bf24088c94e5a6462b613f Bisecting: 15 revisions left to test after this (roughly 4 steps) [97adb49f052e70455c3529509885f8aa3b40c370] Merge tag 'v6.4/vfs.open' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs determine whether the revision contains the guilty commit revision 7bcff5a3969b0e396087516ba4131596296a4478 crashed and is reachable testing commit 97adb49f052e70455c3529509885f8aa3b40c370 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 10183c7d9329c4a07c11499549bd215a4f77e9843eb430f21ac3ccddb64bfec5 all runs: OK false negative chance: 0.000 # git bisect bad 97adb49f052e70455c3529509885f8aa3b40c370 Bisecting: 7 revisions left to test after this (roughly 3 steps) [4f704d9a8352f5c0a8fcdb6213b934630342bd44] nfs: use vfs setgid helper determine whether the revision contains the guilty commit revision 48a577dc1b09c1d35f2b8b37e7fa9a7169d50f5d crashed and is reachable testing commit 4f704d9a8352f5c0a8fcdb6213b934630342bd44 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 24d13b04bbc3395992a52719c3abfcb3d92082ab56a53d3783d4d5f153413be2 all runs: crashed: possible deadlock in ocfs2_reserve_suballoc_bits representative crash: possible deadlock in ocfs2_reserve_suballoc_bits, types: [LOCKDEP] # git bisect good 4f704d9a8352f5c0a8fcdb6213b934630342bd44 Bisecting: 3 revisions left to test after this (roughly 2 steps) [4ea2a8d84c75e20b4d9b5d9010879cdb89f2e384] pnode: pass mountpoint directly determine whether the revision contains the guilty commit revision 4f704d9a8352f5c0a8fcdb6213b934630342bd44 crashed and is reachable testing commit 4ea2a8d84c75e20b4d9b5d9010879cdb89f2e384 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 532f052448926eaf99e21ad5b8799f2c43cf9d4d03695789dbb04e3ea15e58a4 all runs: crashed: possible deadlock in ocfs2_reserve_suballoc_bits representative crash: possible deadlock in ocfs2_reserve_suballoc_bits, types: [LOCKDEP] # git bisect good 4ea2a8d84c75e20b4d9b5d9010879cdb89f2e384 Bisecting: 1 revision left to test after this (roughly 1 step) [e2eff52ce512ec725f9f1daf975c45a499be1e1e] Merge tag 'v6.4/vfs.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs determine whether the revision contains the guilty commit revision 48a577dc1b09c1d35f2b8b37e7fa9a7169d50f5d crashed and is reachable testing commit e2eff52ce512ec725f9f1daf975c45a499be1e1e gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 3c1db7c9abd4f66cd96782147275f552a8556d755a1b8e7072624e503a7b96a2 all runs: crashed: possible deadlock in ocfs2_reserve_suballoc_bits representative crash: possible deadlock in ocfs2_reserve_suballoc_bits, types: [LOCKDEP] # git bisect good e2eff52ce512ec725f9f1daf975c45a499be1e1e Bisecting: 0 revisions left to test after this (roughly 0 steps) [43b450632676fb60e9faeddff285d9fac94a4f58] open: return EINVAL for O_DIRECTORY | O_CREAT determine whether the revision contains the guilty commit revision 48a577dc1b09c1d35f2b8b37e7fa9a7169d50f5d crashed and is reachable testing commit 43b450632676fb60e9faeddff285d9fac94a4f58 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: f2119a6bd0c4f9e843ed339258813290f8545b278e8cb8ddf3143e1035ba9bd5 all runs: OK false negative chance: 0.000 # git bisect bad 43b450632676fb60e9faeddff285d9fac94a4f58 43b450632676fb60e9faeddff285d9fac94a4f58 is the first bad commit commit 43b450632676fb60e9faeddff285d9fac94a4f58 Author: Christian Brauner Date: Tue Mar 21 09:18:07 2023 +0100 open: return EINVAL for O_DIRECTORY | O_CREAT After a couple of years and multiple LTS releases we received a report that the behavior of O_DIRECTORY | O_CREAT changed starting with v5.7. On kernels prior to v5.7 combinations of O_DIRECTORY, O_CREAT, O_EXCL had the following semantics: (1) open("/tmp/d", O_DIRECTORY | O_CREAT) * d doesn't exist: create regular file * d exists and is a regular file: ENOTDIR * d exists and is a directory: EISDIR (2) open("/tmp/d", O_DIRECTORY | O_CREAT | O_EXCL) * d doesn't exist: create regular file * d exists and is a regular file: EEXIST * d exists and is a directory: EEXIST (3) open("/tmp/d", O_DIRECTORY | O_EXCL) * d doesn't exist: ENOENT * d exists and is a regular file: ENOTDIR * d exists and is a directory: open directory On kernels since to v5.7 combinations of O_DIRECTORY, O_CREAT, O_EXCL have the following semantics: (1) open("/tmp/d", O_DIRECTORY | O_CREAT) * d doesn't exist: ENOTDIR (create regular file) * d exists and is a regular file: ENOTDIR * d exists and is a directory: EISDIR (2) open("/tmp/d", O_DIRECTORY | O_CREAT | O_EXCL) * d doesn't exist: ENOTDIR (create regular file) * d exists and is a regular file: EEXIST * d exists and is a directory: EEXIST (3) open("/tmp/d", O_DIRECTORY | O_EXCL) * d doesn't exist: ENOENT * d exists and is a regular file: ENOTDIR * d exists and is a directory: open directory This is a fairly substantial semantic change that userspace didn't notice until Pedro took the time to deliberately figure out corner cases. Since no one noticed this breakage we can somewhat safely assume that O_DIRECTORY | O_CREAT combinations are likely unused. The v5.7 breakage is especially weird because while ENOTDIR is returned indicating failure a regular file is actually created. This doesn't make a lot of sense. Time was spent finding potential users of this combination. Searching on codesearch.debian.net showed that codebases often express semantical expectations about O_DIRECTORY | O_CREAT which are completely contrary to what our code has done and currently does. The expectation often is that this particular combination would create and open a directory. This suggests users who tried to use that combination would stumble upon the counterintuitive behavior no matter if pre-v5.7 or post v5.7 and quickly realize neither semantics give them what they want. For some examples see the code examples in [1] to [3] and the discussion in [4]. There are various ways to address this issue. The lazy/simple option would be to restore the pre-v5.7 behavior and to just live with that bug forever. But since there's a real chance that the O_DIRECTORY | O_CREAT quirk isn't relied upon we should try to get away with murder(ing bad semantics) first. If we need to Frankenstein pre-v5.7 behavior later so be it. So let's simply return EINVAL categorically for O_DIRECTORY | O_CREAT combinations. In addition to cleaning up the old bug this also opens up the possiblity to make that flag combination do something more intuitive in the future. Starting with this commit the following semantics apply: (1) open("/tmp/d", O_DIRECTORY | O_CREAT) * d doesn't exist: EINVAL * d exists and is a regular file: EINVAL * d exists and is a directory: EINVAL (2) open("/tmp/d", O_DIRECTORY | O_CREAT | O_EXCL) * d doesn't exist: EINVAL * d exists and is a regular file: EINVAL * d exists and is a directory: EINVAL (3) open("/tmp/d", O_DIRECTORY | O_EXCL) * d doesn't exist: ENOENT * d exists and is a regular file: ENOTDIR * d exists and is a directory: open directory One additional note, O_TMPFILE is implemented as: #define __O_TMPFILE 020000000 #define O_TMPFILE (__O_TMPFILE | O_DIRECTORY) #define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT) For older kernels it was important to return an explicit error when O_TMPFILE wasn't supported. So O_TMPFILE requires that O_DIRECTORY is raised alongside __O_TMPFILE. It also enforced that O_CREAT wasn't specified. Since O_DIRECTORY | O_CREAT could be used to create a regular allowing that combination together with __O_TMPFILE would've meant that false positives were possible, i.e., that a regular file was created instead of a O_TMPFILE. This could've been used to trick userspace into thinking it operated on a O_TMPFILE when it wasn't. Now that we block O_DIRECTORY | O_CREAT completely the check for O_CREAT in the __O_TMPFILE branch via if ((flags & O_TMPFILE_MASK) != O_TMPFILE) can be dropped. Instead we can simply check verify that O_DIRECTORY is raised via if (!(flags & O_DIRECTORY)) and explain this in two comments. As Aleksa pointed out O_PATH is unaffected by this change since it always returned EINVAL if O_CREAT was specified - with or without O_DIRECTORY. Link: https://lore.kernel.org/lkml/20230320071442.172228-1-pedro.falcato@gmail.com Link: https://sources.debian.org/src/flatpak/1.14.4-1/subprojects/libglnx/glnx-dirfd.c/?hl=324#L324 [1] Link: https://sources.debian.org/src/flatpak-builder/1.2.3-1/subprojects/libglnx/glnx-shutil.c/?hl=251#L251 [2] Link: https://sources.debian.org/src/ostree/2022.7-2/libglnx/glnx-dirfd.c/?hl=324#L324 [3] Link: https://www.openwall.com/lists/oss-security/2014/11/26/14 [4] Reported-by: Pedro Falcato Cc: Aleksa Sarai Signed-off-by: Linus Torvalds Signed-off-by: Christian Brauner fs/open.c | 18 +++++++++++++----- include/uapi/asm-generic/fcntl.h | 1 - tools/include/uapi/asm-generic/fcntl.h | 1 - 3 files changed, 13 insertions(+), 7 deletions(-) accumulated error probability: 0.00 parent commit e8d018dd0257f744ca50a729e3d042cf2ec9da65 wasn't tested testing commit e8d018dd0257f744ca50a729e3d042cf2ec9da65 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 9b08b333e7ebdcebe3ddd080bc1e44b4fad3dfc69bf6fe466cedc672f34563b3 culprit signature: f2119a6bd0c4f9e843ed339258813290f8545b278e8cb8ddf3143e1035ba9bd5 parent signature: 9b08b333e7ebdcebe3ddd080bc1e44b4fad3dfc69bf6fe466cedc672f34563b3 revisions tested: 27, total time: 5h29m10.622239281s (build: 1h57m0.661440874s, test: 3h17m27.353772375s) first good commit: 43b450632676fb60e9faeddff285d9fac94a4f58 open: return EINVAL for O_DIRECTORY | O_CREAT recipients (to): ["brauner@kernel.org" "torvalds@linux-foundation.org"] recipients (cc): []