Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1309554
| From | Eric Dumazet <eric.dumazet@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] af_unix: Use kfree for addresses in unix_bind |
| Date | 2016-01-14 19:10 +0100 |
| Message-ID | <qQUvo-2j8-11@gated-at.bofh.it> (permalink) |
| References | <qQSWC-197-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, 2016-01-14 at 16:22 +0000, Rainer Weikusat wrote: > Use kfree instead of unix_release_addr when freeing newly-allocated > unix_address structures after binding the socket failed. The second > function does an atomic_dec_and_test in order to free the address once > its reference count falls to zero which isn't necessary for the > unix_bind error path as the new structure wasn't published yet. 'Using > kfree' is also how unix_autobind handles this case. > > Signed-off-by: Rainer Weikusat <rweikusat@mobileactivedefense.com> > --- This looks net-next material ? net-next tree is closed during merge window. Not sure what you gain by optimizing error paths ...
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] af_unix: Use kfree for addresses in unix_bind Rainer Weikusat <rweikusat@mobileactivedefense.com> - 2016-01-14 17:30 +0100
Re: [PATCH] af_unix: Use kfree for addresses in unix_bind Eric Dumazet <eric.dumazet@gmail.com> - 2016-01-14 19:10 +0100
Re: [PATCH] af_unix: Use kfree for addresses in unix_bind Rainer Weikusat <rweikusat@mobileactivedefense.com> - 2016-01-14 20:10 +0100
csiph-web