Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1224346

Re: [PATCH] atm: deal with setting entry before mkip was called

From Eric Dumazet <eric.dumazet@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] atm: deal with setting entry before mkip was called
Date 2015-09-14 19:00 +0200
Message-ID <q8FgL-3Ce-25@gated-at.bofh.it> (permalink)
References <q8Eb0-25a-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 2015-09-14 at 11:48 -0400, Sasha Levin wrote:

> 
> diff --git a/net/atm/clip.c b/net/atm/clip.c
> index 17e55df..4407b2f 100644
> --- a/net/atm/clip.c
> +++ b/net/atm/clip.c
> @@ -317,6 +317,9 @@ static int clip_constructor(struct neighbour *neigh)
>  
>  static int clip_encap(struct atm_vcc *vcc, int mode)
>  {
> +	if (!CLIP_VCC(vcc))
> +		return -EBADF;
> +
>  	CLIP_VCC(vcc)->encap = mode;
>  	return 0;
>  }


-EBADF has a very precise meaning : /* Bad file number */

In this case, the file number is correct (and maps to a proper file),
but driver state is not allowing for this particular operation.




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] atm: deal with setting entry before mkip was called Sasha Levin <sasha.levin@oracle.com> - 2015-09-14 17:50 +0200
  Re: [PATCH] atm: deal with setting entry before mkip was called Eric Dumazet <eric.dumazet@gmail.com> - 2015-09-14 19:00 +0200
    Re: [PATCH] atm: deal with setting entry before mkip was called Sasha Levin <sasha.levin@oracle.com> - 2015-09-14 19:10 +0200
    Re: [PATCH] atm: deal with setting entry before mkip was called Sasha Levin <sasha.levin@oracle.com> - 2015-09-14 19:10 +0200
      Re: [PATCH] atm: deal with setting entry before mkip was called Eric Dumazet <eric.dumazet@gmail.com> - 2015-09-14 19:10 +0200

csiph-web