[PATCH][Trivial] tcp: correct code comment stating 3 min timeout for FIN_WAIT2, we only do 1 min

2014-02-09 Thread Jesper Juhl
application and checked the kernel source for details). Signed-off-by: Jesper Juhl --- net/ipv4/tcp.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 4475b3b..9f3a2db 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2229,7 +2229,7

[PATCH] [IA64] aliasing-test: fix mem leaks

2013-09-30 Thread Jesper Juhl
Fix a few trivial mem leaks when returning from scan_tree/scan_rom. Signed-off-by: Jesper Juhl --- Documentation/ia64/aliasing-test.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/Documentation/ia64/aliasing-test.c b/Documentation/ia64/aliasing-test.c index 62a190d

[PATCH] staging: lustre: Don't leak 'buffer' in cfs_get_environ()

2013-09-30 Thread Jesper Juhl
If 'down_read_trylock' fails we'll curently leak the memory allocated to 'buffer'. Fix the leak by simply kfree'ing 'buffer' before returning '-EDEADLK'. Signed-off-by: Jesper Juhl --- .../lustre/lustre/libcfs/linux/linux-curproc.c |4 +

[PATCH] staging: vt6655: don't leak when returning -EOPNOTSUPP in vt6655_hostap_ioctl

2013-09-30 Thread Jesper Juhl
Make sure we always free(param); and remove a redundant "goto out;" just before we'll hit the label anyway. Signed-off-by: Jesper Juhl --- drivers/staging/vt6655/hostap.c | 25 ++--- 1 files changed, 10 insertions(+), 15 deletions(-) diff --git a/drivers

[PATCH] [SCSI] mpt3sas: don't leak 'fw_event' in mpt3sas_send_trigger_data_event()

2013-09-30 Thread Jesper Juhl
If we successfully allocate 'fw_event' but subsequently fail to allocate 'fw_event->event_data' then we'll return from the function without properly freeing 'fw_event'. This patch takes care of that leak. Signed-off-by: Jesper Juhl --- drivers/scsi/mpt3sa

[PATCH] isdn: eicon: free pointer after using it in log msg in divas_um_idi_delete_entity()

2013-09-30 Thread Jesper Juhl
Not really a problem, but nice IMHO; the Coverity static analyzer complains that we use the pointer 'e' after it has been freed, so move the freeing below the final use, even if that use is just using the value of the pointer and not actually dereferencing it. Signed-off-by: J

Re: Unchecked Null pointers

2013-02-04 Thread Jesper Juhl
ting to *fix* the problems you find. That would be more likely to get peoples attention - and would also potentially result in some nice fixes being merged. -- Jesper Juhlhttp://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon/html/T/top-post.html Plain text mails o

[PATCH][trivial] pcmcia: avoid static analysis complaint about use-after-free

2013-01-20 Thread Jesper Juhl
Coverity complains about a use after free for 'res1' and 'res2' since we use the value of the pointers in a 'dev_dbg()' after they have been freed. That's not really a problem, but it still seems cleaner to defer freeing until we are completely done with the po

[PATCH] IB: cxgb3: delay freeing mem untill entirely done with it

2013-01-14 Thread Jesper Juhl
mless, but nice IMHO. Signed-off-by: Jesper Juhl --- drivers/infiniband/hw/cxgb3/iwch_provider.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index 0bdf09a..145d82a 100644

[PATCH] relay: use sizeof(size_t), not sizeof(size_t *) in relay_create_buf()

2012-12-30 Thread Jesper Juhl
s use the value we actually mean. Signed-off-by: Jesper Juhl --- kernel/relay.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/relay.c b/kernel/relay.c index e8cd202..806931b 100644 --- a/kernel/relay.c +++ b/kernel/relay.c @@ -166,13 +166,13 @@ stati

[PATCH] [SCSI] mpt3sas: remove pointless version.h include from mpt3sas_trigger_diag.c

2012-12-29 Thread Jesper Juhl
The file uses nothing from the header, so remove it. Signed-off-by: Jesper Juhl --- drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c b/drivers/scsi/mpt3sas/mpt3sas_trigger_diag.c

Re: [PATCH] scripts/tags.sh: Fix regex syntax for etags

2012-12-28 Thread Jesper Juhl
> + --regex='/CLEARPAGEFLAG_NOOP(\([^,)]*\).*/ClearPage\1/' \ > + --regex='/__CLEARPAGEFLAG_NOOP(\([^,)]*\).*/__ClearPage\1/' \ > + --regex='/TESTCLEARFLAG_FALSE(\([^,)]*\).*/TestClearPage\1/' \ > + --regex='/__TESTCLEARFLAG_FALSE(\([^,

Re: how to look for source code in kernel

