[PATCH v2] powerpc: kvm: powerpc: fix information leak to userland

2010-10-30 Thread Vasiliy Kulikov
ing the whole struct. It makes sense as these fields are explicitly marked as padding. No more fields need zeroing. Signed-off-by: Vasiliy Kulikov --- arch/powerpc/kvm/powerpc.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kv

[PATCH] powerpc: kvm: fix information leak to userland

2010-10-30 Thread Vasiliy Kulikov
Structure kvm_ppc_pvinfo is copied to userland with flags and pad fields unitialized. It leads to leaking of contents of kernel stack memory. Signed-off-by: Vasiliy Kulikov --- I cannot compile this driver, so it is not tested at all. arch/powerpc/kvm/powerpc.c |1 + 1 files changed, 1

[PATCH] powerpc: sysdev: fix signedness bug

2010-10-17 Thread Vasiliy Kulikov
sram_params.sram_size and sram_params.sram_offset were unsigned. If get_cache_sram_size() or get_cache_sram_offset() returns error code then it is not seen to the caller. Made sram_size and sram_offset signed. Signed-off-by: Vasiliy Kulikov --- arch/powerpc/sysdev/fsl_85xx_l2ctlr.c |4

Re: [PATCH] char: hvc: check for error case

2010-09-13 Thread Vasiliy Kulikov
On Mon, Sep 13, 2010 at 09:12 -0400, Chris Metcalf wrote: > Thanks, accepted into my tree (for the next merge window). In practice all > this means is in debug mode we'll get a warning from do_one_initcall() > rather than silence, but you're right, it's technically better. :-) Anyway it's better,

[PATCH] char: hvc: check for error case

2010-09-12 Thread Vasiliy Kulikov
hvc_alloc() may fail, if so exit from init() with error. Signed-off-by: Vasiliy Kulikov --- I cannot compile this driver at all, so it is not tested. drivers/char/hvc_tile.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/char/hvc_tile.c b/drivers/char

Re: [PATCH 1/7] drivers/macintosh/via-pmu-led.c: Add of_node_put to avoid memory leak

2010-08-31 Thread Vasiliy Kulikov
On Tue, Aug 31, 2010 at 18:08 +0200, Julia Lawall wrote: > On Tue, 31 Aug 2010, walter harms wrote: > > > > > > > Julia Lawall schrieb: > > > Add a call to of_node_put in the error handling code following a call to > > > of_find_node_by_path. [...] > > > --- a/drivers/macintosh/via-pmu-led.c > >

Re: [PATCH 2/7] usb: fsl_udc_core: check return value of create_proc_read_entry()

2010-07-31 Thread Vasiliy Kulikov
On Sat, Jul 31, 2010 at 21:17 +0200, Dan Carpenter wrote: > On Sat, Jul 31, 2010 at 09:38:20PM +0400, Kulikov Vasiliy wrote: > > create_proc_read_entry() may fail, if so return -ENOMEM. > > > > It can fail, but also we return NULL if procfs is disabled. I haven't > looked at it very carefully, w