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-next>] [day] [month] [year] [list]
Date:	Wed, 11 Jan 2012 11:28:43 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Adaptec OEM Raid Solutions <aacraid@...ptec.com>
Cc:	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: aacraid question: is maximum_num_containers supposed to be minimum?

MAXIMUM_NUM_CONTAINERS is consistently used as a minimum not a maximum
so I was wondering what was up with that?  This is ancient code that
predates git.

drivers/scsi/aacraid/aachba.c
   382          if (maximum_num_containers < MAXIMUM_NUM_CONTAINERS)
   383                  maximum_num_containers = MAXIMUM_NUM_CONTAINERS;
   384          fsa_dev_ptr = kzalloc(sizeof(*fsa_dev_ptr) * maximum_num_containers,
   385                          GFP_KERNEL);

Btw, if maximum_num_containers were really a maximum instead of minimum
then it should be unsigned.  That was what brought the code to my
attention initially.

drivers/scsi/aacraid/linit.c
  1235          if (shost->max_id < MAXIMUM_NUM_CONTAINERS)
  1236                  shost->max_id = MAXIMUM_NUM_CONTAINERS;
  1237          else
  1238                  shost->this_id = shost->max_id;

regards,
dan carpenter

--
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