2012-12-28 Thread Jesper Juhl
out tons of > > etags: Unmatched ( or \( while compiling pattern > > oh well, looks like noone is using it / noone cares enough... > I use it. I haven't bothered (yet) to look into the cause of the message it spews since the etags ('TAGS') file it produces still se

Re: [tip:x86/build] x86: Default to ARCH= x86 to avoid overriding CONFIG_64BIT

2012-12-26 Thread Jesper Juhl
my view, randconfig was never about building bootable kernels, but all about building possible kernel config combinations - that may or may not boot on any given system. The point was only to test that some combination of options did in fact build (if it also boots then all the better, but that was never part of the goal; as I saw it). I may be wrong, but that was/is my expectations for 'randconfig'. -- Jesper Juhlhttp://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon/html/T/top-post.html Plain text mails only, please.

[PATCH] netfilter: Don't leak 'exp' in ctnetlink_create_expect()

2012-12-26 Thread Jesper Juhl
'if ((!help) && (!cda[CTA_EXPECT_TIMEOUT]))' then we should remember to free 'exp' that was allocated by 'nf_ct_expect_alloc()' by jumping to the 'err_out' label rather than the 'out' label in ctnetlink_create_expect(). This patch should

[PATCH] rtlwifi: Don't leak on error in _rtl_usb_receive()

2012-12-26 Thread Jesper Juhl
We fail to release 'urb' if '_rtl_prep_rx_urb()' fails in _rtl_usb_receive(). This patch should take care of the leak. Signed-off-by: Jesper Juhl --- drivers/net/wireless/rtlwifi/usb.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) note: compile tested only.

[PATCH] [SCSI] csiostor: Don't leak mem or fail to release firmware in csio_hw_flash_config()

2012-12-26 Thread Jesper Juhl
If kzalloc() or csio_hw_check_fwconfig() fail we may leave the csio_hw_flash_config() function without freeing allocated memory or firmware. This should take care of the leaks. Signed-off-by: Jesper Juhl --- drivers/scsi/csiostor/csio_hw.c | 15 +-- 1 files changed, 9 insertions

Re: [PATCH] kvm tools: remove unneeded checks in qcow code

2012-12-21 Thread Jesper Juhl
On Thu, 20 Dec 2012, Sasha Levin wrote: > We already know q!=NULL at that point, no need to retest. > Right, and even if it was ==NULL then 'free(NULL)' is guaranteed to be a NOP, so it would still be fine. Reviewed-by: Jesper Juhl > Signed-off-by: Sasha Levin >

Re: [PATCH/TRIVIAL] blackfin: time-ts: Remove duplicate assignment

2012-12-18 Thread Jesper Juhl
> evt->rating = 350; > evt->irq = -1; > Looks good to me. Feel free to add Reviewed-by: Jesper Juhl if you like. -- Jesper Juhlhttp://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon/html/T/top-post.html Plain text mails only, please. -- To

[PATCH][resend] MMC, vub300: Resolve mem leak in vub300_probe() and simplify the code a bit

2012-12-18 Thread Jesper Juhl
_alloc_urb() calls fail(). Also rename the 'error[0145]:' labels to be just 'error0' and 'error1'. Signed-off-by: Jesper Juhl --- drivers/mmc/host/vub300.c | 29 +++-- 1 files changed, 11 insertions(+), 18 deletions(-) This is a resend

[PATCH] bq2415x_charger: Remove unneeded version.h include

2012-12-18 Thread Jesper Juhl
The file uses nothing from the header, so including it is pointless. Signed-off-by: Jesper Juhl --- drivers/power/bq2415x_charger.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/power/bq2415x_charger.c b/drivers/power/bq2415x_charger.c index ee842b3..2d1b568

[PATCH] net: mvneta: remove unneeded version.h include

2012-12-18 Thread Jesper Juhl
The file uses nothing from the version.h header, so there is no reason to include it. Signed-off-by: Jesper Juhl --- drivers/net/ethernet/marvell/mvneta.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet

Re: [PATCH] atkbd: Fix multi-char scancode handling on reconnect.

2012-12-18 Thread Jesper Juhl
* >* Restore LED state and repeat rate. While input core > * will do this for us at resume time reconnect may happen > @@ -1224,6 +1243,9 @@ static int atkbd_reconnect(struct serio *serio) > } > > atkbd_enable(atkbd); > + if (atkbd->write) >

Re: [PATCH] Remove unnecessary declarations from Documentation/accounting/getdelays.c

2012-11-25 Thread Jesper Juhl
nt_io_accounting; > int print_task_context_switch_counts; > -__u64 stime, utime; > > #define PRINTF(fmt, arg...) {\ > if (dbg) { \ > Seems fine to me... -- Jesper Juhlhttp://www.chaosbits.net/ Don'

[PATCH 2/2] [media] rc: Fix double free in gpio_ir_recv_remove()

2012-10-28 Thread Jesper Juhl
Since rc_unregister_device() frees its argument there's no need to subsequently call rc_free_device() on the same variable - in fact it's a double free bug. Easily fixed by just removing the rc_free_device() call. Signed-off-by: Jesper Juhl --- drivers/media/rc/gpio-ir-recv.c |1

[PATCH 1/2] [media] rc: Fix double free in gpio_ir_recv_probe()

2012-10-28 Thread Jesper Juhl
e call to rc_free_device() to after rc_unregister_device(). That fixes the problem since rc_free_device() just does nothing if passed NULL and there's no further use of 'rcdev' after the call to rc_free_device() so it's not needed there. Signed-off-by: Jesper Juhl --- driver

