Skip to contentSkip to conversation

2.6.21-rc7: BUG: sleeping function called from invalid context at net/core/sock.c:1523

DISCUSSION Jeremy Fitzhardinge 7 participants 18 messages Apr 23, 2007 – May 17, 2007

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

I got this on resume; it looks like a Bluetooth and/or USB problem.

PM: Removing info for No Bus:hci0

BUG: sleeping function called from invalid context at net/core/sock.c:1523
in_atomic():1, irqs_disabled():0
1 lock held by khubd/180:
 #0:  (old_style_rw_init#2){-.-?}, at: [<f88c5816>] hci_sock_dev_event+0x42/0xc5 [bluetooth]
 [<c01091b5>] show_trace_log_lvl+0x1a/0x30
 [<c010980c>] show_trace+0x12/0x14
 [<c01098cb>] dump_stack+0x16/0x18
 [<c0124191>] __might_sleep+0xe5/0xeb
 [<c0309ece>] lock_sock_nested+0x1d/0xc4
 [<f88c587b>] hci_sock_dev_event+0xa7/0xc5 [bluetooth]
 [<c037c8d2>] notifier_call_chain+0x20/0x3c
 [<c037c915>] atomic_notifier_call_chain+0x27/0x50
 [<f88c1a55>] hci_notify+0x12/0x14 [bluetooth]
 [<f88c2626>] hci_unregister_dev+0x4c/0x65 [bluetooth]
 [<f89f5d38>] hci_usb_disconnect+0x42/0x6f [hci_usb]
 [<c02d7e49>] usb_unbind_interface+0x33/0x69
 [<c028f3fa>] __device_release_driver+0x74/0x90
 [<c028f870>] device_release_driver+0x33/0x4b
 [<c028ee0f>] bus_remove_device+0x73/0x82
 [<c028d412>] device_del+0x169/0x1cf
 [<c02d5c00>] usb_disable_device+0x62/0xc2
 [<c02d2807>] usb_disconnect+0x95/0x114
 [<c02d34d8>] hub_thread+0x2e2/0x99b
 [<c013c8f7>] kthread+0xb5/0xe2
 [<c0108d97>] kernel_thread_helper+0x7/0x10
 =======================

PM: Removing info for usb:4-1:1.0

The machine came up anyway, without apparent problems.

J

