Re: [PATCH 1/4] netfilter: Add nf_hook_state initializer function.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hannes Frederic Sowa <hannes@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Apr 2015 15:41:21 +0200

> Minor suggestion:
> 
> I think we can return the structure as a whole:
> 
> static inline struct nf_hook_state nf_hook_state_init(unsigned int hook,
> ...).
> 
> Being static inline it should not make any difference.

If by some insane possibility this does not get inlined, this structure
gets copied to and from the kernel stack on some cpu ABIs in order to
return it.

Never return structures from functions, ever.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux