lkml.org 
[lkml]   [2019]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: BUG: unable to handle page fault for address = ADDR
From
Date
On Thu, 2019-04-25 at 16:13 -0700, Linus Torvalds wrote:
[...]
> so we do "slhc_free()" on an error pointer, which results in
>
> BUG: unable to handle page fault for address = fffffffffffffff4
>
> and the fix might be something like the appended whitespace-damaged
> trivial one-liner: just make slhc_free() silently ignore an error
> pointer, to match the slhc_init() return behavior.
>
> Ben? David?

This looks sensible to me.

Ben.

> Linus
>
> diff --git a/drivers/net/slip/slhc.c b/drivers/net/slip/slhc.c
> index f4e93f5fc204..ea90db3c7705 100644
> --- a/drivers/net/slip/slhc.c
> +++ b/drivers/net/slip/slhc.c
> @@ -153,7 +153,7 @@ slhc_init(int rslots, int tslots)
> void
> slhc_free(struct slcompress *comp)
> {
> - if ( comp == NULLSLCOMPR )
> + if ( IS_ERR_OR_NULL(comp) )
> return;
>
> if ( comp->tstate != NULLSLSTATE )
--
Ben Hutchings
It is impossible to make anything foolproof
because fools are so ingenious.

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-04-26 13:37    [W:0.058 / U:10.736 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site