CONFIG_X86_32=y
CONFIG_GENERIC_TIME=y CONFIG_CLOCKSOURCE_WATCHDOG=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_X86=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_DMI=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_LOCALVERSION="-paravirt"
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_SYSFS_DEPRECATED=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_KALLSYMS_EXTRA_PASS=y
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SHMEM=y
CONFIG_SLAB=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODVERSIONS=y CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_KMOD=y
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_DEFAULT_CFQ=y
CONFIG_DEFAULT_IOSCHED="cfq"
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_SMP=y
CONFIG_X86_PC=y
CONFIG_PARAVIRT=y
CONFIG_XEN=y
CONFIG_VMI=y
CONFIG_MPENTIUMM=y
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=6 CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_CMPXCHG64=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_TSC=y
CONFIG_HPET_TIMER=y
CONFIG_NR_CPUS=8
CONFIG_SCHED_MC=y
CONFIG_PREEMPT=y
CONFIG_PREEMPT_BKL=y
CONFIG_RENICE_X=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_MCE=y
CONFIG_X86_MCE_P4THERMAL=y
CONFIG_VM86=y
CONFIG_X86_CPUID=m
CONFIG_EDD=m
CONFIG_HIGHMEM64G=y
CONFIG_PAGE_OFFSET=0xC0000000
CONFIG_HIGHMEM=y
CONFIG_X86_PAE=y
CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ARCH_POPULATES_NODE_MAP=y CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_SPARSEMEM_STATIC=y CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_RESOURCES_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
CONFIG_HIGHPTE=y
CONFIG_MATH_EMULATION=y
CONFIG_MTRR=y
CONFIG_IRQBALANCE=y
CONFIG_HZ_250=y
CONFIG_HZ=250
CONFIG_PHYSICAL_START=0x100000 CONFIG_PHYSICAL_ALIGN=0x100000 CONFIG_HOTPLUG_CPU=y
CONFIG_COMPAT_VDSO=y CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_PM=y
CONFIG_PM_DEBUG=y
CONFIG_DISABLE_CONSOLE_SUSPEND=y CONFIG_SOFTWARE_SUSPEND=y CONFIG_PM_STD_PARTITION=""
CONFIG_SUSPEND_SMP=y
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_SLEEP_PROC_FS=y CONFIG_ACPI_SLEEP_PROC_SLEEP=y CONFIG_ACPI_PROCFS=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_FAN=y
CONFIG_ACPI_DOCK=y
CONFIG_ACPI_BAY=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_THERMAL=y
CONFIG_ACPI_IBM=m
CONFIG_ACPI_IBM_BAY=y CONFIG_ACPI_BLACKLIST_YEAR=1999
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y CONFIG_X86_ACPI_CPUFREQ=y
CONFIG_PCI=y
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
CONFIG_PCIEPORTBUS=y
CONFIG_HOTPLUG_PCI_PCIE=y
CONFIG_PCIEAER=y
CONFIG_PCI_MSI=y
CONFIG_HT_IRQ=y
CONFIG_ISA_DMA_API=y
CONFIG_PCCARD=y
CONFIG_PCMCIA=y
CONFIG_PCMCIA_LOAD_CIS=y
CONFIG_PCMCIA_IOCTL=y
CONFIG_CARDBUS=y
CONFIG_YENTA=y
CONFIG_YENTA_O2=y
CONFIG_YENTA_RICOH=y
CONFIG_YENTA_TI=y
CONFIG_YENTA_ENE_TUNE=y
CONFIG_YENTA_TOSHIBA=y
CONFIG_PCCARD_NONSTATIC=y
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=y CONFIG_HOTPLUG_PCI_ACPI_IBM=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
CONFIG_UNIX=y
CONFIG_XFRM=y
CONFIG_XFRM_USER=y
CONFIG_NET_KEY=m
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_FIB_HASH=y
CONFIG_NET_IPIP=m
CONFIG_NET_IPGRE=m
CONFIG_NET_IPGRE_BROADCAST=y
CONFIG_IP_MROUTE=y
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
CONFIG_SYN_COOKIES=y
CONFIG_INET_AH=m
CONFIG_INET_ESP=m
CONFIG_INET_IPCOMP=m
CONFIG_INET_XFRM_TUNNEL=m
CONFIG_INET_TUNNEL=m CONFIG_INET_XFRM_MODE_TRANSPORT=m CONFIG_INET_XFRM_MODE_TUNNEL=m
CONFIG_INET_DIAG=m
CONFIG_INET_TCP_DIAG=m
CONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_IP_VS=m
CONFIG_IP_VS_TAB_BITS=12
CONFIG_IP_VS_PROTO_TCP=y
CONFIG_IP_VS_PROTO_UDP=y
CONFIG_IP_VS_PROTO_ESP=y
CONFIG_IP_VS_PROTO_AH=y
CONFIG_IP_VS_RR=m
CONFIG_IP_VS_WRR=m
CONFIG_IP_VS_LC=m
CONFIG_IP_VS_WLC=m
CONFIG_IP_VS_LBLC=m
CONFIG_IP_VS_LBLCR=m
CONFIG_IP_VS_DH=m
CONFIG_IP_VS_SH=m
CONFIG_IP_VS_SED=m
CONFIG_IP_VS_NQ=m
CONFIG_IP_VS_FTP=m
CONFIG_NETFILTER=y
CONFIG_BRIDGE_NETFILTER=y CONFIG_NF_CONNTRACK_ENABLED=m CONFIG_NF_CONNTRACK_SUPPORT=y CONFIG_NF_CONNTRACK=m
CONFIG_NF_CONNTRACK_FTP=m CONFIG_NETFILTER_XTABLES=m CONFIG_NETFILTER_XT_MATCH_STATE=m CONFIG_NF_CONNTRACK_IPV4=m CONFIG_NF_CONNTRACK_PROC_COMPAT=y CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m CONFIG_IP_NF_MATCH_TOS=m CONFIG_IP_NF_MATCH_RECENT=m CONFIG_IP_NF_MATCH_ECN=m
CONFIG_IP_NF_MATCH_AH=m
CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_MATCH_OWNER=m CONFIG_IP_NF_MATCH_ADDRTYPE=m CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_LOG=m CONFIG_IP_NF_TARGET_ULOG=m
CONFIG_NF_NAT=m
CONFIG_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=m CONFIG_NF_NAT_FTP=m
CONFIG_BRIDGE=m
CONFIG_VLAN_8021Q=m
CONFIG_LLC=m
CONFIG_BT=m
CONFIG_BT_L2CAP=m
CONFIG_BT_SCO=m
CONFIG_BT_RFCOMM=m
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=m
CONFIG_BT_BNEP_MC_FILTER=y CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_HIDP=m
CONFIG_BT_HCIUSB=m
CONFIG_BT_HCIUSB_SCO=y
CONFIG_BT_HCIUART=m
CONFIG_BT_HCIUART_H4=y
CONFIG_BT_HCIUART_BCSP=y
CONFIG_BT_HCIBCM203X=m
CONFIG_BT_HCIBPA10X=m
CONFIG_BT_HCIBFUSB=m
CONFIG_BT_HCIDTL1=m
CONFIG_BT_HCIBT3C=m
CONFIG_BT_HCIBLUECARD=m
CONFIG_BT_HCIBTUART=m
CONFIG_BT_HCIVHCI=m
CONFIG_IEEE80211=m
CONFIG_IEEE80211_CRYPT_WEP=m CONFIG_IEEE80211_CRYPT_CCMP=m CONFIG_WIRELESS_EXT=y
CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
CONFIG_PARPORT_SERIAL=m
CONFIG_PARPORT_PC_FIFO=y CONFIG_PARPORT_PC_SUPERIO=y CONFIG_PARPORT_PC_PCMCIA=m
CONFIG_PARPORT_1284=y
CONFIG_PARPORT_NOT_PC=y
CONFIG_PNP=y
CONFIG_PNPACPI=y
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 CONFIG_XEN_BLKDEV_FRONTEND=y
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_GENERIC=y
CONFIG_SCSI=y
CONFIG_SCSI_NETLINK=y
CONFIG_SCSI_PROC_FS=y
CONFIG_BLK_DEV_SD=y
CONFIG_BLK_DEV_SR=m
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=m
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_SPI_ATTRS=m
CONFIG_SCSI_FC_ATTRS=m
CONFIG_SCSI_ISCSI_ATTRS=m
CONFIG_SCSI_SAS_ATTRS=m
CONFIG_ATA=y
CONFIG_SATA_AHCI=y
CONFIG_SATA_INTEL_COMBINED=y
CONFIG_SATA_ACPI=y
CONFIG_MD=y
CONFIG_BLK_DEV_DM=m
CONFIG_DM_SNAPSHOT=m
CONFIG_IEEE1394=m CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y CONFIG_IEEE1394_CONFIG_ROM_IP1394=y CONFIG_IEEE1394_OHCI1394=m CONFIG_IEEE1394_VIDEO1394=m
CONFIG_IEEE1394_SBP2=m
CONFIG_IEEE1394_ETH1394=m
CONFIG_IEEE1394_DV1394=m
CONFIG_IEEE1394_RAWIO=m
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
CONFIG_BONDING=m
CONFIG_TUN=m
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
CONFIG_NET_PCI=y
CONFIG_PCNET32=y
CONFIG_NE2K_PCI=y
CONFIG_8139TOO=y
CONFIG_8139TOO_PIO=y
CONFIG_E1000=m
CONFIG_E1000_NAPI=y
CONFIG_NET_RADIO=y
CONFIG_NET_WIRELESS_RTNETLINK=y CONFIG_NET_WIRELESS=y
CONFIG_XEN_NETDEV_FRONTEND=y
CONFIG_PPP=m
CONFIG_PPP_MULTILINK=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m
CONFIG_SLHC=m
CONFIG_INPUT=y
CONFIG_INPUT_FF_MEMLESS=y
CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=y
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_INPUT_JOYSTICK=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_PCSPKR=m
CONFIG_INPUT_WISTRON_BTNS=m
CONFIG_INPUT_UINPUT=m
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_SERIO_SERPORT=y
CONFIG_SERIO_LIBPS2=y
CONFIG_SERIO_RAW=m
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_PNP=y CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_PRINTER=m
CONFIG_LP_CONSOLE=y
CONFIG_PPDEV=m
CONFIG_HVC_DRIVER=y
CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_INTEL=m
CONFIG_NVRAM=y
CONFIG_RTC=m
CONFIG_GEN_RTC=m
CONFIG_GEN_RTC_X=y
CONFIG_AGP=y
CONFIG_AGP_INTEL=y
CONFIG_DRM=m
CONFIG_DRM_I810=m
CONFIG_DRM_I830=m
CONFIG_DRM_I915=m
CONFIG_HPET=y
CONFIG_HPET_RTC_IRQ=y
CONFIG_HPET_MMAP=y
CONFIG_HANGCHECK_TIMER=m
CONFIG_TCG_TPM=m
CONFIG_TCG_ATMEL=m
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_V4L1=y
CONFIG_VIDEO_V4L1_COMPAT=y
CONFIG_VIDEO_V4L2=y CONFIG_VIDEO_HELPER_CHIPS_AUTO=y CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_BACKLIGHT_CLASS_DEVICE=y CONFIG_LCD_CLASS_DEVICE=m
CONFIG_FB=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y
CONFIG_FB_VGA16=m
CONFIG_FB_VESA=y
CONFIG_FB_I810=m
CONFIG_FB_I810_GTF=y
CONFIG_FB_INTEL=m
CONFIG_FB_INTEL_DEBUG=y
CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 CONFIG_VIDEO_SELECT=y
CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_CLUT224=y
CONFIG_SOUND=m
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_PCM_OSS_PLUGINS=y CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_RTCTIMER=m CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y CONFIG_SND_DYNAMIC_MINORS=y CONFIG_SND_VERBOSE_PROCFS=y CONFIG_SND_MPU401_UART=m
CONFIG_SND_AC97_CODEC=m
CONFIG_SND_DUMMY=m
CONFIG_SND_VIRMIDI=m
CONFIG_SND_MTPAV=m
CONFIG_SND_MPU401=m
CONFIG_SND_HDA_INTEL=m
CONFIG_SND_INTEL8X0=m
CONFIG_SND_INTEL8X0M=m CONFIG_SND_AC97_POWER_SAVE=y
CONFIG_AC97_BUS=m
CONFIG_HID=y
CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_EHCI_HCD=m CONFIG_USB_EHCI_ROOT_HUB_TT=y CONFIG_USB_UHCI_HCD=m
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m
CONFIG_USB_STORAGE=m
CONFIG_USB_STORAGE_DATAFAB=y CONFIG_USB_STORAGE_FREECOM=y CONFIG_USB_STORAGE_DPCM=y CONFIG_USB_STORAGE_USBAT=y CONFIG_USB_STORAGE_SDDR09=y CONFIG_USB_STORAGE_SDDR55=y CONFIG_USB_STORAGE_JUMPSHOT=y CONFIG_USB_STORAGE_ALAUDA=y
CONFIG_USB_LIBUSUAL=y
CONFIG_USB_HID=y
CONFIG_HID_FF=y
CONFIG_HID_PID=y
CONFIG_LOGITECH_FF=y
CONFIG_THRUSTMASTER_FF=y
CONFIG_USB_HIDDEV=y
CONFIG_USB_AIPTEK=m
CONFIG_USB_WACOM=m
CONFIG_USB_ACECAD=m
CONFIG_USB_KBTAB=m
CONFIG_USB_POWERMATE=m
CONFIG_USB_TOUCHSCREEN=m CONFIG_USB_TOUCHSCREEN_EGALAX=y CONFIG_USB_TOUCHSCREEN_PANJIT=y CONFIG_USB_TOUCHSCREEN_3M=y CONFIG_USB_TOUCHSCREEN_ITM=y CONFIG_USB_TOUCHSCREEN_ETURBO=y CONFIG_USB_TOUCHSCREEN_GUNZE=y CONFIG_USB_TOUCHSCREEN_DMC_TSC10=y CONFIG_USB_XPAD=m
CONFIG_USB_ATI_REMOTE=m
CONFIG_USB_ATI_REMOTE2=m CONFIG_USB_KEYSPAN_REMOTE=m CONFIG_USB_APPLETOUCH=m
CONFIG_USB_MDC800=m
CONFIG_USB_MICROTEK=m
CONFIG_USB_CATC=m
CONFIG_USB_KAWETH=m
CONFIG_USB_PEGASUS=m
CONFIG_USB_RTL8150=m
CONFIG_USB_USBNET_MII=m
CONFIG_USB_USBNET=m
CONFIG_USB_NET_AX8817X=m
CONFIG_USB_NET_CDCETHER=m
CONFIG_USB_NET_GL620A=m
CONFIG_USB_NET_NET1080=m
CONFIG_USB_NET_PLUSB=m
CONFIG_USB_NET_RNDIS_HOST=m CONFIG_USB_NET_CDC_SUBSET=m
CONFIG_USB_ALI_M5632=y
CONFIG_USB_AN2720=y
CONFIG_USB_BELKIN=y
CONFIG_USB_ARMLINUX=y
CONFIG_USB_EPSON2888=y
CONFIG_USB_NET_ZAURUS=m
CONFIG_USB_MON=y
CONFIG_USB_USS720=m
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRPRIME=m CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m CONFIG_USB_SERIAL_CP2101=m CONFIG_USB_SERIAL_CYPRESS_M8=m CONFIG_USB_SERIAL_EMPEG=m CONFIG_USB_SERIAL_FTDI_SIO=m CONFIG_USB_SERIAL_FUNSOFT=m CONFIG_USB_SERIAL_VISOR=m
CONFIG_USB_SERIAL_IPAQ=m
CONFIG_USB_SERIAL_IR=m CONFIG_USB_SERIAL_EDGEPORT=m CONFIG_USB_SERIAL_EDGEPORT_TI=m CONFIG_USB_SERIAL_GARMIN=m
CONFIG_USB_SERIAL_IPW=m CONFIG_USB_SERIAL_KEYSPAN_PDA=m CONFIG_USB_SERIAL_KEYSPAN=m CONFIG_USB_SERIAL_KEYSPAN_MPR=y CONFIG_USB_SERIAL_KEYSPAN_USA28=y CONFIG_USB_SERIAL_KEYSPAN_USA28X=y CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y CONFIG_USB_SERIAL_KEYSPAN_USA19=y CONFIG_USB_SERIAL_KEYSPAN_USA18X=y CONFIG_USB_SERIAL_KEYSPAN_USA19W=y CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y CONFIG_USB_SERIAL_KEYSPAN_USA49W=y CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y CONFIG_USB_SERIAL_KLSI=m CONFIG_USB_SERIAL_KOBIL_SCT=m CONFIG_USB_SERIAL_MCT_U232=m CONFIG_USB_SERIAL_NAVMAN=m CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_HP4X=m
CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y CONFIG_USB_SERIAL_SIERRAWIRELESS=m CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m CONFIG_USB_SERIAL_OPTION=m CONFIG_USB_SERIAL_OMNINET=m
CONFIG_USB_EZUSB=y
CONFIG_USB_EMI62=m
CONFIG_USB_EMI26=m
CONFIG_USB_AUERSWALD=m
CONFIG_USB_RIO500=m
CONFIG_USB_LEGOTOWER=m
CONFIG_USB_LCD=m
CONFIG_USB_LED=m
CONFIG_USB_IDMOUSE=m
CONFIG_USB_APPLEDISPLAY=m
CONFIG_USB_SISUSBVGA=m
CONFIG_USB_SISUSBVGA_CON=y
CONFIG_USB_LD=m
CONFIG_USB_TEST=m
CONFIG_MMC=m
CONFIG_MMC_BLOCK=m
CONFIG_MMC_SDHCI=m
CONFIG_RTC_LIB=m
CONFIG_RTC_CLASS=m
CONFIG_RTC_INTF_SYSFS=m
CONFIG_RTC_INTF_PROC=m
CONFIG_RTC_INTF_DEV=m CONFIG_RTC_INTF_DEV_UIE_EMUL=y CONFIG_RTC_DRV_CMOS=m
CONFIG_RTC_DRV_DS1553=m
CONFIG_RTC_DRV_DS1742=m
CONFIG_RTC_DRV_V3020=m
CONFIG_KVM=m
CONFIG_KVM_INTEL=m
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y CONFIG_EXT3_FS_SECURITY=y
CONFIG_JBD=y
CONFIG_FS_MBCACHE=y
CONFIG_FS_POSIX_ACL=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_DNOTIFY=y
CONFIG_AUTOFS4_FS=m
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_UDF_FS=m
CONFIG_UDF_NLS=y
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
CONFIG_FAT_DEFAULT_CODEPAGE=437 CONFIG_FAT_DEFAULT_IOCHARSET="ascii" CONFIG_NTFS_FS=m
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_RAMFS=y
CONFIG_CONFIGFS_FS=m
CONFIG_HFSPLUS_FS=m
CONFIG_SQUASHFS=y CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_NFS_DIRECTIO=y
CONFIG_NFSD=m
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
CONFIG_NFSD_TCP=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=m
CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=y
CONFIG_SUNRPC_GSS=y
CONFIG_RPCSEC_GSS_KRB5=y CONFIG_PARTITION_ADVANCED=y
CONFIG_MAC_PARTITION=y
CONFIG_MSDOS_PARTITION=y
CONFIG_LDM_PARTITION=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="utf8" CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_CODEPAGE_737=m CONFIG_NLS_CODEPAGE_775=m CONFIG_NLS_CODEPAGE_850=m CONFIG_NLS_CODEPAGE_852=m CONFIG_NLS_CODEPAGE_855=m CONFIG_NLS_CODEPAGE_857=m CONFIG_NLS_CODEPAGE_860=m CONFIG_NLS_CODEPAGE_861=m CONFIG_NLS_CODEPAGE_862=m CONFIG_NLS_CODEPAGE_863=m CONFIG_NLS_CODEPAGE_864=m CONFIG_NLS_CODEPAGE_865=m CONFIG_NLS_CODEPAGE_866=m CONFIG_NLS_CODEPAGE_869=m CONFIG_NLS_CODEPAGE_936=m CONFIG_NLS_CODEPAGE_950=m CONFIG_NLS_CODEPAGE_932=m CONFIG_NLS_CODEPAGE_949=m CONFIG_NLS_CODEPAGE_874=m
CONFIG_NLS_ISO8859_8=m
CONFIG_NLS_CODEPAGE_1250=m CONFIG_NLS_CODEPAGE_1251=m
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=m
CONFIG_NLS_ISO8859_2=m
CONFIG_NLS_ISO8859_3=m
CONFIG_NLS_ISO8859_4=m
CONFIG_NLS_ISO8859_5=m
CONFIG_NLS_ISO8859_6=m
CONFIG_NLS_ISO8859_7=m
CONFIG_NLS_ISO8859_9=m
CONFIG_NLS_ISO8859_13=m
CONFIG_NLS_ISO8859_14=m
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_KOI8_R=m
CONFIG_NLS_KOI8_U=m
CONFIG_NLS_UTF8=m
CONFIG_PROFILING=y
CONFIG_OPROFILE=m
CONFIG_KPROBES=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_ENABLE_MUST_CHECK=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_KERNEL=y
CONFIG_LOG_BUF_SHIFT=17
CONFIG_DETECT_SOFTLOCKUP=y
CONFIG_SCHEDSTATS=y
CONFIG_TIMER_STATS=y
CONFIG_DEBUG_PREEMPT=y
CONFIG_DEBUG_RT_MUTEXES=y
CONFIG_DEBUG_PI_LIST=y
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_LOCK_ALLOC=y
CONFIG_PROVE_LOCKING=y
CONFIG_LOCKDEP=y
CONFIG_TRACE_IRQFLAGS=y CONFIG_DEBUG_SPINLOCK_SLEEP=y
CONFIG_STACKTRACE=y
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_VM=y
CONFIG_FRAME_POINTER=y
CONFIG_EARLY_PRINTK=y
CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_STACK_USAGE=y
CONFIG_DEBUG_RODATA=y
CONFIG_4KSTACKS=y
CONFIG_X86_FIND_SMP_CONFIG=y
CONFIG_X86_MPPARSE=y
CONFIG_DOUBLEFAULT=y
CONFIG_KEYS=y
CONFIG_SECURITY=y
CONFIG_SECURITY_NETWORK=y CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y
CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_NULL=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA256=m
CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_TGR192=m
CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_PCBC=m
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_BLOWFISH=m
CONFIG_CRYPTO_TWOFISH=m CONFIG_CRYPTO_TWOFISH_COMMON=m CONFIG_CRYPTO_SERPENT=m
CONFIG_CRYPTO_AES=m
CONFIG_CRYPTO_AES_586=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_ARC4=m
CONFIG_CRYPTO_KHAZAD=m
CONFIG_CRYPTO_ANUBIS=m
CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_CRC32C=m
CONFIG_BITREVERSE=y
CONFIG_CRC_CCITT=m
CONFIG_CRC16=m
CONFIG_CRC32=y
CONFIG_LIBCRC32C=m
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=m
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_PENDING_IRQ=y
CONFIG_X86_SMP=y
CONFIG_X86_HT=y
CONFIG_X86_BIOS_REBOOT=y
CONFIG_X86_TRAMPOLINE=y
CONFIG_KTIME_SCALAR=y

