android_kernel_xiaomi_sm8350/kernel
Oleg Nesterov 3716748530 [PATCH] taskstats: cleanup reply assembling
Thomas Graf wrote:
>
> nla_nest_start() may return NULL, either rely on prepare_reply() to be
> correct and BUG() on failure or do proper error handling for all
> functions.

nla_put() in taskstat.c can fail only if the 'size' argument of alloc_skb()
was not right. This is a kernel bug, we should not hide it. So add 'BUG()'
on error path and check for 'na == NULL'.

> genlmsg_cancel() is only required in error paths for dumping
> procedures.

So we can remove 'genlmsg_cancel()' calls and 'void *reply' (saves 227 bytes).

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Thomas Graf <tgraf@suug.ch>
Cc: Shailabh Nagar <nagar@watson.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Jay Lan <jlan@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:34 -08:00
..
irq Don't call "note_interrupt()" with irq descriptor lock held 2006-11-22 09:32:06 -08:00
power [PATCH] Export pm_suspend for the shared APM emulation 2006-12-07 08:39:32 -08:00
time [PATCH] time_adjust cleared before use 2006-10-28 11:30:55 -07:00
.gitignore
acct.c
audit.c [PATCH] Add include/linux/freezer.h and move definitions from sched.h 2006-12-07 08:39:27 -08:00
audit.h
auditfilter.c
auditsc.c [PATCH] severing skbuff.h -> highmem.h 2006-12-04 02:00:29 -05:00
capability.c
compat.c [PATCH] Create compat_sys_migrate_pages 2006-11-03 12:27:59 -08:00
configs.c
cpu.c [PATCH] suspend: don't change cpus_allowed for task initiating the suspend 2006-12-07 08:39:28 -08:00
cpuset.c [PATCH] cpuset: minor code refinements 2006-12-07 08:39:32 -08:00
delayacct.c [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
dma.c
exec_domain.c
exit.c [PATCH] taskstats: cleanup do_exit() path 2006-12-07 08:39:34 -08:00
extable.c
fork.c [PATCH] taskstats: cleanup ->signal->stats allocation 2006-12-07 08:39:34 -08:00
futex_compat.c
futex.c [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
hrtimer.c
itimer.c
kallsyms.c [PATCH] /proc/kallsyms reports lower-case types for some non-exported symbols 2006-12-07 08:39:31 -08:00
Kconfig.hz
Kconfig.preempt
kexec.c
kfifo.c
kmod.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-12-05 14:37:56 +00:00
kprobes.c
ksysfs.c
kthread.c WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
latency.c [PATCH] severing module.h->sched.h 2006-12-04 02:00:22 -05:00
lockdep_internals.h
lockdep_proc.c
lockdep.c [PATCH] lockdep: misc fixes in lockdep.c 2006-12-07 08:39:33 -08:00
Makefile
module.c [PATCH] severing module.h->sched.h 2006-12-04 02:00:22 -05:00
mutex-debug.c Lockdep: add lockdep_set_class_and_subclass() and lockdep_set_subclass() 2006-10-11 01:45:14 -04:00
mutex-debug.h
mutex.c
mutex.h
nsproxy.c [PATCH] kernel/nsproxy.c: use kmemdup() 2006-10-20 10:26:44 -07:00
panic.c
params.c
pid.c [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
posix-cpu-timers.c [PATCH] posix-cpu-timers: prevent signal delivery starvation 2006-10-17 08:18:43 -07:00
posix-timers.c [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
printk.c [PATCH] Add printk_timed_ratelimit() 2006-11-03 12:27:58 -08:00
profile.c [PATCH] profile: fix uaccess handling 2006-12-07 08:39:33 -08:00
ptrace.c
rcupdate.c
rcutorture.c
relay.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
resource.c
rtmutex_common.h
rtmutex-debug.c
rtmutex-debug.h
rtmutex-tester.c [PATCH] Add include/linux/freezer.h and move definitions from sched.h 2006-12-07 08:39:27 -08:00
rtmutex.c
rtmutex.h
rwsem.c
sched.c [PATCH] SysRq-X: show blocked tasks 2006-12-07 08:39:32 -08:00
seccomp.c
signal.c [PATCH] Add include/linux/freezer.h and move definitions from sched.h 2006-12-07 08:39:27 -08:00
softirq.c
softlockup.c
spinlock.c [PATCH] lockdep: spin_lock_irqsave_nested() 2006-11-25 13:28:34 -08:00
srcu.c
stacktrace.c
stop_machine.c
sys_ni.c [PATCH] Create compat_sys_migrate_pages 2006-11-03 12:27:59 -08:00
sys.c WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
sysctl.c [PATCH] new scheme to preempt swap token 2006-12-07 08:39:21 -08:00
taskstats.c [PATCH] taskstats: cleanup reply assembling 2006-12-07 08:39:34 -08:00
time.c
timer.c
tsacct.c [PATCH] xacct_add_tsk: fix pure theoretical ->mm use-after-free 2006-10-30 12:08:41 -08:00
uid16.c
unwind.c [PATCH] x86-64: work around gcc4 issue with -Os in Dwarf2 stack unwind 2006-11-28 20:12:59 +01:00
user.c [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
utsname.c
wait.c
workqueue.c [PATCH] Support for freezeable workqueues 2006-12-07 08:39:29 -08:00