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: <20090915.235721.252164710.davem@davemloft.net>
Date:	Tue, 15 Sep 2009 23:57:21 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	jie.yang@...eros.com
Cc:	miles.lane@...il.com, chris.snook@...il.com, jcliburn@...il.com,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [Patch net-next]atl1e:fix 2.6.31-git4 -- ATL1E 0000:03:00.0:
 DMA-API: device driver frees DMA

From: <jie.yang@...eros.com>
Date: Wed, 16 Sep 2009 14:21:53 +0800

> 
> [   25.059969] WARNING: at lib/dma-debug.c:816 check_unmap+0x383/0x55c()
> [   25.059976] Hardware name: 1000HE
> [   25.059984] ATL1E 0000:03:00.0: DMA-API: device driver frees DMA
>     memory with wrong function [device address=0x0000000036b92802] 
>     [size=90 bytes] [mapped as single] [unmapped as page]
> 
> use the wrong API when free dma. So when map dma use a flag to demostrate
> whether it is 'pci_map_single' or 'pci_map_page'. When free the dma, check
> the flags to select the right APIs('pci_unmap_single' or 'pci_unmap_page').
>  
> Signed-off-by: Jie Yang <jie.yang@...eros.com>

An 'unsigned long' is an enormous type to use just to store
3 bits of information.  Use a u16 or similar to compact the
size of struct atl1e_tx_buffer

Also, it looks terribly ugle to define the flag macros, some with
three leading zeros in the hexadecimal values and one without.

Please make them consistent, thanks.

Generally, I see that this change was put together very hastily
and without very much care.
--
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