#1 lore raw
Quoted 28 lines · Jeremy Fitzhardinge

I got this on resume; it looks like a Bluetooth and/or USB problem.
PM: Removing info for No Bus:hci0

BUG: sleeping function called from invalid context at net/core/sock.c:1523
in_atomic():1, irqs_disabled():0
1 lock held by khubd/180:
 #0:  (old_style_rw_init#2){-.-?}, at: [<f88c5816>] hci_sock_dev_event+0x42/0xc5 [bluetooth]
 [<c01091b5>] show_trace_log_lvl+0x1a/0x30
 [<c010980c>] show_trace+0x12/0x14
 [<c01098cb>] dump_stack+0x16/0x18
 [<c0124191>] __might_sleep+0xe5/0xeb
 [<c0309ece>] lock_sock_nested+0x1d/0xc4
 [<f88c587b>] hci_sock_dev_event+0xa7/0xc5 [bluetooth]
 [<c037c8d2>] notifier_call_chain+0x20/0x3c
 [<c037c915>] atomic_notifier_call_chain+0x27/0x50
 [<f88c1a55>] hci_notify+0x12/0x14 [bluetooth]
 [<f88c2626>] hci_unregister_dev+0x4c/0x65 [bluetooth]
 [<f89f5d38>] hci_usb_disconnect+0x42/0x6f [hci_usb]
 [<c02d7e49>] usb_unbind_interface+0x33/0x69
 [<c028f3fa>] __device_release_driver+0x74/0x90
 [<c028f870>] device_release_driver+0x33/0x4b
 [<c028ee0f>] bus_remove_device+0x73/0x82
 [<c028d412>] device_del+0x169/0x1cf
 [<c02d5c00>] usb_disable_device+0x62/0xc2
 [<c02d2807>] usb_disconnect+0x95/0x114
 [<c02d34d8>] hub_thread+0x2e2/0x99b
 [<c013c8f7>] kthread+0xb5/0xe2
 [<c0108d97>] kernel_thread_helper+0x7/0x10
 =======================
