staging: wlan-ng: p80211conv.h: warning I don't understand

Valdis.Kletnieks at Valdis.Kletnieks at
Wed Nov 11 22:41:19 EST 2015

On Thu, 12 Nov 2015 02:55:40 +0000, "Gavin O'Leary" said:

> What is this warning about? How do I go about fixing it?
> Thank you,

Let's cut-n-paste 2 more lines out of the file:

    613         /* Allocate the rxmeta */
    614         rxmeta = kzalloc(sizeof(struct p80211_rxmeta), GFP_ATOMIC);
    616         if (rxmeta == NULL) {
    617                 netdev_err(wlandev->netdev,
    618                            "%s: Failed to allocate rxmeta.\n", wlandev->name);
    619                 result = 1;
    620                 goto exit;
    621         }

Lesson 1:  Under what conditions will the kzalloc return NULL?  If this happens,
what are the chances you'll have a chance to *see* the message? (Hint - what
size is that struct?  If the kernel can't find that much free memory, what are
the chances you still have a functional syslog daemon?)

Lesson 2: The wisest thing ever said about
" the code is more what you'd call "guidelines" than actual rules."
			-- Captain Barbossa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : 

More information about the Kernelnewbies mailing list