Olivier Galibert wrote:I completely agree with you here. But, unless this page : http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html is not up-to-date anymore, there is no free attribute. Which is quite logical, actually, as such an attribute would be equivalent to simply marking the parameter of the function non-const. That's what I was alluding to, when speaking of a legitimate change (adding attribute malloc to kmalloc()) which would break another part of the kernel. Of course, we can also assume that nobody would make the error of letting kfree() taking a const void* after that, but experience shows that programmers are very likely to fall into such traps. (No flame intended on anybody : in my case, I'm actually able to fall even when there is no trap at all. That's the reason for spotting such a weird one makes me anxious. Especially since having kfree() take a non-const argument comes at no runtime cost.) Cheers, Emmanuel --
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Eric Sandeen | Re: [RFC] Heads up on sys_fallocate() |
| Filippos Papadopoulos | Re: INITIO scsi driver fails to work properly |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | [PATCH take 2] pkt_sched: Protect gen estimators under est_lock. |
| Natalie Protasevich | [BUG] New Kernel Bugs |
