Skip to content
Commit 3efc61d9 authored by Takashi Iwai's avatar Takashi Iwai Committed by Thomas Zimmermann
Browse files

fbdev: Fix invalid page access after closing deferred I/O devices



When a fbdev with deferred I/O is once opened and closed, the dirty
pages still remain queued in the pageref list, and eventually later
those may be processed in the delayed work.  This may lead to a
corruption of pages, hitting an Oops.

This patch makes sure to cancel the delayed work and clean up the
pageref list at closing the device for addressing the bug.  A part of
the cleanup code is factored out as a new helper function that is
called from the common fb_release().

Reviewed-by: default avatarPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Tested-by: default avatarMiko Larsson <mikoxyzzz@gmail.com>
Fixes: 56c134f7

 ("fbdev: Track deferred-I/O pages in pageref struct")
Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230129082856.22113-1-tiwai@suse.de
parent 247a631f
  • mirror @mirror

    mentioned in commit 1ea3e18e

    ·

    mentioned in commit 1ea3e18e

    Toggle commit list
  • mirror @mirror

    mentioned in commit b70f2a88

    ·

    mentioned in commit b70f2a88

    Toggle commit list
  • mirror @mirror

    mentioned in commit 1dc23c47

    ·

    mentioned in commit 1dc23c47

    Toggle commit list
  • mirror @mirror

    mentioned in commit c4c32fd7e8683d8137f403324da8bd7df58d0dbe

    ·

    mentioned in commit c4c32fd7e8683d8137f403324da8bd7df58d0dbe

    Toggle commit list
  • mirror @mirror

    mentioned in commit ea2c7832b31f97c27ecec76740098e04a1224e35

    ·

    mentioned in commit ea2c7832b31f97c27ecec76740098e04a1224e35

    Toggle commit list
  • mirror @mirror

    mentioned in commit 4146c68562277c75b8ce5cfef1e52023844a6611

    ·

    mentioned in commit 4146c68562277c75b8ce5cfef1e52023844a6611

    Toggle commit list
  • mirror @mirror

    mentioned in commit 0f650a54fe4697fc6a6b6780b012067c7a5484b5

    ·

    mentioned in commit 0f650a54fe4697fc6a6b6780b012067c7a5484b5

    Toggle commit list
  • mirror @mirror

    mentioned in commit b5e963262d3d40d947592cd077b118631645834e

    ·

    mentioned in commit b5e963262d3d40d947592cd077b118631645834e

    Toggle commit list
  • mirror @mirror

    mentioned in commit b3fefb8b19ba1b46f46cc4c380f8691abfecf387

    ·

    mentioned in commit b3fefb8b19ba1b46f46cc4c380f8691abfecf387

    Toggle commit list
  • mirror @mirror

    mentioned in commit 156d3278463b295ba1d2487e31ced18c5355618b

    ·

    mentioned in commit 156d3278463b295ba1d2487e31ced18c5355618b

    Toggle commit list
  • mirror @mirror

    mentioned in commit 22e82e2be4f530c67dec135bad68c75b9fa404f4

    ·

    mentioned in commit 22e82e2be4f530c67dec135bad68c75b9fa404f4

    Toggle commit list
  • mirror @mirror

    mentioned in commit 78f62fa935db9b8e3d89a32bc1a5ead431676e02

    ·

    mentioned in commit 78f62fa935db9b8e3d89a32bc1a5ead431676e02

    Toggle commit list
  • mirror @mirror

    mentioned in commit 9ccdd646f485052f5140ce163bb435ec0e8792a7

    ·

    mentioned in commit 9ccdd646f485052f5140ce163bb435ec0e8792a7

    Toggle commit list
  • mirror @mirror

    mentioned in commit 5da97ed31aa3188eb6208e301c09679f413fe421

    ·

    mentioned in commit 5da97ed31aa3188eb6208e301c09679f413fe421

    Toggle commit list
  • mirror @mirror

    mentioned in commit 7fb3cdcc4c498c166dc65241e2c9122e42e2a2ff

    ·

    mentioned in commit 7fb3cdcc4c498c166dc65241e2c9122e42e2a2ff

    Toggle commit list
  • mirror @mirror

    mentioned in commit 04a735ef4bcc0d05fd02775c8afd258e7d735d6f

    ·

    mentioned in commit 04a735ef4bcc0d05fd02775c8afd258e7d735d6f

    Toggle commit list
  • mirror @mirror

    mentioned in commit 19bd82da

    ·

    mentioned in commit 19bd82da

    Toggle commit list
  • mirror @mirror

    mentioned in commit be8690262f42e926997dfacada69aed3cfc7a15d

    ·

    mentioned in commit be8690262f42e926997dfacada69aed3cfc7a15d

    Toggle commit list
  • mirror @mirror

    mentioned in commit ca2b62dec0f47ff15cef84b1a8cb8165022d0355

    ·

    mentioned in commit ca2b62dec0f47ff15cef84b1a8cb8165022d0355

    Toggle commit list
  • mirror @mirror

    mentioned in commit 34befb14d2d97ecea3eb93de4a3612ef5e0bb8c3

    ·

    mentioned in commit 34befb14d2d97ecea3eb93de4a3612ef5e0bb8c3

    Toggle commit list
  • mirror @mirror

    mentioned in commit de096216b533ddc90d3e60c15a80ca4a0c5353a5

    ·

    mentioned in commit de096216b533ddc90d3e60c15a80ca4a0c5353a5

    Toggle commit list
  • mirror @mirror

    mentioned in commit cae885fb590a7dad5d4d68f796689f1b8101b99f

    ·

    mentioned in commit cae885fb590a7dad5d4d68f796689f1b8101b99f

    Toggle commit list
  • mirror @mirror

    mentioned in commit a7445522580010dda5a58b796a7df0f1b19bfc47

    ·

    mentioned in commit a7445522580010dda5a58b796a7df0f1b19bfc47

    Toggle commit list
  • mirror @mirror

    mentioned in commit 8f084ea3b899c8d0b4a741725ff92305256cf018

    ·

    mentioned in commit 8f084ea3b899c8d0b4a741725ff92305256cf018

    Toggle commit list
  • mirror @mirror

    mentioned in commit 18b927440e418a8998261367b031a684d328d9ed

    ·

    mentioned in commit 18b927440e418a8998261367b031a684d328d9ed

    Toggle commit list
  • mirror @mirror

    mentioned in commit 0513b3b314fe3b06d742ee38b11fb067fdb6dae4

    ·

    mentioned in commit 0513b3b314fe3b06d742ee38b11fb067fdb6dae4

    Toggle commit list
  • mirror @mirror

    mentioned in commit 027ad5135ee3c319f596b80827f345f21e69941b

    ·

    mentioned in commit 027ad5135ee3c319f596b80827f345f21e69941b

    Toggle commit list
  • mirror @mirror

    mentioned in commit 05fa88a2b6ae99e4f9d7ae5ead234f3dd4eb3e67

    ·

    mentioned in commit 05fa88a2b6ae99e4f9d7ae5ead234f3dd4eb3e67

    Toggle commit list
  • mirror @mirror

    mentioned in commit 8f3a11e19114201f384a75270605b142ae1f574e

    ·

    mentioned in commit 8f3a11e19114201f384a75270605b142ae1f574e

    Toggle commit list
  • mirror @mirror

    mentioned in commit 64a7eede7959fcab7f941762398d4117c90b8ed2

    ·

    mentioned in commit 64a7eede7959fcab7f941762398d4117c90b8ed2

    Toggle commit list
  • mirror @mirror

    mentioned in commit ea31fc14b47d0f592af8d87275f4ded67ad268e8

    ·

    mentioned in commit ea31fc14b47d0f592af8d87275f4ded67ad268e8

    Toggle commit list
  • mirror @mirror

    mentioned in commit 01d3702b62c7a76a6b89ca700e090a5ed5edfbaf

    ·

    mentioned in commit 01d3702b62c7a76a6b89ca700e090a5ed5edfbaf

    Toggle commit list
  • mirror @mirror

    mentioned in commit 47126fc72c8f7d81b331027aeee19aaea18c911d

    ·

    mentioned in commit 47126fc72c8f7d81b331027aeee19aaea18c911d

    Toggle commit list
  • mirror @mirror

    mentioned in commit d4f2ee1a146ad7debc015c5661f9b37bfd606bb8

    ·

    mentioned in commit d4f2ee1a146ad7debc015c5661f9b37bfd606bb8

    Toggle commit list
  • mirror @mirror

    mentioned in commit b24ada382d2a619c91f8c52f0a873b6315d4accb

    ·

    mentioned in commit b24ada382d2a619c91f8c52f0a873b6315d4accb

    Toggle commit list
  • mirror @mirror

    mentioned in commit c44c3dcf

    ·

    mentioned in commit c44c3dcf

    Toggle commit list
  • mirror @mirror

    mentioned in commit 525882331d0689de00f8cbe345b71e658c808876

    ·

    mentioned in commit 525882331d0689de00f8cbe345b71e658c808876

    Toggle commit list
  • mirror @mirror

    mentioned in commit 6ee3b503

    ·

    mentioned in commit 6ee3b503

    Toggle commit list
  • mirror @mirror

    mentioned in commit 52462561dfbc0b6155165e42537cd44716605b79

    ·

    mentioned in commit 52462561dfbc0b6155165e42537cd44716605b79

    Toggle commit list
  • mirror @mirror

    mentioned in commit 44b6aa147f5c1f91fb8e8abe21c1a1b02a2e08f5

    ·

    mentioned in commit 44b6aa147f5c1f91fb8e8abe21c1a1b02a2e08f5

    Toggle commit list
  • mirror @mirror

    mentioned in commit c3a65dada4b5ae807f262cbba3d731e58f3162ef

    ·

    mentioned in commit c3a65dada4b5ae807f262cbba3d731e58f3162ef

    Toggle commit list
  • mirror @mirror

    mentioned in commit c3d08fd6eda6052efeca5913b030e94f0fe9c5ed

    ·

    mentioned in commit c3d08fd6eda6052efeca5913b030e94f0fe9c5ed

    Toggle commit list
  • mirror @mirror

    mentioned in commit 276f586b3cb825917960db7d89b262d32979f378

    ·

    mentioned in commit 276f586b3cb825917960db7d89b262d32979f378

    Toggle commit list
  • mirror @mirror

    mentioned in commit 39404daf5db347faed358572842c73353077c0ec

    ·

    mentioned in commit 39404daf5db347faed358572842c73353077c0ec

    Toggle commit list
  • mirror @mirror

    mentioned in commit dfc2899599dacfbe8a34e187e7b9118ab7b5f914

    ·

    mentioned in commit dfc2899599dacfbe8a34e187e7b9118ab7b5f914

    Toggle commit list
  • mirror @mirror

    mentioned in commit 35a64996fdd6ea6a0b5439f405ba847e60dbeb06

    ·

    mentioned in commit 35a64996fdd6ea6a0b5439f405ba847e60dbeb06

    Toggle commit list
  • mirror @mirror

    mentioned in commit eaf1071947cd81b310f3925469e40491e9bac493

    ·

    mentioned in commit eaf1071947cd81b310f3925469e40491e9bac493

    Toggle commit list
  • mirror @mirror

    mentioned in commit 85c744a4

    ·

    mentioned in commit 85c744a4

    Toggle commit list
  • mirror @mirror

    mentioned in commit d34e9370

    ·

    mentioned in commit d34e9370

    Toggle commit list
  • mirror @mirror

    mentioned in commit a3375e9eb33d5ab804ac9710993dbd1e11e706f5

    ·

    mentioned in commit a3375e9eb33d5ab804ac9710993dbd1e11e706f5

    Toggle commit list
  • mirror @mirror

    mentioned in commit 77fc1fbc

    ·

    mentioned in commit 77fc1fbc

    Toggle commit list
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment