Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1309836
| From | Minchan Kim <minchan@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] zram: don't call idr_remove() from zram_remove() |
| Date | 2016-01-15 04:00 +0100 |
| Message-ID | <qR2Mi-85x-3@gated-at.bofh.it> (permalink) |
| References | <qQPP4-7uv-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Jan 14, 2016 at 02:03:47PM +0100, Jerome Marchand wrote: > The use of idr_remove() is forbidden in the callback functions of > idr_for_each(). It is therefore unsafe to call idr_remove in > zram_remove(). > This patch moves the call to idr_remove() from zram_remove() to > hot_remove_store(). In the detroy_devices() path, idrs are removed by > idr_destroy(). > This solves an use-after-free detected by KASan. > > Signed-off-by: Jerome Marchand <jmarchan@redhat.com> Acked-by: Minchan Kim <minchan@kernel.org> with Sergey's nitpick Thanks!
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] zram: don't call idr_remove() from zram_remove() "Jerome Marchand" <jmarchan@redhat.com> - 2016-01-14 14:10 +0100
Re: [PATCH] zram: don't call idr_remove() from zram_remove() Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-01-15 01:50 +0100
Re: [PATCH] zram: don't call idr_remove() from zram_remove() Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-01-15 02:30 +0100
Re: [PATCH] zram: don't call idr_remove() from zram_remove() Minchan Kim <minchan@kernel.org> - 2016-01-15 04:00 +0100
csiph-web