)]}'
{
  "commit": "108df1056a4867ad16656039194f60aa0174b6c6",
  "tree": "59fd51834a9eece531dde16279863f1858ad75b3",
  "parents": [
    "b8221ff394b7b528a5cd2fb6b73786bd709d84b9"
  ],
  "author": {
    "name": "Geert Uytterhoeven",
    "email": "geert+renesas@glider.be",
    "time": "Mon Dec 04 12:29:53 2023 +0100"
  },
  "committer": {
    "name": "Greg Kroah-Hartman",
    "email": "gregkh@linuxfoundation.org",
    "time": "Wed Jan 10 14:45:41 2024 +0100"
  },
  "message": "mmc: core: Cancel delayed work before releasing host\n\ncommit 1036f69e251380573e256568cf814506e3fb9988 upstream.\n\nOn RZ/Five SMARC EVK, where probing of SDHI is deferred due to probe\ndeferral of the vqmmc-supply regulator:\n\n    ------------[ cut here ]------------\n    WARNING: CPU: 0 PID: 0 at kernel/time/timer.c:1738 __run_timers.part.0+0x1d0/0x1e8\n    Modules linked in:\n    CPU: 0 PID: 0 Comm: swapper Not tainted 6.7.0-rc4 #101\n    Hardware name: Renesas SMARC EVK based on r9a07g043f01 (DT)\n    epc : __run_timers.part.0+0x1d0/0x1e8\n     ra : __run_timers.part.0+0x134/0x1e8\n    epc : ffffffff800771a4 ra : ffffffff80077108 sp : ffffffc800003e60\n     gp : ffffffff814f5028 tp : ffffffff8140c5c0 t0 : ffffffc800000000\n     t1 : 0000000000000001 t2 : ffffffff81201300 s0 : ffffffc800003f20\n     s1 : ffffffd8023bc4a0 a0 : 00000000fffee6b0 a1 : 0004010000400000\n     a2 : ffffffffc0000016 a3 : ffffffff81488640 a4 : ffffffc800003e60\n     a5 : 0000000000000000 a6 : 0000000004000000 a7 : ffffffc800003e68\n     s2 : 0000000000000122 s3 : 0000000000200000 s4 : 0000000000000000\n     s5 : ffffffffffffffff s6 : ffffffff81488678 s7 : ffffffff814886c0\n     s8 : ffffffff814f49c0 s9 : ffffffff81488640 s10: 0000000000000000\n     s11: ffffffc800003e60 t3 : 0000000000000240 t4 : 0000000000000a52\n     t5 : ffffffd8024ae018 t6 : ffffffd8024ae038\n    status: 0000000200000100 badaddr: 0000000000000000 cause: 0000000000000003\n    [\u003cffffffff800771a4\u003e] __run_timers.part.0+0x1d0/0x1e8\n    [\u003cffffffff800771e0\u003e] run_timer_softirq+0x24/0x4a\n    [\u003cffffffff80809092\u003e] __do_softirq+0xc6/0x1fa\n    [\u003cffffffff80028e4c\u003e] irq_exit_rcu+0x66/0x84\n    [\u003cffffffff80800f7a\u003e] handle_riscv_irq+0x40/0x4e\n    [\u003cffffffff80808f48\u003e] call_on_irq_stack+0x1c/0x28\n    ---[ end trace 0000000000000000 ]---\n\nWhat happens?\n\n    renesas_sdhi_probe()\n    {\n    \ttmio_mmc_host_alloc()\n\t    mmc_alloc_host()\n\t\tINIT_DELAYED_WORK(\u0026host-\u003edetect, mmc_rescan);\n\n\tdevm_request_irq(tmio_mmc_irq);\n\n\t/*\n\t * After this, the interrupt handler may be invoked at any time\n\t *\n\t *  tmio_mmc_irq()\n\t *  {\n\t *\t__tmio_mmc_card_detect_irq()\n\t *\t    mmc_detect_change()\n\t *\t\t_mmc_detect_change()\n\t *\t\t    mmc_schedule_delayed_work(\u0026host-\u003edetect, delay);\n\t *  }\n\t */\n\n\ttmio_mmc_host_probe()\n\t    tmio_mmc_init_ocr()\n\t\t-EPROBE_DEFER\n\n\ttmio_mmc_host_free()\n\t    mmc_free_host()\n    }\n\nWhen expire_timers() runs later, it warns because the MMC host structure\ncontaining the delayed work was freed, and now contains an invalid work\nfunction pointer.\n\nFix this by cancelling any pending delayed work before releasing the\nMMC host structure.\n\nSigned-off-by: Geert Uytterhoeven \u003cgeert+renesas@glider.be\u003e\nTested-by: Lad Prabhakar \u003cprabhakar.mahadev-lad.rj@bp.renesas.com\u003e\nCc: stable@vger.kernel.org\nLink: https://lore.kernel.org/r/205dc4c91b47e31b64392fe2498c7a449e717b4b.1701689330.git.geert+renesas@glider.be\nSigned-off-by: Ulf Hansson \u003culf.hansson@linaro.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4da2bcfd064944a7083b6729b87002ed6281b6a1",
      "old_mode": 33188,
      "old_path": "drivers/mmc/core/host.c",
      "new_id": "7d7114d0fa252c2abaf9753730df983b0c01ab60",
      "new_mode": 33188,
      "new_path": "drivers/mmc/core/host.c"
    }
  ]
}
