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: <20110330092307.4a8deb79@bike.lwn.net>
Date:	Wed, 30 Mar 2011 09:23:07 -0600
From:	Jonathan Corbet <corbet@....net>
To:	Luis Filipe Rossi <luisf.rossi@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Help with dma on PCI driver

On Wed, 30 Mar 2011 07:07:32 -0300
Luis Filipe Rossi <luisf.rossi@...il.com> wrote:

> I am developing a driver for a custom PCI board. I am following the
> example on Essential Linux Device Drivers, but when i am calling the
> pci_alloc_consitent i get the following error:
> Mar 29 15:18:42 luis-desktop kernel: [ 4520.075823] BUG: unable to
> handle kernel NULL pointer dereference at 00000004

Your source was horribly mangled, which is likely to reduce the number of
responses you get.  I've not had the time to look at it in great detail,
but I will say that the assumption that the PCI device is already probed
and registered immediately after the pci_register_driver() call is
dangerous at best.  Things like dma_descriptor_setup() should be called in
your probe routine (or even later, when you actually need the buffer)
rather than in your module init function.

There's a lot of other issues with this driver, but that's the one I would
look first at for the resolution of this particular crash.

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