Re: [PATCH] zram: Fix unbalanced idr management at hot removal

2016-11-21 Thread Sergey Senozhatsky
A correction, On (11/22/16 10:09), Sergey Senozhatsky wrote: [..] > > > Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1010970 > > > Reported-and-tested-by: David Disseldorp > > > Reviewed-by: David Disseldorp > > > Cc: > > > Signed-off-by: Takashi Iwai > > > > Acked-by: Minchan Kim

Re: [PATCH] zram: Fix unbalanced idr management at hot removal

2016-11-21 Thread Takashi Iwai
On Tue, 22 Nov 2016 02:39:13 +0100, Sergey Senozhatsky wrote: > > On (11/22/16 10:33), Minchan Kim wrote: > > On Tue, Nov 22, 2016 at 10:28:12AM +0900, Sergey Senozhatsky wrote: > > > On (11/22/16 10:22), Minchan Kim wrote: > > > [..] > > > > > > Acked-by: Minchan Kim > > > > > > > > > > Link: l

Re: [PATCH] zram: Fix unbalanced idr management at hot removal

2016-11-21 Thread Sergey Senozhatsky
On (11/22/16 10:33), Minchan Kim wrote: > On Tue, Nov 22, 2016 at 10:28:12AM +0900, Sergey Senozhatsky wrote: > > On (11/22/16 10:22), Minchan Kim wrote: > > [..] > > > > > Acked-by: Minchan Kim > > > > > > > > Link: lkml.kernel.org/r/20161121132140.12683-1-ti...@suse.de > > > > Fixes: 17ec4cd985

Re: [PATCH] zram: Fix unbalanced idr management at hot removal

2016-11-21 Thread Minchan Kim
On Tue, Nov 22, 2016 at 10:28:12AM +0900, Sergey Senozhatsky wrote: > On (11/22/16 10:22), Minchan Kim wrote: > [..] > > > > Acked-by: Minchan Kim > > > > > > Link: lkml.kernel.org/r/20161121132140.12683-1-ti...@suse.de > > > Fixes: 17ec4cd98578 ("zram: don't call idr_remove() from zram_remove()"

Re: [PATCH] zram: Fix unbalanced idr management at hot removal

2016-11-21 Thread Sergey Senozhatsky
On (11/22/16 10:22), Minchan Kim wrote: [..] > > > Acked-by: Minchan Kim > > > > Link: lkml.kernel.org/r/20161121132140.12683-1-ti...@suse.de > > Fixes: 17ec4cd98578 ("zram: don't call idr_remove() from zram_remove()") > > Cc: [4.5+] > > 17ec4cd98578 marked as stable: [4.2+] so we should mar

Re: [PATCH] zram: Fix unbalanced idr management at hot removal

2016-11-21 Thread Minchan Kim
Hi Sergey, On Tue, Nov 22, 2016 at 10:09:30AM +0900, Sergey Senozhatsky wrote: > Cc Andrew > > On (11/22/16 09:11), Minchan Kim wrote: > [..] > > > This patch adds the proper error check in hot_remove_store() not to > > > call idr_remove() unconditionally. > > > > > > Bugzilla: https://bugzilla.

Re: [PATCH] zram: Fix unbalanced idr management at hot removal

2016-11-21 Thread Sergey Senozhatsky
Cc Andrew On (11/22/16 09:11), Minchan Kim wrote: [..] > > This patch adds the proper error check in hot_remove_store() not to > > call idr_remove() unconditionally. > > > > Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1010970 > > Reported-and-tested-by: David Disseldorp > > Reviewed-

Re: [PATCH] zram: Fix unbalanced idr management at hot removal

2016-11-21 Thread Minchan Kim
On Mon, Nov 21, 2016 at 02:21:40PM +0100, Takashi Iwai wrote: > The zram hot removal code calls idr_remove() even when zram_remove() > returns an error (typically -EBUSY). This results in a leftover at > the device release, eventually leading to a crash when the module is > reloaded. > > As descr

Re: [PATCH] zram: Fix unbalanced idr management at hot removal

2016-11-21 Thread Takashi Iwai
On Mon, 21 Nov 2016 14:21:40 +0100, Takashi Iwai wrote: > > The zram hot removal code calls idr_remove() even when zram_remove() > returns an error (typically -EBUSY). This results in a leftover at > the device release, eventually leading to a crash when the module is > reloaded. > > As describe

[PATCH] zram: Fix unbalanced idr management at hot removal

2016-11-21 Thread Takashi Iwai
The zram hot removal code calls idr_remove() even when zram_remove() returns an error (typically -EBUSY). This results in a leftover at the device release, eventually leading to a crash when the module is reloaded. As described in the bug report below, the following procedure would cause an Oops