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] [thread-next>] [day] [month] [year] [list]
Message-ID: <47500C1F.7080803@suse.cz>
Date:	Fri, 30 Nov 2007 14:11:59 +0100
From:	Jiri Slaby <jslaby@...e.cz>
To:	dsterba@...e.cz
Cc:	linux-kernel@...r.kernel.org, linux-pcmcia@...ts.infradead.org,
	akpm@...ux-foundation.org, jeff@...zik.org, jkosina@...e.cz,
	stephen@...metric.co.nz, benm@...metric.co.nz
Subject: Re: [PATCH] ipwireless_cs driver for 4G PC Card

On 11/30/2007 01:55 PM, David Sterba wrote:
> Hi,
> 
> I'm submitting driver for IPWireless PC Card, used for 4G
> internet connection.
> The driver has been in -mm series as ipwireless_cs.git tree for
> some time, is actively used and there are currently no
> outstanding bugs.

Almost :).

[...]
> Rewieved-by: Jiri Slaby <jslaby@...e.cz>
[...]
> diff --git a/drivers/char/pcmcia/ipwireless_cs_hardware.c b/drivers/char/pcmcia/ipwireless_cs_hardware.c
> new file mode 100644
> index 0000000..d67ce2e
> --- /dev/null
> +++ b/drivers/char/pcmcia/ipwireless_cs_hardware.c
[...]
> +static struct ipw_rx_packet *pool_allocate(struct ipw_hardware *hw,
> +					   struct ipw_rx_packet *packet,
> +					   int minimum_free_space)
> +{
> +
> +	if (!packet) {
> +		unsigned long flags;
> +
> +		/*
> +		 * If this is the first fragment, then we will need to fetch a
> +		 * packet to put it in.
> +		 */
> +		spin_lock_irqsave(&hw->spinlock, flags);
> +		/* If we have one in our pool, then pull it out. */
> +		if (!list_empty(&hw->rx_pool)) {
> +			packet = list_first_entry(&hw->rx_pool,
> +					struct ipw_rx_packet, queue);
> +			list_del(&packet->queue);
> +			hw->rx_pool_size--;
> +			spin_unlock_irqrestore(&hw->spinlock, flags);
> +		} else {
> +			/* Otherwise allocate a new one. */
> +			static int min_capacity = 256;
> +			int new_capacity;
> +
> +			spin_unlock_irqrestore(&hw->spinlock, flags);
> +			new_capacity =
> +			    minimum_free_space > min_capacity
> +			    ? minimum_free_space
> +			    : min_capacity;
> +			packet = kmalloc(sizeof(struct ipw_rx_packet)
> +					+ new_capacity, GFP_ATOMIC);

These not-testing-alloc-retvals remain unresolved. Please post a -fix or patch
v2 if any other comments come.

> +			packet->capacity = new_capacity;
...

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