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


Groups > linux.kernel > #1519160

Re: [PATCH] genetlink: fix unsigned int comparison with less than zero

From Cong Wang <xiyou.wangcong@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] genetlink: fix unsigned int comparison with less than zero
Date 2016-11-10 18:20 +0100
Message-ID <sC1b3-FQ-3@gated-at.bofh.it> (permalink)
References <sBZVD-8ak-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Nov 10, 2016 at 7:57 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> family->id is unsigned, so the less than zero check for
> failure return from idr_alloc is never true and so the error exit
> is never handled.  Instead, assign err and check if this is less
> than zero since this is a signed integer.

Why family->id can't be just signed int? For me it should be.

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


Thread

[PATCH] genetlink: fix unsigned int comparison with less than zero Colin King <colin.king@canonical.com> - 2016-11-10 17:00 +0100
  Re: [PATCH] genetlink: fix unsigned int comparison with less than zero Cong Wang <xiyou.wangcong@gmail.com> - 2016-11-10 18:20 +0100

csiph-web