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: <CACna6rwQOdb+Z6OiD8K6duW8RxYvD3GR3wxr5taPHuKGesg-vg@mail.gmail.com>
Date:	Thu, 21 Jul 2011 09:14:05 +0200
From:	Rafał Miłecki <zajec5@...il.com>
To:	Francois Romieu <romieu@...zoreil.com>
Cc:	linux-wireless@...r.kernel.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Bug in BCMA: device_unregister causing "NULL pointer dereference at"

W dniu 14 lipca 2011 16:45 użytkownik Francois Romieu
<romieu@...zoreil.com> napisał:
> Rafał Miłecki <zajec5@...il.com> :
> [...]
>> Any tip, why does it happen?
>
> bcma_release_core_dev kfrees core while its list_head is still used ?
>
> May be something like this :
>
> diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
> index be52344..85fb3aa 100644
> --- a/drivers/bcma/main.c
> +++ b/drivers/bcma/main.c
> @@ -110,11 +110,14 @@ static int bcma_register_cores(struct bcma_bus *bus)
>
>  static void bcma_unregister_cores(struct bcma_bus *bus)
>  {
> -       struct bcma_device *core;
> +       struct bcma_device *core, *next;
>
> -       list_for_each_entry(core, &bus->cores, list) {
> +       list_for_each_entry_safe(core, next, &bus->cores, list) {
> +               list_del(&core->list);
>                if (core->dev_registered)
>                        device_unregister(&core->dev);
> +               else
> +                       kfree(core);
>        }
>  }

Thanks for your help, but I'm afraid crash happens in totally
different place. Have you take a look at dmesg.log from my second
e-mail? NULL ptr exception happens in kobject_del.

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