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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070803093907.GA5872@ifup.org>
Date:	Fri, 3 Aug 2007 02:39:07 -0700
From:	Brandon Philips <bphilips@...e.de>
To:	Tejun Heo <teheo@...e.de>
Cc:	netdev@...r.kernel.org
Subject: Re: [patch 2/5][RFC] Update net core to use devres.

On 18:13 Fri 03 Aug 2007, Tejun Heo wrote:
> > +	p = devres_alloc(devm_free_netdev, 0, GFP_KERNEL);
> 
> s/0/sizeof(*p)/

Oops!  It should have read like this:

+static void * register_netdev_devres(struct device *gendev,
+                                               struct net_device *dev)
+{
+       void *p;
+
+       /* 0 size because we don't need it. The net_device is already alloc'd
+        * in alloc_netdev_mq.  We can't use devm_kzalloc in alloc_netdev_mq
+        * because a net_device cannot be free'd directly as it can be a
+        * kobject.  See free_netdev.
+        */
+       p = devres_alloc(devm_free_netdev, 0, GFP_KERNEL);
+
+       if (unlikely(!p))
+               return NULL;
+
+       devres_add(gendev, p);
+
+       return dev;
+}

I will send the full correct patch.

Thanks,

	Brandon
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