diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-06-26 09:10:46 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-26 09:10:46 +0200 |
commit | 8070b2b1ecbeb5437c92c33b4dcea1d8d80399ee (patch) | |
tree | 03e4cc4b1ed8c9905ed8742ea1f88c38b9638cfa /drivers/dma | |
parent | [NETROM]: Fix possible null pointer dereference. (diff) | |
download | linux-8070b2b1ecbeb5437c92c33b4dcea1d8d80399ee.tar.xz linux-8070b2b1ecbeb5437c92c33b4dcea1d8d80399ee.zip |
[IOAT]: Do not dereference THIS_MODULE directly to set unsafe.
Use the __unsafe() macro instead.
Noticed by Miles Lane.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/ioatdma.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/dma/ioatdma.c b/drivers/dma/ioatdma.c index 0fdf7fbd6495..2801d14a5e42 100644 --- a/drivers/dma/ioatdma.c +++ b/drivers/dma/ioatdma.c @@ -824,10 +824,9 @@ static int __init ioat_init_module(void) { /* it's currently unsafe to unload this module */ /* if forced, worst case is that rmmod hangs */ - if (THIS_MODULE != NULL) - THIS_MODULE->unsafe = 1; + __unsafe(THIS_MODULE); - return pci_module_init(&ioat_pci_drv); + pci_module_init(&ioat_pci_drv); } module_init(ioat_init_module); |