Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1592328
| From | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm, swap: Fix a race in free_swap_and_cache() |
| Date | 2017-03-04 00:00 +0100 |
| Message-ID | <th4l3-7SF-3@gated-at.bofh.it> (permalink) |
| References | <tgdJM-4r7-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, 1 Mar 2017 22:38:09 +0800 "Huang, Ying" <ying.huang@intel.com> wrote: > Before using cluster lock in free_swap_and_cache(), the > swap_info_struct->lock will be held during freeing the swap entry and > acquiring page lock, so the page swap count will not change when > testing page information later. But after using cluster lock, the > cluster lock (or swap_info_struct->lock) will be held only during > freeing the swap entry. So before acquiring the page lock, the page > swap count may be changed in another thread. If the page swap count > is not 0, we should not delete the page from the swap cache. This is > fixed via checking page swap count again after acquiring the page > lock. What are the user-visible runtime effects of this bug? Please always include this info when fixing things, thanks.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] mm, swap: Fix a race in free_swap_and_cache() "Huang, Ying" <ying.huang@intel.com> - 2017-03-01 15:50 +0100
Re: [PATCH] mm, swap: Fix a race in free_swap_and_cache() Andrew Morton <akpm@linux-foundation.org> - 2017-03-04 00:00 +0100
Re: [PATCH] mm, swap: Fix a race in free_swap_and_cache() huang ying <huang.ying.caritas@gmail.com> - 2017-03-04 13:10 +0100
csiph-web