Quoted 1 line

PM: Removing info for usb:4-1:1.0

OK, this probably started happening since b40df5743. Before that commit, hci_sock_dev_event() used bh_lock_sock() to lock the corresponding struct sock. This was obviously buggy - not deadlock safe against l2cap_connect_cfm() from softirq context.

This however introduced another problem - hci_sock_dev_event() is now obviously being triggered (for HCI_DEV_UNREG event, when suspending) in atomic context with preemption disabled. This is what lock_sock_nested() complains about, as it is allowed to sleep inside __lock_sock(), waiting for the lock owner.

Hmm, *sigh*. I guess the patch below fixes the problem, but it is a masterpiece in the field of ugliness. And I am not sure whether it is completely correct either. Are there any immediate ideas for better solution with respect to how struct sock locking works?

net/bluetooth/hci_sock.c +8 -2
index 71f5cfb..c5c93cd 100644
@@ -656,7 +656,10 @@ static int hci_sock_dev_event(struct notifier_block *this, unsigned long event,
 		/* Detach sockets from device */
 		read_lock(&hci_sk_list.lock);
 		sk_for_each(sk, node, &hci_sk_list.head) {
-			lock_sock(sk);
+			if (in_atomic())
+				bh_lock_sock(sk);
+			else
+				lock_sock(sk);
 			if (hci_pi(sk)->hdev == hdev) {
 				hci_pi(sk)->hdev = NULL;
 				sk->sk_err = EPIPE;
@@ -665,7 +668,10 @@ static int hci_sock_dev_event(struct notifier_block *this, unsigned long event,
 
 				hci_dev_put(hdev);
 			}
-			release_sock(sk);
+			if (in_atomic())
+				bh_unlock_sock(sk);
+			else
+				release_sock(sk);
 		}
 		read_unlock(&hci_sk_list.lock);
 	}
#2 lore raw
Quoted 5 lines · Jiri Kosina

Hmm, *sigh*. I guess the patch below fixes the problem, but it is a masterpiece in the field of ugliness. And I am not sure whether it is completely correct either. Are there any immediate ideas for better solution with respect to how struct sock locking works?

Please cc such patches to netdev. Thanks.

net/bluetooth/hci_sock.c static int hci_sock_dev_event(struct notifier_block *this, unsigned long event, · line 662

Quoted 13 lines
net/bluetooth/hci_sock.c +4 -1
index 71f5cfb..c5c93cd 100644
@@ -656,7 +656,10 @@ static int hci_sock_dev_event(struct notifier_block *this, unsigned long event,
               /* Detach sockets from device */
               read_lock(&hci_sk_list.lock);
               sk_for_each(sk, node, &hci_sk_list.head) {
-                       lock_sock(sk);
+                       if (in_atomic())
+                               bh_lock_sock(sk);
+                       else
+                               lock_sock(sk);

This doesn't do what you think it does. bh_lock_sock can still succeed even with lock_sock held by someone else.

Does this need to occur immediately when an event occurs? If not I'd suggest moving this into a workqueue.

Cheers,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#3 lore raw
Quoted 5 lines · Herbert Xu
Quoted 4 lines

Hmm, *sigh*. I guess the patch below fixes the problem, but it is a masterpiece in the field of ugliness. And I am not sure whether it is completely correct either. Are there any immediate ideas for better solution with respect to how struct sock locking works?

Please cc such patches to netdev. Thanks.

Hi Herbert,

well it's pretty much bluetooth-specific, and bluez-devel was CCed, but OK.

Quoted 8 lines
Quoted 8 lines
net/bluetooth/hci_sock.c +0 -0
index 71f5cfb..c5c93cd 100644
@@ -656,7 +656,10 @@ static int hci_sock_dev_event(struct notifier_block *this, unsigned long event,
               /* Detach sockets from device */
               read_lock(&hci_sk_list.lock);
               sk_for_each(sk, node, &hci_sk_list.head) {
Quoted 8 lines

net/bluetooth/hci_sock.c static int hci_sock_dev_event(struct notifier_block *this, unsigned long event, · line 662

Quoted 5 lines
net/bluetooth/hci_sock.c +4 -1
-                       lock_sock(sk);
+                       if (in_atomic())
+                               bh_lock_sock(sk);
+                       else
+                               lock_sock(sk);

This doesn't do what you think it does. bh_lock_sock can still succeed even with lock_sock held by someone else.

I know, this was precisely the reason why I converted the bh_lock_sock() to lock_sock() here some time ago (as it was racy with l2cap_connect_cfm()).

Quoted 2 lines

Does this need to occur immediately when an event occurs? If not I'd suggest moving this into a workqueue.

Will have to check whether this will be processed properly in time when going to suspend.

Thanks,

Signature · 1 line
Jiri Kosina
#4 lore raw
In reply to Jiri Kosina
Quoted 4 lines · Jiri Kosina
Quoted 4 lines
BUG: sleeping function called from invalid context at net/core/sock.c:1523

in_atomic():1, irqs_disabled():0
1 lock held by khubd/180:
#0: (old_style_rw_init#2){-.-?}, at: [<f88c5816>] hci_sock_dev_event+0x42/0xc5 [bluetooth]

[...]

Quoted 8 lines

OK, this probably started happening since b40df5743. Before that commit, hci_sock_dev_event() used bh_lock_sock() to lock the corresponding struct sock. This was obviously buggy - not deadlock safe against l2cap_connect_cfm() from softirq context. This however introduced another problem - hci_sock_dev_event() is now obviously being triggered (for HCI_DEV_UNREG event, when suspending) in atomic context with preemption disabled. This is what lock_sock_nested() complains about, as it is allowed to sleep inside __lock_sock(), waiting for the lock owner.

I guess the patch below is a proper fix. Marcel, does this look okay to you?

From: Jiri Kosina <[email protected]>

Bluetooth: postpone hci_dev unregistration

Commit b40df57 substituted bh_lock_sock() in hci_sock_dev_event() for lock_sock() when unregistering HCI device, in order to prevent deadlock against locking in l2cap_connect_cfm() from softirq context.

This however introduces another problem - hci_sock_dev_event() for HCI_DEV_UNREG can also be triggered in atomic context, in which calling lock_sock() is not safe as it could sleep.

This patch moves the detaching of sockets from hci_device into workqueue, so that lock_sock() can be used safely. This requires movement of deallocation of hci_dev - deallocating device just after hci_unregister_dev() would be too soon, as it could happen before the workqueue has been run.

---
 drivers/bluetooth/bfusb.c        |    2 -
 drivers/bluetooth/bluecard_cs.c  |    2 -
 drivers/bluetooth/bpa10x.c       |    2 -
 drivers/bluetooth/bt3c_cs.c      |    2 -
 drivers/bluetooth/btuart_cs.c    |    2 -
 drivers/bluetooth/dtl1_cs.c      |    2 -
 drivers/bluetooth/hci_ldisc.c    |    1 -
 drivers/bluetooth/hci_usb.c      |    2 -
 drivers/bluetooth/hci_vhci.c     |    2 -
 include/net/bluetooth/hci_core.h |    3 ++
 net/bluetooth/hci_core.c         |    9 +++++++
 net/bluetooth/hci_sock.c         |   44 ++++++++++++++++++++-----------------
 12 files changed, 36 insertions(+), 37 deletions(-)
drivers/bluetooth/bfusb.c +0 -2
index 4c766f3..db6809e 100644
@@ -762,8 +762,6 @@ static void bfusb_disconnect(struct usb_
 
 	if (hci_unregister_dev(hdev) < 0)
 		BT_ERR("Can't unregister HCI device %s", hdev->name);
-
-	hci_free_dev(hdev);
 }
 
 static struct usb_driver bfusb_driver = {
drivers/bluetooth/bluecard_cs.c +0 -2
index acfb6a4..1184113 100644
@@ -851,8 +851,6 @@ static int bluecard_close(bluecard_info_
 	if (hci_unregister_dev(hdev) < 0)
 		BT_ERR("Can't unregister HCI device %s", hdev->name);
 
-	hci_free_dev(hdev);
-
 	return 0;
 }
 
drivers/bluetooth/bpa10x.c +0 -2
index 9fca651..7dfaa95 100644
@@ -613,8 +613,6 @@ static void bpa10x_disconnect(struct usb
 
 	if (hci_unregister_dev(hdev) < 0)
 		BT_ERR("Can't unregister HCI device %s", hdev->name);
-
-	hci_free_dev(hdev);
 }
 
 static struct usb_driver bpa10x_driver = {
drivers/bluetooth/bt3c_cs.c +0 -2
index 18b0f39..6ab7b56 100644
@@ -640,8 +640,6 @@ static int bt3c_close(bt3c_info_t *info)
 	if (hci_unregister_dev(hdev) < 0)
 		BT_ERR("Can't unregister HCI device %s", hdev->name);
 
-	hci_free_dev(hdev);
-
 	return 0;
 }
 
drivers/bluetooth/btuart_cs.c +0 -2
index c1bce75..93ca675 100644
@@ -570,8 +570,6 @@ static int btuart_close(btuart_info_t *i
 	if (hci_unregister_dev(hdev) < 0)
 		BT_ERR("Can't unregister HCI device %s", hdev->name);
 
-	hci_free_dev(hdev);
-
 	return 0;
 }
 
drivers/bluetooth/dtl1_cs.c +0 -2
index 459aa97..4fc7c02 100644
@@ -552,8 +552,6 @@ static int dtl1_close(dtl1_info_t *info)
 	if (hci_unregister_dev(hdev) < 0)
 		BT_ERR("Can't unregister HCI device %s", hdev->name);
 
-	hci_free_dev(hdev);
-
 	return 0;
 }
 
drivers/bluetooth/hci_ldisc.c +0 -1
index 0f4203b..4c4d555 100644
@@ -312,7 +312,6 @@ static void hci_uart_tty_close(struct tt
 		if (test_and_clear_bit(HCI_UART_PROTO_SET, &hu->flags)) {
 			hu->proto->close(hu);
 			hci_unregister_dev(hdev);
-			hci_free_dev(hdev);
 		}
 	}
 }
drivers/bluetooth/hci_usb.c +0 -2
index 406af57..e9e0183 100644
@@ -1069,8 +1069,6 @@ static void hci_usb_disconnect(struct us
 
 	if (hci_unregister_dev(hdev) < 0)
 		BT_ERR("Can't unregister HCI device %s", hdev->name);
-
-	hci_free_dev(hdev);
 }
 
 static int hci_usb_suspend(struct usb_interface *intf, pm_message_t message)
drivers/bluetooth/hci_vhci.c +0 -2
index b71a5cc..e5a3a8c 100644
@@ -308,8 +308,6 @@ static int vhci_release(struct inode *in
 		BT_ERR("Can't unregister HCI device %s", hdev->name);
 	}
 
-	hci_free_dev(hdev);
-
 	file->private_data = NULL;
 
 	return 0;
include/net/bluetooth/hci_core.h +3 -0
index c0fc396..a0a0a15 100644
@@ -132,6 +132,8 @@ struct hci_dev {
 
 	struct module 		*owner;
 
+	struct work_struct	hci_dev_unreg_work;
+
 	int (*open)(struct hci_dev *hdev);
 	int (*close)(struct hci_dev *hdev);
 	int (*flush)(struct hci_dev *hdev);
@@ -622,6 +624,7 @@ void hci_si_event(struct hci_dev *hdev,
 
 /* ----- HCI Sockets ----- */
 void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb);
+void hci_sock_detach(struct hci_dev *hdev);
 
 /* HCI info for socket */
 #define hci_pi(sk) ((struct hci_pinfo *) sk)
net/bluetooth/hci_core.c +9 -0
index 4917919..54a50ee 100644
@@ -795,6 +795,14 @@ int hci_get_dev_info(void __user *arg)
 	return err;
 }
 
+void hci_dev_unreg(struct work_struct *work)
+{
+	struct hci_dev *hdev = 
+		container_of(work, struct hci_dev, hci_dev_unreg_work);
+	hci_sock_detach(hdev);
+	hci_free_dev(hdev);
+}
+
 /* ---- Interface to HCI drivers ---- */
 
 /* Alloc HCI device */
@@ -807,6 +815,7 @@ struct hci_dev *hci_alloc_dev(void)
 		return NULL;
 
 	skb_queue_head_init(&hdev->driver_init);
+	INIT_WORK(&hdev->hci_dev_unreg_work, hci_dev_unreg);
 
 	return hdev;
 }
net/bluetooth/hci_sock.c +24 -20

56 lines not on this page · raw message

#5 lore raw

Hi Jiri,

Quoted 6 lines · Jiri Kosina
Quoted 4 lines · Jiri Kosina
Quoted 4 lines
BUG: sleeping function called from invalid context at net/core/sock.c:1523

in_atomic():1, irqs_disabled():0
1 lock held by khubd/180:
#0: (old_style_rw_init#2){-.-?}, at: [<f88c5816>] hci_sock_dev_event+0x42/0xc5 [bluetooth]

Quoted 7 lines

[...]

Quoted 6 lines

OK, this probably started happening since b40df5743. Before that commit, hci_sock_dev_event() used bh_lock_sock() to lock the corresponding struct sock. This was obviously buggy - not deadlock safe against l2cap_connect_cfm() from softirq context. This however introduced another problem - hci_sock_dev_event() is now obviously being triggered (for HCI_DEV_UNREG event, when suspending) in atomic context with

I saw that hci_sock_dev_event() is _always_ triggered in atomic context. It's the callout for hci_notifier which is defined as an atomic notifier chain (hence executed in an RCU read section -- and sleeping inside that would be illegal).

Quoted 8 lines
Quoted 2 lines

preemption disabled. This is what lock_sock_nested() complains about, as it is allowed to sleep inside __lock_sock(), waiting for the lock owner.

[...]
Bluetooth: postpone hci_dev unregistration

Commit b40df57 substituted bh_lock_sock() in hci_sock_dev_event() for lock_sock() when unregistering HCI device, in order to prevent deadlock against locking in l2cap_connect_cfm() from softirq context.

Isn't this a problem faced by other places in the kernel already (where simply using bh_lock_sock() would potentially deadlock with another thread? I wonder what's the "recommended" (or one that's generally used) way to handle such a case.

Quoted 2 lines

This however introduces another problem - hci_sock_dev_event() for HCI_DEV_UNREG can also be triggered in atomic context, in which calling

Actually, I remember going over the hci_sock_dev_event() calling codepath (in reverse) quite exhaustively, and did not find a legitimate reason why anybody would want it to be atomic. hci_notify() has six call sites, and all are sleep-capable, IMO. In the case of hci_unregister_dev(), for example, what's happening is as follows:

__device_release_driver (can sleep)
usb_unbind_interface (-"-)
hci_usb_disconnect [hci_usb] (can sleep *[1])
hci_unregister_dev [bluetooth] (-"-)
hci_notify [bluetooth] (-"-)
atomic_notifier_call_chain (contains RCU read section)
notifier_call_chain (therefore, CANNOT SLEEP [2])
hci_sock_dev_event [bluetooth] (-"-)
lock_sock_nested (MIGHT SLEEP *BUG*)
__might_sleep

[1] This is the first problem point. However, I didn't find any reason why this particular driver's .disconnect() couldn't sleep. In fact, a comment in include/linux/usb.h:811 says:

"The probe() and disconnect() methods are called in a context where they can sleep, but they should avoid abusing the privilege. Most work to connect to a device should be done when the device is opened, and undone at the last close. The disconnect code needs to address concurrency issues with respect to open() and close() methods, as well as forcing all pending I/O requests to complete (by unlinking them as necessary, and blocking until the unlinks complete)."

I'm assuming the comment is not obsolete, of course, but although the first sentence says .disconnect() shouldn't abuse the privilege to sleep, the last sentence makes it quite evident that we are _allowed_ to do so anyway, and that is how things are (with the hci_usb driver, at least, I didn't check the .remove() or .disconnect() functions of other USB drivers, however).

[2] This is a bogus (and unnecessary) can-sleep-to-cannot-sleep transition point, IMO. I had copied Alan Stern in another thread a few days back, and he wasn't sure why hci_notifier was classified as an atomic notifier chain (when that classification happened with the new notifier chains API). I had submitted a patch that merely changed 4 lines in net/bluetooth/hci_core.c to convert hci_notifier to a blocking notifier chain, but couldn't test as I own no bluetooth hardware myself.

So do we ever really _need_ hci_sock_dev_event() to run in atomic context at all?

Quoted 4 lines

lock_sock() is not safe as it could sleep.

This patch moves the detaching of sockets from hci_device into workqueue, so that lock_sock() can be used safely. This requires movement of

I did a workqueue conversion myself, but ran into the following problem:

In the scheduled work function we have:

net/bluetooth/hci_sock.c void hci_send_to_sock(struct hci_dev *hd · line 152

Quoted 3 lines
net/bluetooth/hci_sock.c +3 -0
+       read_lock(&hci_sk_list.lock);
+       sk_for_each(sk, node, &hci_sk_list.head) {
+               lock_sock(sk);

This would still be illegal, we can't sleep while holding an rwlock (hci_sk_list.lock above). Converting hci_sk_list.lock to an rwsem is _even_ more problematic, because hci_send_to_sock() just *cannot* sleep.

Quoted 3 lines

deallocation of hci_dev - deallocating device just after hci_unregister_dev() would be too soon, as it could happen before the workqueue has been run.

Suggest a better solution for this: just introduce a flush_scheduled_work() after hci_unregister_dev() but before hci_free_dev() in all those places. Less disruptive that way.

So this is quite an interesting problem indeed, but I can't help wondering that this must be faced elsewhere in the kernel (other users of lock_sock) too. CC'ing netdev@, for any ideas.

(later)

I Googled a bit to see if this problem was faced elsewhere in the kernel too. Saw the following commit by Ingo Molnar (9883a13c72dbf8c518814b6091019643cdb34429):

- lock_sock(sock->sk);
+ local_bh_disable();
+ bh_lock_sock_nested(sock->sk);
rc = selinux_netlbl_socket_setsid(sock, sksec->sid);
- release_sock(sock->sk);
+ bh_unlock_sock(sock->sk);
+ local_bh_enable();

Is it _really_ *this* simple?

Satyam

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#6 lore raw
Quoted 12 lines · Satyam Sharma

[1] This is the first problem point. However, I didn't find any reason why this particular driver's .disconnect() couldn't sleep. In fact, a comment in include/linux/usb.h:811 says:

"The probe() and disconnect() methods are called in a context where they can sleep, but they should avoid abusing the privilege. Most work to connect to a device should be done when the device is opened, and undone at the last close. The disconnect code needs to address concurrency issues with respect to open() and close() methods, as well as forcing all pending I/O requests to complete (by unlinking them as necessary, and blocking until the unlinks complete)."

Quoted 6 lines

I'm assuming the comment is not obsolete, of course, but although the first sentence says .disconnect() shouldn't abuse the privilege to sleep, the last sentence makes it quite evident that we are _allowed_ to do so anyway, and that is how things are (with the hci_usb driver, at least, I didn't check the .remove() or .disconnect() functions of other USB drivers, however).

Yes, this is true, you are running in thread context for .disconnect of usb drivers, so you can sleep if you need to, but you will block all other device's disconnect and probe functions while you do. So, it's good to try to not abuse this if possible.

thanks,

greg k-h

#7 lore raw
In reply to Satyam Sharma
Quoted 11 lines · Satyam Sharma

(later)
I Googled a bit to see if this problem was faced elsewhere in the kernel too. Saw the following commit by Ingo Molnar (9883a13c72dbf8c518814b6091019643cdb34429):

(quoted diff) +2 -1
-	lock_sock(sock->sk);
+	local_bh_disable();
+	bh_lock_sock_nested(sock->sk);
	rc = selinux_netlbl_socket_setsid(sock, sksec->sid);
(quoted diff) +2 -1
-	release_sock(sock->sk);
+	bh_unlock_sock(sock->sk);
+	local_bh_enable();
Quoted 1 line

Is it _really_ *this* simple?

Hi Satyam,

actually this *seems* to be proper solution also for our case, thanks for pointing this out. I will think about it once again, do some more tests with this locking scheme, and will let you know.

Thanks,

Signature · 1 line
Jiri Kosina
#8 lore raw

Hi Jiri,

Quoted 13 lines · Jiri Kosina
Quoted 11 lines · Satyam Sharma

(later)
I Googled a bit to see if this problem was faced elsewhere in the kernel too. Saw the following commit by Ingo Molnar (9883a13c72dbf8c518814b6091019643cdb34429):

(quoted diff) +4 -2
-     lock_sock(sock->sk);
+     local_bh_disable();
+     bh_lock_sock_nested(sock->sk);
      rc = selinux_netlbl_socket_setsid(sock, sksec->sid);
-     release_sock(sock->sk);
+     bh_unlock_sock(sock->sk);
+     local_bh_enable();
Quoted 1 line

Is it _really_ *this* simple?

Quoted 4 lines

[...]
actually this *seems* to be proper solution also for our case, thanks for pointing this out. I will think about it once again, do some more tests with this locking scheme, and will let you know.

Yes, I can almost confirm that this (open-coding of spin_lock_bh, effectively) is the proper solution (Rusty's unreliable guide to kernel-locking needs to be next to every developer's keyboard :-) I also came across this idiom in other places in the networking code so it seems to be pretty much the standard way. I wish I owned bluetooth hardware, could've tested this for you myself.

Thanks,
Satyam

maintainer
#9 lore raw

Hi Satayam,

Quoted 17 lines
Quoted 12 lines
Quoted 11 lines

(later)
I Googled a bit to see if this problem was faced elsewhere in the kernel too. Saw the following commit by Ingo Molnar (9883a13c72dbf8c518814b6091019643cdb34429):

(quoted diff) +4 -2
-     lock_sock(sock->sk);
+     local_bh_disable();
+     bh_lock_sock_nested(sock->sk);
      rc = selinux_netlbl_socket_setsid(sock, sksec->sid);
-     release_sock(sock->sk);
+     bh_unlock_sock(sock->sk);
+     local_bh_enable();
Quoted 1 line

Is it _really_ *this* simple?

Quoted 4 lines

[...]
actually this *seems* to be proper solution also for our case, thanks for pointing this out. I will think about it once again, do some more tests with this locking scheme, and will let you know.

Quoted 6 lines

Yes, I can almost confirm that this (open-coding of spin_lock_bh, effectively) is the proper solution (Rusty's unreliable guide to kernel-locking needs to be next to every developer's keyboard :-) I also came across this idiom in other places in the networking code so it seems to be pretty much the standard way. I wish I owned bluetooth hardware, could've tested this for you myself.

does this mean we should revert previous changes to the locking or only apply this on top of it?

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#10 lore raw

Hi Marcel,

Quoted 26 lines · Marcel Holtmann

Hi Satayam,

Quoted 17 lines
Quoted 12 lines
Quoted 11 lines

(later)
I Googled a bit to see if this problem was faced elsewhere in the kernel too. Saw the following commit by Ingo Molnar (9883a13c72dbf8c518814b6091019643cdb34429):

(quoted diff) +4 -2
-     lock_sock(sock->sk);
+     local_bh_disable();
+     bh_lock_sock_nested(sock->sk);
      rc = selinux_netlbl_socket_setsid(sock, sksec->sid);
-     release_sock(sock->sk);
+     bh_unlock_sock(sock->sk);
+     local_bh_enable();
Quoted 1 line

Is it _really_ *this* simple?

Quoted 4 lines

[...]
actually this *seems* to be proper solution also for our case, thanks for pointing this out. I will think about it once again, do some more tests with this locking scheme, and will let you know.

Quoted 6 lines

Yes, I can almost confirm that this (open-coding of spin_lock_bh, effectively) is the proper solution (Rusty's unreliable guide to kernel-locking needs to be next to every developer's keyboard :-) I also came across this idiom in other places in the networking code so it seems to be pretty much the standard way. I wish I owned bluetooth hardware, could've tested this for you myself.

Quoted 2 lines

does this mean we should revert previous changes to the locking or only apply this on top of it?

I've fixed a simple patch on top of 2.6.22-rc1 below.

net/bluetooth/hci_sock.c +0 -0
diff -ruNp a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
@@ -665,7 +665,8 @@ static int hci_sock_dev_event(struct not
		/* Detach sockets from device */
		read_lock(&hci_sk_list.lock);
		sk_for_each(sk, node, &hci_sk_list.head) {
-			lock_sock(sk);
+			local_bh_disable();
+			bh_lock_sock_nested(sk);
			if (hci_pi(sk)->hdev == hdev) {
				hci_pi(sk)->hdev = NULL;
				sk->sk_err = EPIPE;

@@ -674,6 +675,8 @@ static int hci_sock_dev_event(struct not

				hci_dev_put(hdev);
			}
+			bh_unlock_sock(sk);
+			local_bh_enable();
			release_sock(sk);
		}
		read_unlock(&hci_sk_list.lock);
#11 lore raw
Quoted 26 lines · Satyam Sharma

Hi Marcel,
[...]

Quoted 24 lines
Quoted 23 lines
Quoted 12 lines
Quoted 11 lines

(later)
I Googled a bit to see if this problem was faced elsewhere in the kernel too. Saw the following commit by Ingo Molnar (9883a13c72dbf8c518814b6091019643cdb34429):

(quoted diff) +4 -2
-     lock_sock(sock->sk);
+     local_bh_disable();
+     bh_lock_sock_nested(sock->sk);
      rc = selinux_netlbl_socket_setsid(sock, sksec->sid);
-     release_sock(sock->sk);
+     bh_unlock_sock(sock->sk);
+     local_bh_enable();
Quoted 1 line

Is it _really_ *this* simple?

Quoted 4 lines

[...]
actually this *seems* to be proper solution also for our case, thanks for pointing this out. I will think about it once again, do some more tests with this locking scheme, and will let you know.

Yes, I can almost confirm that this (open-coding of spin_lock_bh, effectively) is the proper solution (Rusty's unreliable guide to kernel-locking needs to be next to every developer's keyboard :-) I also came across this idiom in other places in the networking code so it seems to be pretty much the standard way. I wish I owned bluetooth hardware, could've tested this for you myself.

Quoted 4 lines
Quoted 2 lines

does this mean we should revert previous changes to the locking or only apply this on top of it?

I've fixed a simple patch on top of 2.6.22-rc1 below.

Eek, please ignore previous one. This one's correct.

net/bluetooth/hci_sock.c +0 -0
diff -ruNp a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
@@ -665,7 +665,8 @@ static int hci_sock_dev_event(struct not
		/* Detach sockets from device */
		read_lock(&hci_sk_list.lock);
		sk_for_each(sk, node, &hci_sk_list.head) {
-			lock_sock(sk);
+			local_bh_disable();
+			bh_lock_sock_nested(sk);
			if (hci_pi(sk)->hdev == hdev) {
				hci_pi(sk)->hdev = NULL;
				sk->sk_err = EPIPE;

@@ -674,7 +675,8 @@ static int hci_sock_dev_event(struct not

				hci_dev_put(hdev);
			}
-			release_sock(sk);
+			bh_unlock_sock(sk);
+			local_bh_enable();
		}
		read_unlock(&hci_sk_list.lock);
	}
maintainer
#12 lore raw

Hi Satyam,

Quoted 47 lines
Quoted 24 lines
Quoted 24 lines
Quoted 23 lines
Quoted 12 lines
Quoted 11 lines

(later)
I Googled a bit to see if this problem was faced elsewhere in the kernel too. Saw the following commit by Ingo Molnar (9883a13c72dbf8c518814b6091019643cdb34429):

(quoted diff) +4 -2
-     lock_sock(sock->sk);
+     local_bh_disable();
+     bh_lock_sock_nested(sock->sk);
      rc = selinux_netlbl_socket_setsid(sock, sksec->sid);
-     release_sock(sock->sk);
+     bh_unlock_sock(sock->sk);
+     local_bh_enable();
Quoted 1 line

Is it _really_ *this* simple?

Quoted 4 lines

[...]
actually this *seems* to be proper solution also for our case, thanks for pointing this out. I will think about it once again, do some more tests with this locking scheme, and will let you know.

Yes, I can almost confirm that this (open-coding of spin_lock_bh, effectively) is the proper solution (Rusty's unreliable guide to kernel-locking needs to be next to every developer's keyboard :-) I also came across this idiom in other places in the networking code so it seems to be pretty much the standard way. I wish I owned bluetooth hardware, could've tested this for you myself.

Quoted 4 lines
Quoted 2 lines

does this mean we should revert previous changes to the locking or only apply this on top of it?

I've fixed a simple patch on top of 2.6.22-rc1 below.

Eek, please ignore previous one. This one's correct.

diff -ruNp a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c

net/bluetooth/hci_sock.c +2 -1
@@ -665,7 +665,8 @@ static int hci_sock_dev_event(struct not
 		/* Detach sockets from device */
 		read_lock(&hci_sk_list.lock);
 		sk_for_each(sk, node, &hci_sk_list.head) {
-			lock_sock(sk);
+			local_bh_disable();
+			bh_lock_sock_nested(sk);
 			if (hci_pi(sk)->hdev == hdev) {
 				hci_pi(sk)->hdev = NULL;
 				sk->sk_err = EPIPE;

net/bluetooth/hci_sock.c static int hci_sock_dev_event(struct not · line 682

Quoted 9 lines
net/bluetooth/hci_sock.c +2 -1
@@ -674,7 +675,8 @@ static int hci_sock_dev_event(struct not
 
 				hci_dev_put(hdev);
 			}
-			release_sock(sk);
+			bh_unlock_sock(sk);
+			local_bh_enable();
 		}
 		read_unlock(&hci_sk_list.lock);
 	}

since Jiri has a good test case for it, I leave it to him for testing. If he confirms that this fixes the locking issues, then this is

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#13 lore raw
Quoted 3 lines · Marcel Holtmann

since Jiri has a good test case for it, I leave it to him for testing. If he confirms that this fixes the locking issues, then this is

I will verify later this evening and will let you know. I am however pretty convinced now that this is the right fix.

Thanks,

Signature · 1 line
Jiri Kosina
#14 lore raw
Quoted 5 lines · Jiri Kosina
Quoted 3 lines

since Jiri has a good test case for it, I leave it to him for testing. If he confirms that this fixes the locking issues, then this is

I will verify later this evening and will let you know. I am however pretty convinced now that this is the right fix.

Satyam,

I have just verified that this locking scheme is indeed correct. So you can add

if you wish to, and submit the patch to Andrew.

Thanks,

Signature · 1 line
Jiri Kosina
maintainer
#15 lore raw

From: Jiri Kosina <[email protected]>
Date: Thu, 17 May 2007 01:03:55 +0200 (CEST)

Quoted 8 lines · Jiri Kosina
Quoted 6 lines
Quoted 4 lines

since Jiri has a good test case for it, I leave it to him for testing. If he confirms that this fixes the locking issues, then this is

I will verify later this evening and will let you know. I am however pretty convinced now that this is the right fix.

Quoted 8 lines

Satyam,

I have just verified that this locking scheme is indeed correct. So you can add

if you wish to, and submit the patch to Andrew.

I guess I don't get sent networking patches any more? :-)

#16 lore raw
Quoted 8 lines · David Miller
Quoted 6 lines

I have just verified that this locking scheme is indeed correct. So you can add

if you wish to, and submit the patch to Andrew.

I guess I don't get sent networking patches any more? :-)

Well, this is bluetooth-specific, but it seemed to me that Marcel wasn't going to send pull requests to Linus any time soon, therefore I thought going through akpm is a thing to do.

Honestly, I really don't care through which tree this goes in, so sorry if any offence was caused here :)

Signature · 1 line
Jiri Kosina
maintainer
#17 lore raw

Hi Jiri,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

I have just verified that this locking scheme is indeed correct. So you can add

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

if you wish to, and submit the patch to Andrew.

I guess I don't get sent networking patches any more? :-)

Well, this is bluetooth-specific, but it seemed to me that Marcel wasn't going to send pull requests to Linus any time soon, therefore I thought going through akpm is a thing to do.

actually everything net/ related goes to Dave first. No exception. This includes the Bluetooth subsystem. I even send drivers/bluetooth/ through Dave before they go to Linus.

Quoted 2 lines

Honestly, I really don't care through which tree this goes in, so sorry if any offence was caused here :)

Having these small ones passed through Andrew is only a convenience since he is really good in picking them up and make sure that they get merged by Linus.

Regards

Marcel