[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpXySa6i6_Gtue1gbaHGZq5DG6SMvdO=ufGousUDKCGocw@mail.gmail.com>
Date: Wed, 9 Nov 2016 14:43:34 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: weiyongjun1@...wei.com, kernel-janitors@...r.kernel.org,
Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [bug report] genetlink: fix error return code in genl_register_family()
Cc'ing netdev
On Wed, Nov 9, 2016 at 1:56 AM, Dan Carpenter <dan.carpenter@...cle.com> wrote:
> Hello Wei Yongjun,
>
> The patch 22ca904ad70a: "genetlink: fix error return code in
> genl_register_family()" from Nov 1, 2016, leads to the following
> static checker warning:
>
> net/netlink/genetlink.c:365 genl_register_family()
> warn: unsigned 'family->id' is never less than zero.
>
> net/netlink/genetlink.c
> 362
> 363 family->id = idr_alloc(&genl_fam_idr, family,
> 364 start, end + 1, GFP_KERNEL);
> 365 if (family->id < 0) {
> ^^^^^^^^^^^^^^
> Doesn't work for unsigned int.
family->id should be signed int.
Powered by blists - more mailing lists