Revision ac7cf246dfdbec3d8fed296c7bf30e16f5099dac authored by Joseph Qi on 25 March 2016, 21:21:26 UTC, committed by Linus Torvalds on 25 March 2016, 23:37:42 UTC
There is a race window between dlmconvert_remote and dlm_move_lockres_to_recovery_list, which will cause a lock with OCFS2_LOCK_BUSY in grant list, thus system hangs. dlmconvert_remote { spin_lock(&res->spinlock); list_move_tail(&lock->list, &res->converting); lock->convert_pending = 1; spin_unlock(&res->spinlock); status = dlm_send_remote_convert_request(); >>>>>> race window, master has queued ast and return DLM_NORMAL, and then down before sending ast. this node detects master down and calls dlm_move_lockres_to_recovery_list, which will revert the lock to grant list. Then OCFS2_LOCK_BUSY won't be cleared as new master won't send ast any more because it thinks already be authorized. spin_lock(&res->spinlock); lock->convert_pending = 0; if (status != DLM_NORMAL) dlm_revert_pending_convert(res, lock); spin_unlock(&res->spinlock); } In this case, check if res->state has DLM_LOCK_RES_RECOVERING bit set (res is still in recovering) or res master changed (new master has finished recovery), reset the status to DLM_RECOVERING, then it will retry convert. Signed-off-by: Joseph Qi <joseph.qi@huawei.com> Reported-by: Yiwen Jiang <jiangyiwen@huawei.com> Reviewed-by: Junxiao Bi <junxiao.bi@oracle.com> Cc: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Cc: Tariq Saeed <tariq.x.saeed@oracle.com> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 2888868
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 22.0 KB |
Makefile | -rw-r--r-- | 4.1 KB |
spi-adi-v3.c | -rw-r--r-- | 24.9 KB |
spi-altera.c | -rw-r--r-- | 7.1 KB |
spi-ath79.c | -rw-r--r-- | 7.3 KB |
spi-atmel.c | -rw-r--r-- | 45.0 KB |
spi-au1550.c | -rw-r--r-- | 25.7 KB |
spi-axi-spi-engine.c | -rw-r--r-- | 14.9 KB |
spi-bcm2835.c | -rw-r--r-- | 23.0 KB |
spi-bcm2835aux.c | -rw-r--r-- | 14.7 KB |
spi-bcm53xx.c | -rw-r--r-- | 6.9 KB |
spi-bcm53xx.h | -rw-r--r-- | 2.6 KB |
spi-bcm63xx-hsspi.c | -rw-r--r-- | 12.5 KB |
spi-bcm63xx.c | -rw-r--r-- | 16.1 KB |
spi-bfin-sport.c | -rw-r--r-- | 22.7 KB |
spi-bfin5xx.c | -rw-r--r-- | 39.7 KB |
spi-bitbang-txrx.h | -rw-r--r-- | 3.3 KB |
spi-bitbang.c | -rw-r--r-- | 10.5 KB |
spi-butterfly.c | -rw-r--r-- | 8.3 KB |
spi-cadence.c | -rw-r--r-- | 20.2 KB |
spi-clps711x.c | -rw-r--r-- | 5.2 KB |
spi-coldfire-qspi.c | -rw-r--r-- | 13.1 KB |
spi-davinci.c | -rw-r--r-- | 29.0 KB |
spi-dln2.c | -rw-r--r-- | 20.7 KB |
spi-dw-mid.c | -rw-r--r-- | 7.9 KB |
spi-dw-mmio.c | -rw-r--r-- | 3.2 KB |
spi-dw-pci.c | -rw-r--r-- | 3.5 KB |
spi-dw.c | -rw-r--r-- | 14.4 KB |
spi-dw.h | -rw-r--r-- | 6.1 KB |
spi-efm32.c | -rw-r--r-- | 11.8 KB |
spi-ep93xx.c | -rw-r--r-- | 24.3 KB |
spi-falcon.c | -rw-r--r-- | 10.5 KB |
spi-fsl-cpm.c | -rw-r--r-- | 10.1 KB |
spi-fsl-cpm.h | -rw-r--r-- | 1.6 KB |
spi-fsl-dspi.c | -rw-r--r-- | 18.8 KB |
spi-fsl-espi.c | -rw-r--r-- | 21.7 KB |
spi-fsl-lib.c | -rw-r--r-- | 4.3 KB |
spi-fsl-lib.h | -rw-r--r-- | 3.4 KB |
spi-fsl-spi.c | -rw-r--r-- | 22.6 KB |
spi-fsl-spi.h | -rw-r--r-- | 2.0 KB |
spi-gpio.c | -rw-r--r-- | 14.7 KB |
spi-img-spfi.c | -rw-r--r-- | 20.6 KB |
spi-imx.c | -rw-r--r-- | 33.4 KB |
spi-lm70llp.c | -rw-r--r-- | 9.0 KB |
spi-loopback-test.c | -rw-r--r-- | 24.3 KB |
spi-lp8841-rtc.c | -rw-r--r-- | 5.9 KB |
spi-meson-spifc.c | -rw-r--r-- | 11.3 KB |
spi-mpc512x-psc.c | -rw-r--r-- | 16.1 KB |
spi-mpc52xx-psc.c | -rw-r--r-- | 13.3 KB |
spi-mpc52xx.c | -rw-r--r-- | 14.1 KB |
spi-mt65xx.c | -rw-r--r-- | 20.1 KB |
spi-mxs.c | -rw-r--r-- | 14.2 KB |
spi-nuc900.c | -rw-r--r-- | 8.9 KB |
spi-oc-tiny.c | -rw-r--r-- | 8.6 KB |
spi-octeon.c | -rw-r--r-- | 6.2 KB |
spi-omap-100k.c | -rw-r--r-- | 12.4 KB |
spi-omap-uwire.c | -rw-r--r-- | 12.4 KB |
spi-omap2-mcspi.c | -rw-r--r-- | 39.4 KB |
spi-orion.c | -rw-r--r-- | 15.8 KB |
spi-pl022.c | -rw-r--r-- | 68.1 KB |
spi-ppc4xx.c | -rw-r--r-- | 13.6 KB |
spi-pxa2xx-dma.c | -rw-r--r-- | 8.7 KB |
spi-pxa2xx-pci.c | -rw-r--r-- | 5.6 KB |
spi-pxa2xx.c | -rw-r--r-- | 45.9 KB |
spi-pxa2xx.h | -rw-r--r-- | 4.0 KB |
spi-qup.c | -rw-r--r-- | 26.5 KB |
spi-rb4xx.c | -rw-r--r-- | 5.1 KB |
spi-rockchip.c | -rw-r--r-- | 21.5 KB |
spi-rspi.c | -rw-r--r-- | 34.2 KB |
spi-s3c24xx-fiq.S | -rw-r--r-- | 2.9 KB |
spi-s3c24xx-fiq.h | -rw-r--r-- | 671 bytes |
spi-s3c24xx.c | -rw-r--r-- | 15.1 KB |
spi-s3c64xx.c | -rw-r--r-- | 37.4 KB |
spi-sc18is602.c | -rw-r--r-- | 7.7 KB |
spi-sh-hspi.c | -rw-r--r-- | 6.5 KB |
spi-sh-msiof.c | -rw-r--r-- | 34.3 KB |
spi-sh-sci.c | -rw-r--r-- | 4.7 KB |
spi-sh.c | -rw-r--r-- | 11.9 KB |
spi-sirf.c | -rw-r--r-- | 35.5 KB |
spi-st-ssc4.c | -rw-r--r-- | 11.5 KB |
spi-sun4i.c | -rw-r--r-- | 11.4 KB |
spi-sun6i.c | -rw-r--r-- | 11.8 KB |
spi-tegra114.c | -rw-r--r-- | 33.1 KB |
spi-tegra20-sflash.c | -rw-r--r-- | 16.3 KB |
spi-tegra20-slink.c | -rw-r--r-- | 33.6 KB |
spi-test.h | -rw-r--r-- | 5.3 KB |
spi-ti-qspi.c | -rw-r--r-- | 15.5 KB |
spi-tle62x0.c | -rw-r--r-- | 7.2 KB |
spi-topcliff-pch.c | -rw-r--r-- | 46.6 KB |
spi-txx9.c | -rw-r--r-- | 11.0 KB |
spi-xcomm.c | -rw-r--r-- | 5.8 KB |
spi-xilinx.c | -rw-r--r-- | 14.1 KB |
spi-xlp.c | -rw-r--r-- | 11.4 KB |
spi-xtensa-xtfpga.c | -rw-r--r-- | 4.0 KB |
spi-zynqmp-gqspi.c | -rw-r--r-- | 33.2 KB |
spi.c | -rw-r--r-- | 84.6 KB |
spidev.c | -rw-r--r-- | 21.1 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...