Re: [PATCH] ACPICA: Don't leak next_walk_state in acpi_ds_call_control_method()

2012-10-28 Thread Jesper Juhl
On Thu, 25 Oct 2012, Rafael J. Wysocki wrote: > On Sunday 21 of October 2012 22:35:46 Jesper Juhl wrote: > > If acpi_ds_create_walk_state() succeeds, but the call to > > ACPI_ALLOCATE_ZEROED() fails, then we'll return from the function > > without properl

Re: [PATCH] staging: csr: remove a number of unneeded includes of version.h

2012-10-23 Thread Jesper Juhl
On Mon, 22 Oct 2012, Greg Kroah-Hartman wrote: > On Thu, Oct 18, 2012 at 09:51:56PM +0200, Jesper Juhl wrote: > > > > Signed-off-by: Jesper Juhl > > Someone already beat you to this patch, sorry. > Heh. That happens - no problem - as long as it gets fixed :) --

[PATCH] ACPICA: Don't leak next_walk_state in acpi_ds_call_control_method()

2012-10-21 Thread Jesper Juhl
If acpi_ds_create_walk_state() succeeds, but the call to ACPI_ALLOCATE_ZEROED() fails, then we'll return from the function without properly freeing 'next_walk_state'. Signed-off-by: Jesper Juhl --- drivers/acpi/acpica/dsmethod.c |3 ++- 1 files changed, 2 insertions(+), 1 del

Re: [PATCH v2] Documentation DMA-API-HOWTO.txt Add dma mapping error check usage examples

2012-10-18 Thread Jesper Juhl
map all mapped buffers when > + mapping error is detected in the middle) > + "... if buffers are allocated in a loop..." -- Jesper Juhlhttp://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon/html/T/top-post.html Plain text mails only, please. -- To unsubscribe

[PATCH] staging: csr: remove a number of unneeded includes of version.h

2012-10-18 Thread Jesper Juhl
Signed-off-by: Jesper Juhl --- drivers/staging/csr/csr_framework_ext.c|1 - drivers/staging/csr/csr_time.c |1 - drivers/staging/csr/io.c |1 - drivers/staging/csr/monitor.c |1 - drivers/staging/csr/netdev.c |1

[PATCH] Staging: silicom: Fix up version.h includes

2012-10-18 Thread Jesper Juhl
drivers/staging/silicom/bypasslib/bplibk.h actually uses stuff from version.h so it should include the header. drivers/staging/silicom/bp_proc.c and drivers/staging/silicom/bypasslib/bypass.c currently include the header but use nothing from it so they don't need to. Signed-off-by: Jesper

[PATCH] staging: remove version.h include from dgrp/dgrp_sysfs.c

2012-10-18 Thread Jesper Juhl
The file uses nothing from linux/version.h, so the include is pointless - remove it. Signed-off-by: Jesper Juhl --- drivers/staging/dgrp/dgrp_sysfs.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/staging/dgrp/dgrp_sysfs.c b/drivers/staging/dgrp/dgrp_sysfs.c

[PATCH] [media] s5p-tv: don't include linux/version.h in mixer_video.c

2012-10-18 Thread Jesper Juhl
The header is not needed, so remove it. Signed-off-by: Jesper Juhl --- drivers/media/platform/s5p-tv/mixer_video.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c index 0c1cd89

Re: [PATCH] [media] stk1160: Check return value of stk1160_read_reg() in stk1160_i2c_read_reg()

2012-10-16 Thread Jesper Juhl
On Mon, 15 Oct 2012, Ezequiel Garcia wrote: > On Mon, Oct 15, 2012 at 9:03 PM, Jesper Juhl wrote: > > On Mon, 15 Oct 2012, Ezequiel Garcia wrote: > > > >> On Mon, Oct 15, 2012 at 7:52 PM, Jesper Juhl wrote: > >> > On Mon, 15 Oct 2012, Jesper Juhl wrote

Re: [PATCH] [media] stk1160: Check return value of stk1160_read_reg() in stk1160_i2c_read_reg()

2012-10-15 Thread Jesper Juhl
On Mon, 15 Oct 2012, Ezequiel Garcia wrote: > On Mon, Oct 15, 2012 at 7:52 PM, Jesper Juhl wrote: > > On Mon, 15 Oct 2012, Jesper Juhl wrote: > > > >> On Sat, 13 Oct 2012, Ezequiel Garcia wrote: > >> [...] > > Currently there are two checks for 'rc

[PATCH] [media] stk1160: Check return value of stk1160_read_reg() in stk1160_i2c_read_reg()

2012-10-15 Thread Jesper Juhl
On Mon, 15 Oct 2012, Jesper Juhl wrote: > On Sat, 13 Oct 2012, Ezequiel Garcia wrote: > > > On Sun, Nov 9, 2008 at 2:04 PM, Jesper Juhl wrote: > > > There are two checks for 'rc' being less than zero with no change to > > > 'rc' between th

