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: <1291677875-30493-24-git-send-email-konrad.wilk@oracle.com>
Date:	Mon,  6 Dec 2010 18:24:35 -0500
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	airlied@...ux.ie, tglx@...utronix.de, hpa@...or.com,
	airlied@...hat.com, linux-kernel@...r.kernel.org, konrad@...nel.org
Cc:	Jeremy Fitzhardinge <jeremy@...p.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Subject: [PATCH 23/23] agp/generic: Set the dma_addr[i] to DMA_ERROR_CODE

Set the dma_addr[i] to DMA_ERROR_CODE so it will be the
responsibility of the caller to set the dma_addr[i] to the right
value. Currently the callers that would utililize this are then ones
that set the type to AGP_USER_TYPES are the TTM and DRM APIs.


Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
---
 drivers/char/agp/generic.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
index 534dccb..77ff3bd 100644
--- a/drivers/char/agp/generic.c
+++ b/drivers/char/agp/generic.c
@@ -1221,8 +1221,10 @@ struct agp_memory *agp_generic_alloc_user(size_t page_count, int type)
 	if (new == NULL)
 		return NULL;
 
-	for (i = 0; i < page_count; i++)
+	for (i = 0; i < page_count; i++) {
 		new->pages[i] = NULL;
+		new->dma_addr[i] = DMA_ERROR_CODE;
+	}
 	new->page_count = 0;
 	new->type = type;
 	new->num_scratch_pages = pages;
-- 
1.7.1

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