1. 16 8月, 2019 1 次提交
  2. 12 8月, 2019 6 次提交
  3. 10 8月, 2019 12 次提交
    • G
      scsi: fas216: Mark expected switch fall-throughs · fccf01b6
      Gustavo A. R. Silva 提交于
      Mark switch cases where we are expecting to fall through.
      
      Fix the following warnings (Building: rpc_defconfig arm):
      
      drivers/scsi/arm/fas216.c: In function ‘fas216_disconnect_intr’:
      drivers/scsi/arm/fas216.c:913:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (fas216_get_last_msg(info, info->scsi.msgin_fifo) == ABORT) {
            ^
      drivers/scsi/arm/fas216.c:919:2: note: here
        default:    /* huh?     */
        ^~~~~~~
      drivers/scsi/arm/fas216.c: In function ‘fas216_kick’:
      drivers/scsi/arm/fas216.c:1959:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
         fas216_allocate_tag(info, SCpnt);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/scsi/arm/fas216.c:1960:2: note: here
        case TYPE_OTHER:
        ^~~~
      drivers/scsi/arm/fas216.c: In function ‘fas216_busservice_intr’:
      drivers/scsi/arm/fas216.c:1413:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
         fas216_stoptransfer(info);
         ^~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/scsi/arm/fas216.c:1414:2: note: here
        case STATE(STAT_STATUS, PHASE_SELSTEPS):/* Sel w/ steps -> Status       */
        ^~~~
      drivers/scsi/arm/fas216.c:1424:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
         fas216_stoptransfer(info);
         ^~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/scsi/arm/fas216.c:1425:2: note: here
        case STATE(STAT_MESGIN, PHASE_COMMAND): /* Command -> Message In */
        ^~~~
      drivers/scsi/arm/fas216.c: In function ‘fas216_funcdone_intr’:
      drivers/scsi/arm/fas216.c:1573:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if ((stat & STAT_BUSMASK) == STAT_MESGIN) {
            ^
      drivers/scsi/arm/fas216.c:1579:2: note: here
        default:
        ^~~~~~~
      drivers/scsi/arm/fas216.c: In function ‘fas216_handlesync’:
      drivers/scsi/arm/fas216.c:605:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
         info->scsi.phase = PHASE_MSGOUT_EXPECT;
         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
      drivers/scsi/arm/fas216.c:607:2: note: here
        case async:
        ^~~~
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      fccf01b6
    • G
      pcmcia: db1xxx_ss: Mark expected switch fall-throughs · 5f163f33
      Gustavo A. R. Silva 提交于
      Mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warnings (Building: db1xxx_defconfig mips):
      
      drivers/pcmcia/db1xxx_ss.c:257:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
      drivers/pcmcia/db1xxx_ss.c:269:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      5f163f33
    • G
      video: fbdev: omapfb_main: Mark expected switch fall-throughs · 70a2783c
      Gustavo A. R. Silva 提交于
      Mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warning (Building: omap1_defconfig arm):
      
      drivers/watchdog/wdt285.c:170:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
      drivers/watchdog/ar7_wdt.c:237:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
      drivers/video/fbdev/omap/omapfb_main.c:449:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
      drivers/video/fbdev/omap/omapfb_main.c:1549:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
      drivers/video/fbdev/omap/omapfb_main.c:1547:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
      drivers/video/fbdev/omap/omapfb_main.c:1545:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
      drivers/video/fbdev/omap/omapfb_main.c:1543:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
      drivers/video/fbdev/omap/omapfb_main.c:1540:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
      drivers/video/fbdev/omap/omapfb_main.c:1538:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
      drivers/video/fbdev/omap/omapfb_main.c:1535:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      70a2783c
    • G
      watchdog: riowd: Mark expected switch fall-through · 40ad2de3
      Gustavo A. R. Silva 提交于
      Mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warnings (Building: sparc64):
      
      drivers/watchdog/riowd.c: In function ‘riowd_ioctl’:
      drivers/watchdog/riowd.c:136:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
         riowd_writereg(p, riowd_timeout, WDTO_INDEX);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/watchdog/riowd.c:139:2: note: here
        case WDIOC_GETTIMEOUT:
        ^~~~
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      40ad2de3
    • G
      s390/net: Mark expected switch fall-throughs · 7b733151
      Gustavo A. R. Silva 提交于
      Mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warnings (Building: s390):
      
      drivers/s390/net/ctcm_fsms.c: In function ‘ctcmpc_chx_attnbusy’:
      drivers/s390/net/ctcm_fsms.c:1703:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (grp->changed_side == 1) {
            ^
      drivers/s390/net/ctcm_fsms.c:1707:2: note: here
        case MPCG_STATE_XID0IOWAIX:
        ^~~~
      
      drivers/s390/net/ctcm_mpc.c: In function ‘ctc_mpc_alloc_channel’:
      drivers/s390/net/ctcm_mpc.c:358:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (callback)
            ^
      drivers/s390/net/ctcm_mpc.c:360:2: note: here
        case MPCG_STATE_XID0IOWAIT:
        ^~~~
      
      drivers/s390/net/ctcm_mpc.c: In function ‘mpc_action_timeout’:
      drivers/s390/net/ctcm_mpc.c:1469:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if ((fsm_getstate(rch->fsm) == CH_XID0_PENDING) &&
            ^
      drivers/s390/net/ctcm_mpc.c:1472:2: note: here
        default:
        ^~~~~~~
      drivers/s390/net/ctcm_mpc.c: In function ‘mpc_send_qllc_discontact’:
      drivers/s390/net/ctcm_mpc.c:2087:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (grp->estconnfunc) {
            ^
      drivers/s390/net/ctcm_mpc.c:2092:2: note: here
        case MPCG_STATE_FLOWC:
        ^~~~
      
      drivers/s390/net/qeth_l2_main.c: In function ‘qeth_l2_process_inbound_buffer’:
      drivers/s390/net/qeth_l2_main.c:328:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
          if (IS_OSN(card)) {
             ^
      drivers/s390/net/qeth_l2_main.c:337:3: note: here
         default:
         ^~~~~~~
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      7b733151
    • G
      crypto: ux500/crypt: Mark expected switch fall-throughs · 3d86c7ad
      Gustavo A. R. Silva 提交于
      Mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warning (Building: arm):
      
      drivers/crypto/ux500/cryp/cryp.c: In function ‘cryp_save_device_context’:
      drivers/crypto/ux500/cryp/cryp.c:316:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
         ctx->key_4_r = readl_relaxed(&src_reg->key_4_r);
      drivers/crypto/ux500/cryp/cryp.c:318:2: note: here
        case CRYP_KEY_SIZE_192:
        ^~~~
      drivers/crypto/ux500/cryp/cryp.c:320:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
         ctx->key_3_r = readl_relaxed(&src_reg->key_3_r);
      drivers/crypto/ux500/cryp/cryp.c:322:2: note: here
        case CRYP_KEY_SIZE_128:
        ^~~~
      drivers/crypto/ux500/cryp/cryp.c:324:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
         ctx->key_2_r = readl_relaxed(&src_reg->key_2_r);
      drivers/crypto/ux500/cryp/cryp.c:326:2: note: here
        default:
        ^~~~~~~
      In file included from ./include/linux/io.h:13:0,
                       from drivers/crypto/ux500/cryp/cryp_p.h:14,
                       from drivers/crypto/ux500/cryp/cryp.c:15:
      drivers/crypto/ux500/cryp/cryp.c: In function ‘cryp_restore_device_context’:
      ./arch/arm/include/asm/io.h:92:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
       #define __raw_writel __raw_writel
                            ^
      ./arch/arm/include/asm/io.h:299:29: note: in expansion of macro ‘__raw_writel’
       #define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
                                   ^~~~~~~~~~~~
      drivers/crypto/ux500/cryp/cryp.c:363:3: note: in expansion of macro ‘writel_relaxed’
         writel_relaxed(ctx->key_4_r, &reg->key_4_r);
         ^~~~~~~~~~~~~~
      drivers/crypto/ux500/cryp/cryp.c:365:2: note: here
        case CRYP_KEY_SIZE_192:
        ^~~~
      In file included from ./include/linux/io.h:13:0,
                       from drivers/crypto/ux500/cryp/cryp_p.h:14,
                       from drivers/crypto/ux500/cryp/cryp.c:15:
      ./arch/arm/include/asm/io.h:92:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
       #define __raw_writel __raw_writel
                            ^
      ./arch/arm/include/asm/io.h:299:29: note: in expansion of macro ‘__raw_writel’
       #define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
                                   ^~~~~~~~~~~~
      drivers/crypto/ux500/cryp/cryp.c:367:3: note: in expansion of macro ‘writel_relaxed’
         writel_relaxed(ctx->key_3_r, &reg->key_3_r);
         ^~~~~~~~~~~~~~
      drivers/crypto/ux500/cryp/cryp.c:369:2: note: here
        case CRYP_KEY_SIZE_128:
        ^~~~
      In file included from ./include/linux/io.h:13:0,
                       from drivers/crypto/ux500/cryp/cryp_p.h:14,
                       from drivers/crypto/ux500/cryp/cryp.c:15:
      ./arch/arm/include/asm/io.h:92:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
       #define __raw_writel __raw_writel
                            ^
      ./arch/arm/include/asm/io.h:299:29: note: in expansion of macro ‘__raw_writel’
       #define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
                                   ^~~~~~~~~~~~
      drivers/crypto/ux500/cryp/cryp.c:371:3: note: in expansion of macro ‘writel_relaxed’
         writel_relaxed(ctx->key_2_r, &reg->key_2_r);
         ^~~~~~~~~~~~~~
      drivers/crypto/ux500/cryp/cryp.c:373:2: note: here
        default:
        ^~~~~~~
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      3d86c7ad
    • G
      watchdog: wdt977: Mark expected switch fall-through · d51c6163
      Gustavo A. R. Silva 提交于
      Mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warning (Building: arm):
      
      drivers/watchdog/wdt977.c: In function ‘wdt977_ioctl’:
        LD [M]  drivers/media/platform/vicodec/vicodec.o
      drivers/watchdog/wdt977.c:400:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
         wdt977_keepalive();
         ^~~~~~~~~~~~~~~~~~
      drivers/watchdog/wdt977.c:403:2: note: here
        case WDIOC_GETTIMEOUT:
        ^~~~
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      d51c6163
    • G
      watchdog: scx200_wdt: Mark expected switch fall-through · 24f21618
      Gustavo A. R. Silva 提交于
      Mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warning (Building: i386):
      
      drivers/watchdog/scx200_wdt.c: In function ‘scx200_wdt_ioctl’:
      drivers/watchdog/scx200_wdt.c:188:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
         scx200_wdt_ping();
         ^~~~~~~~~~~~~~~~~
      drivers/watchdog/scx200_wdt.c:189:2: note: here
        case WDIOC_GETTIMEOUT:
        ^~~~
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      24f21618
    • G
      watchdog: Mark expected switch fall-throughs · d259f94f
      Gustavo A. R. Silva 提交于
      Mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warnings:
      
      drivers/watchdog/ar7_wdt.c: warning: this statement may fall
      through [-Wimplicit-fallthrough=]:  => 237:3
      drivers/watchdog/pcwd.c: warning: this statement may fall
      through [-Wimplicit-fallthrough=]:  => 653:3
      drivers/watchdog/sb_wdog.c: warning: this statement may fall
      through [-Wimplicit-fallthrough=]:  => 204:3
      drivers/watchdog/wdt.c: warning: this statement may fall
      through [-Wimplicit-fallthrough=]:  => 391:3
      Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      d259f94f
    • G
      mfd: omap-usb-host: Mark expected switch fall-throughs · 90397820
      Gustavo A. R. Silva 提交于
      Mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warnings:
      
      drivers/mfd/omap-usb-host.c: In function 'usbhs_runtime_resume':
      drivers/mfd/omap-usb-host.c:303:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
          if (!IS_ERR(omap->hsic480m_clk[i])) {
             ^
      drivers/mfd/omap-usb-host.c:313:3: note: here
         case OMAP_EHCI_PORT_MODE_TLL:
         ^~~~
      drivers/mfd/omap-usb-host.c: In function 'usbhs_runtime_suspend':
      drivers/mfd/omap-usb-host.c:345:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
          if (!IS_ERR(omap->hsic480m_clk[i]))
             ^
      drivers/mfd/omap-usb-host.c:349:3: note: here
         case OMAP_EHCI_PORT_MODE_TLL:
         ^~~~
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      90397820
    • G
      mfd: db8500-prcmu: Mark expected switch fall-throughs · 795952d9
      Gustavo A. R. Silva 提交于
      Mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warnings:
      
      drivers/mfd/db8500-prcmu.c: In function 'dsiclk_rate':
      drivers/mfd/db8500-prcmu.c:1592:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
         div *= 2;
         ~~~~^~~~
      drivers/mfd/db8500-prcmu.c:1593:2: note: here
        case PRCM_DSI_PLLOUT_SEL_PHI_2:
        ^~~~
      drivers/mfd/db8500-prcmu.c:1594:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
         div *= 2;
         ~~~~^~~~
      drivers/mfd/db8500-prcmu.c:1595:2: note: here
        case PRCM_DSI_PLLOUT_SEL_PHI:
        ^~~~
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      795952d9
    • J
      drm/i915: Remove redundant user_access_end() from __copy_from_user() error path · e6a9522a
      Josh Poimboeuf 提交于
      Objtool reports:
      
        drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: .altinstr_replacement+0x36: redundant UACCESS disable
      
      __copy_from_user() already does both STAC and CLAC, so the
      user_access_end() in its error path adds an extra unnecessary CLAC.
      
      Fixes: 0b2c8f8b ("i915: fix missing user_access_end() in page fault exception case")
      Reported-by: NThomas Gleixner <tglx@linutronix.de>
      Reported-by: NSedat Dilek <sedat.dilek@gmail.com>
      Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-by: NNick Desaulniers <ndesaulniers@google.com>
      Tested-by: NSedat Dilek <sedat.dilek@gmail.com>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://github.com/ClangBuiltLinux/linux/issues/617
      Link: https://lkml.kernel.org/r/51a4155c5bc2ca847a9cbe85c1c11918bb193141.1564086017.git.jpoimboe@redhat.com
      e6a9522a
  4. 09 8月, 2019 2 次提交
    • C
      bcache: Revert "bcache: use sysfs_match_string() instead of __sysfs_match_string()" · 20621fed
      Coly Li 提交于
      This reverts commit 89e0341a.
      
      In drivers/md/bcache/sysfs.c:bch_snprint_string_list(), NULL pointer at
      the end of list is necessary. Remove the NULL from last element of each
      lists will cause the following panic,
      
      [ 4340.455652] bcache: register_cache() registered cache device nvme0n1
      [ 4340.464603] bcache: register_bdev() registered backing device sdk
      [ 4421.587335] bcache: bch_cached_dev_run() cached dev sdk is running already
      [ 4421.587348] bcache: bch_cached_dev_attach() Caching sdk as bcache0 on set 354e1d46-d99f-4d8b-870b-078b80dc88a6
      [ 5139.247950] general protection fault: 0000 [#1] SMP NOPTI
      [ 5139.247970] CPU: 9 PID: 5896 Comm: cat Not tainted 4.12.14-95.29-default #1 SLE12-SP4
      [ 5139.247988] Hardware name: HPE ProLiant DL380 Gen10/ProLiant DL380 Gen10, BIOS U30 04/18/2019
      [ 5139.248006] task: ffff888fb25c0b00 task.stack: ffff9bbacc704000
      [ 5139.248021] RIP: 0010:string+0x21/0x70
      [ 5139.248030] RSP: 0018:ffff9bbacc707bf0 EFLAGS: 00010286
      [ 5139.248043] RAX: ffffffffa7e432e3 RBX: ffff8881c20da02a RCX: ffff0a00ffffff04
      [ 5139.248058] RDX: 3f00656863616362 RSI: ffff8881c20db000 RDI: ffffffffffffffff
      [ 5139.248075] RBP: ffff8881c20db000 R08: 0000000000000000 R09: ffff8881c20da02a
      [ 5139.248090] R10: 0000000000000004 R11: 0000000000000000 R12: ffff9bbacc707c48
      [ 5139.248104] R13: 0000000000000fd6 R14: ffffffffc0665855 R15: ffffffffc0665855
      [ 5139.248119] FS:  00007faf253b8700(0000) GS:ffff88903f840000(0000) knlGS:0000000000000000
      [ 5139.248137] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 5139.248149] CR2: 00007faf25395008 CR3: 0000000f72150006 CR4: 00000000007606e0
      [ 5139.248164] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [ 5139.248179] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [ 5139.248193] PKRU: 55555554
      [ 5139.248200] Call Trace:
      [ 5139.248210]  vsnprintf+0x1fb/0x510
      [ 5139.248221]  snprintf+0x39/0x40
      [ 5139.248238]  bch_snprint_string_list.constprop.15+0x5b/0x90 [bcache]
      [ 5139.248256]  __bch_cached_dev_show+0x44d/0x5f0 [bcache]
      [ 5139.248270]  ? __alloc_pages_nodemask+0xb2/0x210
      [ 5139.248284]  bch_cached_dev_show+0x2c/0x50 [bcache]
      [ 5139.248297]  sysfs_kf_seq_show+0xbb/0x190
      [ 5139.248308]  seq_read+0xfc/0x3c0
      [ 5139.248317]  __vfs_read+0x26/0x140
      [ 5139.248327]  vfs_read+0x87/0x130
      [ 5139.248336]  SyS_read+0x42/0x90
      [ 5139.248346]  do_syscall_64+0x74/0x160
      [ 5139.248358]  entry_SYSCALL_64_after_hwframe+0x3d/0xa2
      [ 5139.248370] RIP: 0033:0x7faf24eea370
      [ 5139.248379] RSP: 002b:00007fff82d03f38 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
      [ 5139.248395] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007faf24eea370
      [ 5139.248411] RDX: 0000000000020000 RSI: 00007faf25396000 RDI: 0000000000000003
      [ 5139.248426] RBP: 00007faf25396000 R08: 00000000ffffffff R09: 0000000000000000
      [ 5139.248441] R10: 000000007c9d4d41 R11: 0000000000000246 R12: 00007faf25396000
      [ 5139.248456] R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000fff
      [ 5139.248892] Code: ff ff ff 0f 1f 80 00 00 00 00 49 89 f9 48 89 cf 48 c7 c0 e3 32 e4 a7 48 c1 ff 30 48 81 fa ff 0f 00 00 48 0f 46 d0 48 85 ff 74 45 <44> 0f b6 02 48 8d 42 01 45 84 c0 74 38 48 01 fa 4c 89 cf eb 0e
      
      The simplest way to fix is to revert commit 89e0341a ("bcache: use
      sysfs_match_string() instead of __sysfs_match_string()").
      
      This bug was introduced in Linux v5.2, so this fix only applies to
      Linux v5.2 is enough for stable tree maintainer.
      
      Fixes: 89e0341a ("bcache: use sysfs_match_string() instead of __sysfs_match_string()")
      Cc: stable@vger.kernel.org
      Cc: Alexandru Ardelean <alexandru.ardelean@analog.com>
      Reported-by: NPeifeng Lin <pflin@suse.com>
      Acked-by: NAlexandru Ardelean <alexandru.ardelean@analog.com>
      Signed-off-by: NColy Li <colyli@suse.de>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      20621fed
    • M
      loop: set PF_MEMALLOC_NOIO for the worker thread · d0a255e7
      Mikulas Patocka 提交于
      A deadlock with this stacktrace was observed.
      
      The loop thread does a GFP_KERNEL allocation, it calls into dm-bufio
      shrinker and the shrinker depends on I/O completion in the dm-bufio
      subsystem.
      
      In order to fix the deadlock (and other similar ones), we set the flag
      PF_MEMALLOC_NOIO at loop thread entry.
      
      PID: 474    TASK: ffff8813e11f4600  CPU: 10  COMMAND: "kswapd0"
         #0 [ffff8813dedfb938] __schedule at ffffffff8173f405
         #1 [ffff8813dedfb990] schedule at ffffffff8173fa27
         #2 [ffff8813dedfb9b0] schedule_timeout at ffffffff81742fec
         #3 [ffff8813dedfba60] io_schedule_timeout at ffffffff8173f186
         #4 [ffff8813dedfbaa0] bit_wait_io at ffffffff8174034f
         #5 [ffff8813dedfbac0] __wait_on_bit at ffffffff8173fec8
         #6 [ffff8813dedfbb10] out_of_line_wait_on_bit at ffffffff8173ff81
         #7 [ffff8813dedfbb90] __make_buffer_clean at ffffffffa038736f [dm_bufio]
         #8 [ffff8813dedfbbb0] __try_evict_buffer at ffffffffa0387bb8 [dm_bufio]
         #9 [ffff8813dedfbbd0] dm_bufio_shrink_scan at ffffffffa0387cc3 [dm_bufio]
        #10 [ffff8813dedfbc40] shrink_slab at ffffffff811a87ce
        #11 [ffff8813dedfbd30] shrink_zone at ffffffff811ad778
        #12 [ffff8813dedfbdc0] kswapd at ffffffff811ae92f
        #13 [ffff8813dedfbec0] kthread at ffffffff810a8428
        #14 [ffff8813dedfbf50] ret_from_fork at ffffffff81745242
      
        PID: 14127  TASK: ffff881455749c00  CPU: 11  COMMAND: "loop1"
         #0 [ffff88272f5af228] __schedule at ffffffff8173f405
         #1 [ffff88272f5af280] schedule at ffffffff8173fa27
         #2 [ffff88272f5af2a0] schedule_preempt_disabled at ffffffff8173fd5e
         #3 [ffff88272f5af2b0] __mutex_lock_slowpath at ffffffff81741fb5
         #4 [ffff88272f5af330] mutex_lock at ffffffff81742133
         #5 [ffff88272f5af350] dm_bufio_shrink_count at ffffffffa03865f9 [dm_bufio]
         #6 [ffff88272f5af380] shrink_slab at ffffffff811a86bd
         #7 [ffff88272f5af470] shrink_zone at ffffffff811ad778
         #8 [ffff88272f5af500] do_try_to_free_pages at ffffffff811adb34
         #9 [ffff88272f5af590] try_to_free_pages at ffffffff811adef8
        #10 [ffff88272f5af610] __alloc_pages_nodemask at ffffffff811a09c3
        #11 [ffff88272f5af710] alloc_pages_current at ffffffff811e8b71
        #12 [ffff88272f5af760] new_slab at ffffffff811f4523
        #13 [ffff88272f5af7b0] __slab_alloc at ffffffff8173a1b5
        #14 [ffff88272f5af880] kmem_cache_alloc at ffffffff811f484b
        #15 [ffff88272f5af8d0] do_blockdev_direct_IO at ffffffff812535b3
        #16 [ffff88272f5afb00] __blockdev_direct_IO at ffffffff81255dc3
        #17 [ffff88272f5afb30] xfs_vm_direct_IO at ffffffffa01fe3fc [xfs]
        #18 [ffff88272f5afb90] generic_file_read_iter at ffffffff81198994
        #19 [ffff88272f5afc50] __dta_xfs_file_read_iter_2398 at ffffffffa020c970 [xfs]
        #20 [ffff88272f5afcc0] lo_rw_aio at ffffffffa0377042 [loop]
        #21 [ffff88272f5afd70] loop_queue_work at ffffffffa0377c3b [loop]
        #22 [ffff88272f5afe60] kthread_worker_fn at ffffffff810a8a0c
        #23 [ffff88272f5afec0] kthread at ffffffff810a8428
        #24 [ffff88272f5aff50] ret_from_fork at ffffffff81745242
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      d0a255e7
  5. 08 8月, 2019 10 次提交
  6. 07 8月, 2019 9 次提交
反馈
建议
客服 返回
顶部