[PATCH] [resend] ACPI: Fix memory leak in acpi_bind_one() (fwd)

2012-10-15 Thread Jesper Juhl
Ok, so I had a little problem with my mail servers clock that caused the mail below to be timestamped a few years in the past, so I assume noone saw it - thus, resending. -- Jesper Juhlhttp://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon/html/T/top-post.html Plain

Re: [PATCH] [media] stk1160: Remove dead code from stk1160_i2c_read_reg()

2012-10-15 Thread Jesper Juhl
On Sat, 13 Oct 2012, Ezequiel Garcia wrote: > On Sun, Nov 9, 2008 at 2:04 PM, Jesper Juhl wrote: > > There are two checks for 'rc' being less than zero with no change to > > 'rc' between the two, so the second is just dead code - remove it.

[PATCH] [media] stk1160: Remove dead code from stk1160_i2c_read_reg()

2012-10-12 Thread Jesper Juhl
There are two checks for 'rc' being less than zero with no change to 'rc' between the two, so the second is just dead code - remove it. Signed-off-by: Jesper Juhl --- drivers/media/usb/stk1160/stk1160-i2c.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff -

[PATCH] ACPI: Fix memory leak in acpi_bind_one()

2012-10-12 Thread Jesper Juhl
#x27; label and there leave the function and let 'physical_node' go out of scope and leak the memory we allocated. This patch fixes the leak by simply freeing the unused/unneeded memory pointed to by 'physical_node' just before we jump to 'err:'. Signed-off-by: Jespe

Re: [PATCH 0/4] scripts/checkpatch.pl: A small step for Linux...

2012-08-31 Thread Jesper Juhl
ce 'quiet' mode > > scripts/checkincludes.pl | 113 > ++ > 1 file changed, 65 insertions(+), 48 deletions(-) > > Minor detail. Your patches are for "scripts/checkincludes.pl" but the subject says "scripts/chec

[PATCH][trivial] gen_init_cpio: remove redundant empty line

2012-08-29 Thread Jesper Juhl
Just a completely trivial patch to remove a completely redundant blank line from usr/gen_init_cpio.c Signed-off-by: Jesper Juhl --- usr/gen_init_cpio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/usr/gen_init_cpio.c b/usr/gen_init_cpio.c index af0f22f..b2e46bc 100644 --- a/usr

Re: [PATCH] unifdef: set a secure umask before calling mkstemp()

2012-08-19 Thread Jesper Juhl
On Sat, 18 Aug 2012, Tony Finch wrote: > Jesper Juhl wrote: > > > In newer glibc's (versions > 2.06) reasonably secure permissions of > > 0600 are used when creating a temporary file with mkstemp(). But for > > older glibc's (versions <= 2.06) 0666 is u

[PATCH] caif: Do not dereference NULL in chnl_recv_cb()

2012-08-17 Thread Jesper Juhl
shing.. Signed-off-by: Jesper Juhl --- net/caif/chnl_net.c | 4 1 file changed, 4 insertions(+) Note: compile tested only. diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c index 69771c0..e597733 100644 --- a/net/caif/chnl_net.c +++ b/net/caif/chnl_net.c @@ -94,6 +94,10 @@ stati

[PATCH] unifdef: set a secure umask before calling mkstemp()

2012-08-17 Thread Jesper Juhl
rmissions, add a call to umask() that ensures we always set at most 0600 on the temporary file (and then restore the umask again so we don't interfere with anything that hapens further on). Signed-off-by: Jesper Juhl --- scripts/unifdef.c | 5 +++-- 1 file changed, 3 insertions(+), 2 delet

[PATCH] tpm: Do not dereference NULL pointer if acpi_os_map_memory() fails.

2012-08-15 Thread Jesper Juhl
. Unfortunately we just get NULL back, so we can't really tell the user exactely what went wrong, but we can at least avoid crashing and return an error (-EIO seemed more generic and more suitable here than -ENOMEM or something else, so I picked that). Signed-off-by: Jesper Juhl --- drivers

Re: [PATCH] tpm: Do not dereference NULL pointer if acpi_os_map_memory() fails.

2012-08-15 Thread Jesper Juhl
over into tpm_acpi.c. If you > can resubmit on top of my staging tree, I will apply it there. > No problem. I'll have that patch for you in a moment when I'm done fetching your tree. > git://github.com/shpedoikal/linux.git v3.6-rc1-tpmdd-staging > > > > S

[PATCH] staging: csr: Fix up version.h includes

2012-08-10 Thread Jesper Juhl
Include version.h where actually needed, remove where unneeded. Signed-off-by: Jesper Juhl --- drivers/staging/csr/csr_panic.c| 1 - drivers/staging/csr/drv.c | 3 +-- drivers/staging/csr/io.c | 2 +- drivers/staging/csr/monitor.c | 3

Re: [PATCH][trivial] ASoC: isabelle: Remove unneeded include of version.h

2012-08-10 Thread Jesper Juhl
On Fri, 10 Aug 2012, Mark Brown wrote: > On Fri, Aug 10, 2012 at 08:12:57PM +0200, Jesper Juhl wrote: > > There is no need to include version.h in sound/soc/codecs/isabelle.c - > > this patch removes the pointless include. > > Not sure what this patch is against, there app

[PATCH][trivial] ASoC: isabelle: Remove unneeded include of version.h

2012-08-10 Thread Jesper Juhl
There is no need to include version.h in sound/soc/codecs/isabelle.c - this patch removes the pointless include. Signed-off-by: Jesper Juhl --- sound/soc/codecs/isabelle.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/isabelle.c b/sound/soc/codecs/isabelle.c index 5d8f39e

Re: Upgraded from 3.4 to 3.5.1 kernel: machine does not boot

2012-08-10 Thread Jesper Juhl
the cause of your troubles, you could try bisecting between your last working kernel and 3.5.1 to try and narrow it down to one (or a few) commits that are causing your trouble. -- Jesper Juhlhttp://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon/html/T/top-post.html Pl

Re: PROBLEM: snd_hda_intel bug during boot

2012-08-08 Thread Jesper Juhl
On Wed, 8 Aug 2012, Jesper Juhl wrote: > On Wed, 8 Aug 2012, Alexei Kornienko wrote: > > > Seems like I have a bug in audio driver on my laptop. Cause of this I > > don't have any sound card detected. > > Please find more details below: > > > > ** Versio

Re: PROBLEM: snd_hda_intel bug during boot

2012-08-08 Thread Jesper Juhl
) kernel. So, perhaps you could test the 3.5 kernel and tell us if you still see the problem with that one or not? If you are feeling adventurous you could also try a snapshot of the latest Linus (to become 3.6) kernel and tell us your experiences with that...? -- Jesper Juhlhttp://w

