Re: [Linux-kernel-mentees] [PATCH] idr: remove WARN_ON_ONCE() when trying to check id

2020-09-14 Thread Anmol Karn
On Mon, Sep 14, 2020 at 08:26:55PM +0100, Matthew Wilcox wrote: > On Tue, Sep 15, 2020 at 12:17:55AM +0530, Anmol Karn wrote: > > On Mon, Sep 14, 2020 at 12:08:03PM +0100, Matthew Wilcox wrote: > > > On Mon, Sep 14, 2020 at 12:47:24PM +0530, Anmol Karn wrote: > > > > idr_get_next() gives

Re: [Linux-kernel-mentees] [PATCH] idr: remove WARN_ON_ONCE() when trying to check id

2020-09-14 Thread Matthew Wilcox
On Tue, Sep 15, 2020 at 12:17:55AM +0530, Anmol Karn wrote: > On Mon, Sep 14, 2020 at 12:08:03PM +0100, Matthew Wilcox wrote: > > On Mon, Sep 14, 2020 at 12:47:24PM +0530, Anmol Karn wrote: > > > idr_get_next() gives WARN_ON_ONCE() when it gets (id > INT_MAX) true > > > and this happens when

Re: [Linux-kernel-mentees] [PATCH] idr: remove WARN_ON_ONCE() when trying to check id

2020-09-14 Thread Anmol Karn
On Mon, Sep 14, 2020 at 12:08:03PM +0100, Matthew Wilcox wrote: > On Mon, Sep 14, 2020 at 12:47:24PM +0530, Anmol Karn wrote: > > idr_get_next() gives WARN_ON_ONCE() when it gets (id > INT_MAX) true > > and this happens when syzbot does fuzzing, and that warning is > > expected, but WARN_ON_ONCE()

Re: [Linux-kernel-mentees] [PATCH] idr: remove WARN_ON_ONCE() when trying to check id

2020-09-14 Thread Matthew Wilcox
On Mon, Sep 14, 2020 at 12:47:24PM +0530, Anmol Karn wrote: > idr_get_next() gives WARN_ON_ONCE() when it gets (id > INT_MAX) true > and this happens when syzbot does fuzzing, and that warning is > expected, but WARN_ON_ONCE() is not required here and, cecking > the condition and returning NULL

[Linux-kernel-mentees] [PATCH] idr: remove WARN_ON_ONCE() when trying to check id

2020-09-14 Thread Anmol Karn
idr_get_next() gives WARN_ON_ONCE() when it gets (id > INT_MAX) true and this happens when syzbot does fuzzing, and that warning is expected, but WARN_ON_ONCE() is not required here and, cecking the condition and returning NULL value would be suffice. Reference: commit b9959c7a347 ("filldir[64]: