lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABE8wwuO7=Jo2RkrBFgnvuQP2X5UAohP-ZdWg6WejXUe+XRYyA@mail.gmail.com>
Date:	Wed, 21 Dec 2011 09:37:17 -0800
From:	"Williams, Dan J" <dan.j.williams@...el.com>
To:	Matthew Wilcox <matthew@....cx>
Cc:	Tao Ma <tm@....ma>, Meelis Roos <mroos@...ux.ee>, axboe@...nel.dk,
	Tao Ma <boyu.mt@...bao.com>,
	Linux Kernel list <linux-kernel@...r.kernel.org>,
	linux-scsi@...r.kernel.org, Ed Nadolski <edmund.nadolski@...el.com>
Subject: Re: [PATCH] block: fix blk_queue_end_tag()

On Wed, Dec 21, 2011 at 5:20 AM, Matthew Wilcox <matthew@....cx> wrote:
> On Tue, Dec 20, 2011 at 11:30:14PM -0800, Williams, Dan J wrote:
>> @@ -284,16 +284,7 @@ void blk_queue_end_tag(struct request_queue *q,
>> struct request *rq)
>>         struct blk_queue_tag *bqt = q->queue_tags;
>>         int tag = rq->tag;
>>
>> -       BUG_ON(tag == -1);
>> -
>> -       if (unlikely(tag >= bqt->max_depth)) {
>> -               /*
>> -                * This can happen after tag depth has been reduced.
>> -                * But tag shouldn't be larger than real_max_depth.
>> -                */
>> -               WARN_ON(tag >= bqt->real_max_depth);
>> -               return;
>> -       }
>> +       BUG_ON(tag == -1 || tag > bqt->real_max_depth);
>
> or ...
>
> -       int tag = rq->tag;
> +       unsigned tag = rq->tag;
> +       BUG_ON(tag >= bqt->real_max_depth);
>
> since tags in the range INT_MIN to -2 are also a bug, right?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