Re: [PATCH] staging:ccg: Fix missing brackets for sizeof (found by sparse).

2012-08-08 Thread Jesper Juhl
gt; struct fsg_common *common; > int err; > > - memset(&fsg, 0, sizeof fsg); > + memset(&fsg, 0, sizeof(fsg)); > fsg.nluns = 1; > fsg.luns[0].removable = 1; > fsg.vendor_name = iManufacturer; > Looks good to me. Reviewed-by: Jesper Juhl

Re: [PATCH] Input: omap4-keypad - don't leak in omap4_keypad_probe()

2012-08-08 Thread Jesper Juhl
On Wed, 8 Aug 2012, Dmitry Torokhov wrote: > On Wednesday, August 08, 2012 09:36:51 PM Jesper Juhl wrote: > > On Wed, 8 Aug 2012, Sachin Kamat wrote: > > > On 7 August 2012 23:46, Jesper Juhl wrote: > > > > If omap4_keypad_parse_dt() does not return 0 (zero) in &

Re: [PATCH] Input: omap4-keypad - don't leak in omap4_keypad_probe()

2012-08-08 Thread Jesper Juhl
On Wed, 8 Aug 2012, Sachin Kamat wrote: > On 7 August 2012 23:46, Jesper Juhl wrote: > > If omap4_keypad_parse_dt() does not return 0 (zero) in > > omap4_keypad_probe() we will leak the memory we allocated for > > 'keypad_data' with kzalloc() when we return and the

[PATCH] Documentation/accounting/getdelays.c: remember to close() socket on error in create_nl_socket()

2012-08-08 Thread Jesper Juhl
o the proper cleanup there. While I was there I noticed that the error message that is printet if setsockopt() fails was broken over two lines - put that on a single line so it is easier to grep for. Signed-off-by: Jesper Juhl --- Documentation/accounting/getdelays.c | 5 ++--- 1 file changed

[PATCH] [IA64] aliasing-test: close fd on write error

2012-08-07 Thread Jesper Juhl
If write fails, remember to close(fd) before returning. Signed-off-by: Jesper Juhl --- Documentation/ia64/aliasing-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/ia64/aliasing-test.c b/Documentation/ia64/aliasing-test.c index 5caa2af..62a190d 100644 --- a

[PATCH] cdc-phonet: Don't leak in usbpn_open

2012-08-07 Thread Jesper Juhl
x_submit()' call being false, then we'll leak the memory we allocated. Deal with the leak by always calling 'usb_free_urb(req)' when entering the branch. If 'req' happens to be 0 then the call is harmless, if it is not 0 then we free the memory we allocated but don'

[PATCH] tpm: Do not dereference NULL pointer if acpi_os_map_memory() fails.

2012-08-07 Thread Jesper Juhl
. Unfortunately we just get NULL back, so we can't really tell the user exactely what went wrong, but we can at least avoid crashing and return an error (-EIO seemed more generic and more suitable here than -ENOMEM or something else, so I picked that). Signed-off-by: Jesper Juhl --- drivers

[PATCH][Trivial] drivers/acpi/osl.c: delete trailing whitespace

2012-08-07 Thread Jesper Juhl
Signed-off-by: Jesper Juhl --- drivers/acpi/osl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 9eaf708..b9eb753 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -1061,7 +1061,7 @@ acpi_status acpi_os_wait_semaphore

[PATCH] staging: speakup: i18n.c: Fix leak in msg_set()

2012-08-07 Thread Jesper Juhl
If we end up returning -EINVAL from the function we will leak the memory allocated to 'newstr' which has been allocated but not yet assigned to anything. Fix the leak by properly freeing the memory again before we return. Signed-off-by: Jesper Juhl --- drivers/staging/speakup/i18n.

Re: [PATCH] batman-adv: Fix mem leak in the batadv_tt_local_event() function

2012-08-07 Thread Jesper Juhl
On Tue, 7 Aug 2012, Jesper Juhl wrote: > Memory is allocated for 'tt_change_node' with kmalloc(). > 'tt_change_node' may go out of scope really being used for anything This should of course read "... go out of scope without really being used ..." . > (ex

[PATCH] batman-adv: Fix mem leak in the batadv_tt_local_event() function

2012-08-07 Thread Jesper Juhl
Memory is allocated for 'tt_change_node' with kmalloc(). 'tt_change_node' may go out of scope really being used for anything (except have a few members initialized) if we hit the 'del:' label. This patch makes sure we free the memory in that case. Signed-off-by: Je

[PATCH] Input: omap4-keypad - don't leak in omap4_keypad_probe()

2012-08-07 Thread Jesper Juhl
the allocated memory, instead of returning directly. Signed-off-by: Jesper Juhl --- drivers/input/keyboard/omap4-keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Compile tested only. diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c in

[PATCH] taskstats: cgroupstats_user_cmd() may leak on error

2012-08-07 Thread Jesper Juhl
If prepare_reply() succeeds we have allocated memory for 'rep_skb'. If nla_reserve() then subsequently fails and returns NULL we fail to release the memory we allocated, thus causing a leak. Signed-off-by: Jesper Juhl --- kernel/taskstats.c | 1 + 1 file changed, 1 insertion(+) Comp

Re: [PATCH] drm/i915: Fix mem leak in intel_sdvo_write_cmd()

2012-08-05 Thread Jesper Juhl
On Sun, 5 Aug 2012, Daniel Vetter wrote: > On Tue, Jul 31, 2012 at 10:31:15PM +0200, Jesper Juhl wrote: > > If the allocation of 'buf' succeeds but the allocation of 'msgs' fails > > we'll return false and leak 'buf' when it goes out of sco

[PATCH] bnx2x: fix mem leak when command is unknown

2012-07-31 Thread Jesper Juhl
In bnx2x_mcast_enqueue_cmd() we'll leak the memory allocated to 'new_cmd' if we hit the deafault case of the 'switch (cmd)'. Add a 'kfree(new_cmd)' to that case to avoid the leak. Signed-off-by: Jesper Juhl --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c

Re: [PATCH] igb: correct hardware type (i210/i211) check in igb_loopback_test()

2012-07-31 Thread Jesper Juhl
On Tue, 31 Jul 2012, Jeff Kirsher wrote: > On Tue, 2012-07-31 at 22:23 +0200, Jesper Juhl wrote: > > On Wed, 25 Jul 2012, Wyborny, Carolyn wrote: > > > > > > > > > -Original Message- > > > > From: Jesper Juhl [mailto:j...@chaosbits.net]

[PATCH] drm/i915: Fix mem leak in intel_sdvo_write_cmd()

2012-07-31 Thread Jesper Juhl
If the allocation of 'buf' succeeds but the allocation of 'msgs' fails we'll return false and leak 'buf' when it goes out of scope. Signed-off-by: Jesper Juhl --- drivers/gpu/drm/i915/intel_sdvo.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions

RE: [PATCH] igb: correct hardware type (i210/i211) check in igb_loopback_test()

2012-07-31 Thread Jesper Juhl
On Wed, 25 Jul 2012, Wyborny, Carolyn wrote: > > > -Original Message- > > From: Jesper Juhl [mailto:j...@chaosbits.net] > > Sent: Wednesday, July 25, 2012 12:06 PM > > To: linux-kernel@vger.kernel.org > > Cc: net...@vger.kernel.org; e1000-de.

[PATCH 5/5] staging: vt6656: remove commented out stuff from hostap.c

2012-07-26 Thread Jesper Juhl
Git has the code if we ever need it, so instead of having chunks of commented out code clutter up the file get rid of it. Signed-off-by: Jesper Juhl --- drivers/staging/vt6656/hostap.c | 45 + 1 file changed, 1 insertion(+), 44 deletions(-) diff --git

[PATCH 4/5] staging: vt6656: minor trivial whitespace cleanups

2012-07-26 Thread Jesper Juhl
Convert a few tabs to spaces, remove some pointless whitespace, add some missing whitespace (in drivers/staging/vt6656/hostap.c). All quite small and trivial. Signed-off-by: Jesper Juhl --- drivers/staging/vt6656/hostap.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff

[PATCH 3/5] staging: vt6656: Fix indentation in hostap.c

2012-07-26 Thread Jesper Juhl
We use tabs for indentation, not spaces. Signed-off-by: Jesper Juhl --- drivers/staging/vt6656/hostap.c | 644 +++- 1 file changed, 301 insertions(+), 343 deletions(-) diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c index

[PATCH 2/5] staging: vt6656: Remove some redundant blank lines from hostap.c

2012-07-26 Thread Jesper Juhl
This trivial patch simply removes some completely redundant blank lines from drivers/staging/vt6656/hostap.c Signed-off-by: Jesper Juhl --- drivers/staging/vt6656/hostap.c | 40 1 file changed, 40 deletions(-) diff --git a/drivers/staging/vt6656

[PATCH 1/5] staging: vt6656: don't leak 'param' in vt6656_hostap_ioctl() when returning -EOPNOTSUPP

2012-07-26 Thread Jesper Juhl
Don't return -EOPNOTSUPP directly in switch case's since it'll leak the memory allocated to 'param' when that variable goes out of scope without having been assigned to anything. Signed-off-by: Jesper Juhl --- drivers/staging/vt6656/hostap.c | 12 ++-- 1 file ch

[PATCH 0/5] staging: vt6656: small bug fixes and cleanups for hostapd.c

2012-07-26 Thread Jesper Juhl
Hi Greg Here's a small series of patches that fixes some memory leaks and cleans up the code a bit for vt6656 hostapd.c - done on top of Linus' tree as of today. -- Jesper Juhlhttp://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon/html/T/top-post.html P

[PATCH] igb: don't break user visible strings over multiple lines in igb_ethtool.c

2012-07-25 Thread Jesper Juhl
Even when they go beyond 80 characters, user visible strings should be on one line to make them easy to grep for. Signed-off-by: Jesper Juhl --- drivers/net/ethernet/intel/igb/igb_ethtool.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) This patch was

[PATCH] igb: correct hardware type (i210/i211) check in igb_loopback_test()

2012-07-25 Thread Jesper Juhl
ave no hardware to actually test this on, so it is compile tested only. Signed-off-by: Jesper Juhl --- drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb

Re: st_size of a symlink

2012-07-23 Thread Jesper Juhl
On Mon, 23 Jul 2012, Al Viro wrote: > On Mon, Jul 23, 2012 at 08:09:14PM +0200, Jesper Juhl wrote: > > So, from my point of view it looks like procfs is the one who has got it > > wrong. > > We should probably fix that (IMVHO). > > Fix it _how_? By returning the

Re: st_size of a symlink

2012-07-23 Thread Jesper Juhl
/dev/stderr lrwxrwxrwx 1 root root 15 Jul 23 19:46 /dev/stderr -> /proc/self/fd/2 Also looks OK... So, from my point of view it looks like procfs is the one who has got it wrong. We should probably fix that (IMVHO). -- Jesper Juhlhttp://www.chaosbits.net/ Don't top-post htt

Re: [PATCH 1/2] Staging: slicoss: Clean up tabs vs spaces in slic.h

2012-07-23 Thread Jesper Juhl
On Mon, 23 Jul 2012, Dan Carpenter wrote: > On Sun, Jul 22, 2012 at 10:57:09PM +0200, Jesper Juhl wrote: > > Make it match CodingStyle a bit better, tab/space wise. > > > > Signed-off-by: Jesper Juhl > > --- > > dri

[PATCH] net: Fix references to out-of-scope variables in put_cmsg_compat()

2012-07-22 Thread Jesper Juhl
27;data' further down in 'copy_to_user(CMSG_COMPAT_DATA(cm), data, cmlen - sizeof(struct compat_cmsghdr))' there's no telling what it may be refering to - not good. Fix the problem by simply giving 'ctv' and 'cts' function scope. Signed-off-by: Jesper Juhl

Re: [PATCH] NFS4: Fix NULL deref in nfsd4_lock() by makeing unhash_lockowner() safe to call with NULL arg

2012-07-22 Thread Jesper Juhl
On Mon, 30 Jan 2012, J. Bruce Fields wrote: > On Sun, Jan 29, 2012 at 10:29:24PM +0100, Jesper Juhl wrote: > > The Coverity checker noticed a path through nfsd4_lock() where we call > > release_lockowner(lock_sop); (at the 'out:' label) where 'lock_sop' i

[PATCH 2/2] Staging: slicoss: Clean up spaces vs tabs in slicoss.c

2012-07-22 Thread Jesper Juhl
Make it match CodingStyle a bit better, space/tab wise. Signed-off-by: Jesper Juhl --- drivers/staging/slicoss/slicoss.c | 809 +++--- 1 file changed, 397 insertions(+), 412 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss

[PATCH 1/2] Staging: slicoss: Clean up tabs vs spaces in slic.h

2012-07-22 Thread Jesper Juhl
Make it match CodingStyle a bit better, tab/space wise. Signed-off-by: Jesper Juhl --- drivers/staging/slicoss/slic.h | 751 - 1 file changed, 374 insertions(+), 377 deletions(-) diff --git a/drivers/staging/slicoss/slic.h b/drivers/staging/slicoss

[PATCH][Trivial][resend] Documentation: Add newline at end-of-file to files lacking one

2012-07-20 Thread Jesper Juhl
f output rather than on a new line. B) Some tools that process files line-by-line may get confused by the lack of a newline on the last line. C) The "\ No newline at end of file" line in diffs annoys me for some reason. So, let's just add the missing newline once and for al

Re: [PATCH][RFC] XFS: Fix mem leak and possible NULL deref in xfs_setattr_nonsize()

2012-07-20 Thread Jesper Juhl
Ping ? This issue seems to still be present. Any chance we could merge the patch below? /Jesper On Mon, 6 Feb 2012, Jesper Juhl wrote: > On Mon, 6 Feb 2012, Dave Chinner wrote: > > > On Sun, Feb 05, 2012 at 10:23:44PM +0100, Jesper Juhl wrote: > > > In xfs_setattr_nonsi

[PATCH] [IA64] aliasing-test: Remember to close fd on error in read_rom()

2012-07-20 Thread Jesper Juhl
Signed-off-by: Jesper Juhl --- Documentation/ia64/aliasing-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/ia64/aliasing-test.c b/Documentation/ia64/aliasing-test.c index 5caa2af..62a190d 100644 --- a/Documentation/ia64/aliasing-test.c +++ b/Documentation/ia64/aliasing

[PATCH] drm, cirrus_fbdev: Fix leak in cirrusfb_create()

2012-07-20 Thread Jesper Juhl
fails then we'll leak the memory allocated for 'sysram' with vmalloc(). Signed-off-by: Jesper Juhl --- drivers/gpu/drm/cirrus/cirrus_fbdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/cirrus/cirrus_fbdev.c b/drivers/gpu/drm/cirrus/cirru

[PATCH] drm, ast_fb: Fix a small leak in astfb_create()

2012-07-20 Thread Jesper Juhl
am' if the framebuffer_alloc() call fails and the variable goes out of scope. Signed-off-by: Jesper Juhl --- drivers/gpu/drm/ast/ast_fb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c index 2fc8e9e..260a760 100644 --- a/driv

Re: Small bug: Wrong return check from idr_pre_get in loop.c

2012-07-14 Thread Jesper Juhl
=88%) Andrew Morton (commit_signer:6/17=35%) Kay Sievers (commit_signer:5/17=29%) Jeff Moyer (commit_signer:2/17=12%) Dmitry Monakhov (commit_signer:2/17=12%) linux-kernel@vger.kernel.org (open list) Please try again. -- Jesper Juhlhttp://www.chaosbits.net/ Don&#

Re: [RFC] Simplifying kernel configuration for distro issues

2012-07-13 Thread Jesper Juhl
a few (hard) choices about some things that would always be there that everyone could count on. If people want to deviate from the default minimum, sure, let them, but put it under *custom*, *embedded*, *specialized distro*, *you know what you are doing* menu options. Configurabillity is good, but

Re: [PATCH] Trivial: Fix typo in include/linux/clk.h .

2012-07-09 Thread Jesper Juhl
k corresponding to the clock producer, or > * valid IS_ERR() condition containing errno. The implementation > Looks correct to me :-) Acked-by: Jesper Juhl -- Jesper Juhlhttp://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon/html/T/top-post.html Plain text mails only, please.

Re: [PATCH 1/3] staging: vt6656: iwctl: fix up spacing around operators

2012-07-08 Thread Jesper Juhl
On Sun, 8 Jul 2012, Joe Perches wrote: > On Mon, 2012-07-09 at 00:58 +0200, Jesper Juhl wrote: > > A few cases were missed in my previous cleanup, this takes care of the > > last cases of missing space (or too much space (as in a newline)) > > around operators ('='

Re: [PATCH 3/3] staging: vt6656: iwctl: remove a few remaining redundant newlines

2012-07-08 Thread Jesper Juhl
On Sun, 8 Jul 2012, Joe Perches wrote: > On Mon, 2012-07-09 at 00:59 +0200, Jesper Juhl wrote: > > I missed a few redundant newlines the first time. > [] > > diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c > [] > > @@ -964,7 +964,6

[PATCH 3/3] staging: vt6656: iwctl: remove a few remaining redundant newlines

2012-07-08 Thread Jesper Juhl
I missed a few redundant newlines the first time. Signed-off-by: Jesper Juhl --- drivers/staging/vt6656/iwctl.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c index 13ad62c..8b9894b 100644 --- a/drivers

[PATCH 2/3] staging: vt6656: iwctl: Fix up a few remaining brace issues

2012-07-08 Thread Jesper Juhl
My previous cleanup patches missed a few cases of redundant/missing/replaced curly braces. This should fix up the last ones. Signed-off-by: Jesper Juhl --- drivers/staging/vt6656/iwctl.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers

[PATCH 1/3] staging: vt6656: iwctl: fix up spacing around operators

2012-07-08 Thread Jesper Juhl
A few cases were missed in my previous cleanup, this takes care of the last cases of missing space (or too much space (as in a newline)) around operators ('=', '==', ',', '<'). Signed-off-by: Jesper Juhl --- drivers/staging/vt6656/iwctl.c | 13 ++

  1   2   3   4   5   6   7   8   9   10   >