Re: [PATCH 2/2 resend] mm: various cleanups in get_user_pages()

2008-02-12 Thread Eugene Teo
Hi Nick, Thanks for the review. > On Wednesday 13 February 2008 00:10, Eugene Teo wrote: [...] > > diff --git a/mm/memory.c b/mm/memory.c > > index 54f951b..c7e0610 100644 > > --- a/mm/memory.c > > +++ b/mm/memory.c > > @@ -1003,7 +1003,9 @@ int get_user_page

Re: [PATCH 2/2 resend] mm: various cleanups in get_user_pages()

2008-02-12 Thread Eugene Teo
() is validated. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- mm/memory.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 54f951b..c7e0610 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1003,7 +1003,9

[PATCH 2/2 resend] mm: various cleanups in get_user_pages()

2008-02-12 Thread Eugene Teo
Argh. Sorry, I spotted a mistake. Here's a resend: [PATCH 2/2] mm: various cleanups in get_user_pages() This patch contains various cleanups, including making sure vma is valid, and the return value of follow_hugetlb_page() is validated. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]&

[PATCH 2/2] mm: various cleanups in get_user_pages()

2008-02-12 Thread Eugene Teo
This patch contains various cleanups, including making sure vma is valid, and the return value of follow_hugetlb_page() is validated. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- mm/memory.c | 26 ++ 1 files changed, 18 insertions(+), 8 deletions(-) diff -

[PATCH 1/2] mm: make get_user_pages() more robust in handling arguments

2008-02-12 Thread Eugene Teo
Ensure that get_user_pages() evaluates len upon entry into the while loops. A BUG_ON check is added so that it will catch potential bugs when it is asked to grab zero pages. follow_hugetlb_page() is modified to adapt the changes made in get_user_pages(). Signed-off-by: Eugene Teo <[EM

Re: [PATCH] mm: tidy up follow_hugetlb_page() and get_user_pages()

2008-02-12 Thread Eugene Teo
> On Tue, 12 Feb 2008 13:28:40 +0800 Eugene Teo <[EMAIL PROTECTED]> wrote: > > > This patch extends Jonathan Corbet's patch to avoid buffer overflows in > > get_user_pages(). It cleans up follow_hugetlb_page(), and get_user_pages() > > so > > that it i

Re: [PATCH] mm: tidy up follow_hugetlb_page() and get_user_pages()

2008-02-11 Thread Eugene Teo
age(), and get_user_pages() to make sure that vma is also validated, and the code is more readable. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- include/linux/hugetlb.h |2 +- mm/hugetlb.c| 13 +++-- mm/memory.c | 39 ++

[PATCH] mm: tidy up follow_hugetlb_page() and get_user_pages()

2008-02-11 Thread Eugene Teo
This patch extends Jonathan Corbet's patch to avoid buffer overflows in get_user_pages(). It cleans up follow_hugetlb_page(), and get_user_pages() so that it is easier to read. It also makes sure that len and vma are validated. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- in

Re: [PATCH] proc: extend /proc//fdinfo/

2008-02-11 Thread Eugene Teo
Hi Motohiro-san, > In general, I think this patch isn't wrong idea. > but it shuld be brush up more, may be. Thanks. > > kerndev: ~/code/kernel# cat /proc/`pgrep pickup`/fdinfo/6 > > mode: 0622 > > I think this is inode attribute, but not fd attribute. Yes, it is an inode attribute. > > de

Re: [PATCH] proc: extend /proc//fdinfo/

2008-02-11 Thread Eugene Teo
Hi Miklos, > On Sat, 2008-02-09 at 20:01 +0800, Eugene Teo wrote: > > This patch extends /proc//fdinfo/ to report information about open > > files, and pathname. This information can be useful to know when debugging > > an > > application. > > > > For e

Re: [PATCH] ftrace: remove unused tracing_sched_switch_enabled

2008-02-10 Thread Eugene Teo
> tracing_sched_switch_enabled isn't used anywhere. > > Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> Sorry, I forgot to remove the variable declaration. Here's a resend: tracing_sched_switch_enabled isn't used anywhere. Signed-off-by: Eugene Teo <[EMAIL PROT

[PATCH] ftrace: remove unused tracing_sched_switch_enabled

2008-02-10 Thread Eugene Teo
tracing_sched_switch_enabled isn't used anywhere. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- kernel/trace/trace.h |1 - kernel/trace/trace_sched_switch.c |9 + 2 files changed, 1 insertions(+), 9 deletions(-) diff --git a/kernel/trace/trace.h b/k

Re: [12/19] ftrace: function tracer

2008-02-10 Thread Eugene Teo
> From: Steven Rostedt <[EMAIL PROTECTED]> > > This is a simple trace that uses the ftrace infrastructure. It is > designed to be fast and small, and easy to use. It is useful to > record things that happen over a very short period of time, and > not to analyze the system in general. > > Update

[PATCH] lguest: make sure cpu is initialized before accessing it

2008-02-09 Thread Eugene Teo
If req is LHREQ_INITIALIZE, and the guest has been initialized before (unlikely), it will attempt to access cpu->tsk even though cpu is not yet initialized. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- drivers/lguest/lguest_user.c | 14 +++--- 1 files changed, 7 inserti

[PATCH] proc: extend /proc//fdinfo/

2008-02-09 Thread Eugene Teo
/fdinfo# grep 21398205 * -B2 -A6 3-mode: 0644 3-dev: 253,0 3:ino: 21398205 3-uid: 0 3-gid: 0 3-rdev: 0,0 3-pos: 5 3-flags:02 FD_CLOEXEC 3-path: /var/run/atd.pid Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- fs/proc/base.c

[PATCH] proc: Add RLIMIT_RTTIME to /proc//limits

2008-02-08 Thread Eugene Teo
RLIMIT_RTTIME was introduced to allow the user to set a runtime timeout on real-time tasks: http://lkml.org/lkml/2007/12/18/218. This patch updates /proc//limits with the new rlimit. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- fs/proc/base.c |1 + 1 files changed, 1 insertions

[PATCH] clean up exports in fs/{open,read_write}.c

2007-08-23 Thread Eugene Teo
istoph Hellwig <[EMAIL PROTECTED]> Cc: Arjan van de Ven <[EMAIL PROTECTED]> Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- fs/open.c |4 ++-- fs/read_write.c |1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/open.c b/fs/open.c index 1d9e5e9.

[PATCH] alsa: replace calls to sys_* with filp_open and vfs_read

2007-08-20 Thread Eugene Teo
This patch replaces calls to sys_* with filp_open and vfs_read. And since this is the last driver in the kernel that uses sys_{read,close}, it kills the exports as well. sys_open is left exported for sparc64 only. Cc: Takashi Iwai <[EMAIL PROTECTED]> Signed-off-by: Eugene Teo <[EMAIL

Re: kernel BUG at lib/list_debug.c:27!

2007-08-19 Thread Eugene Teo
Hi, > Hi, > > According to dmesg, I encountered a kernel bug on my system. > I'm not sure if this is the appropriate place to report this problem > as this occured on a Fedora kernel. Maybe its a general problem? Please file a bug at https://bugzilla.redhat.com/ under Product: Fedora, Version:

[PATCH] Fix tsk->exit_state usage (resend)

2007-08-19 Thread Eugene Teo
tsk->exit_state can only be 0, EXIT_ZOMBIE, or EXIT_DEAD. A non-zero test is the same as tsk->exit_state & (EXIT_ZOMBIE | EXIT_DEAD), so just testing tsk->exit_state is sufficient. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- fs/proc/array.c |3 +-- kernel/fork.c

[PATCH] Make checkpatch rant about trailing ; at the end of "if" expr

2007-08-15 Thread Eugene Teo
Make checkpatch rant about trailing ; at the end of "if" expression. Thanks to Auke for the regexp. Signed-off by: Eugene Teo <[EMAIL PROTECTED]> --- checkpatch.pl-0.09.default 2007-08-03 23:31:40.0 +0800 +++ checkpatch.pl-0.09 2007-08-16 13:18:40.0 +0800 @@

Re: Page Cache Question

2007-08-14 Thread Eugene Teo
> Adnan Khaleel wrote: >> I'm looking for a way to disable the page cache for an >> experimental NUMA system running the 2.6.17 kernel. I would prefer to >> only disable the page cache for my process and still have it be enabled >> by the rest of the system. Is there an easy way of doing this? >>

[PATCH] Fix tsk->exit_state usage

2007-08-14 Thread Eugene Teo
tsk->exit_state can only be 0, EXIT_ZOMBIE, or EXIT_DEAD. A non-zero test is the same as tsk->exit_state & (EXIT_ZOMBIE | EXIT_DEAD), so just testing tsk->exit_state is sufficient. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- fs/proc/array.c |3 +-- kernel/fork.c

[PATCH] drivers/scsi/ips.c: fix scsi_add_host warning

2007-08-07 Thread Eugene Teo
This patch fixes the following warning: drivers/scsi/ips.c: In function 'ips_register_scsi': drivers/scsi/ips.c:6867: warning: ignoring return value of 'scsi_add_host', declared with attribute warn_unused_result Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> ---

Re: [ALSA] seq: resource leak fix and various code cleanups

2007-08-07 Thread Eugene Teo
> At Tue, 7 Aug 2007 18:52:49 +0800, > Eugene Teo wrote: [...] > I fixed these and applied your patch to ALSA tree now. > Thanks! Thanks! Will take note next time. Eugene - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

Re: [ALSA] seq: resource leak fix and various code cleanups

2007-08-07 Thread Eugene Teo
Hi Takashi-san, > At Tue, 7 Aug 2007 16:40:48 +0800, > Eugene Teo wrote: > > > > This patch fixes: > > 1) a resource leak (CID: 1817) > > 2) various code cleanups [...] > > if (i >= SNDRV_SEQ_OSS_MAX_CLIENTS) { > >

[ALSA] seq: resource leak fix and various code cleanups

2007-08-07 Thread Eugene Teo
This patch fixes: 1) a resource leak (CID: 1817) 2) various code cleanups Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- sound/core/seq/oss/seq_oss_init.c | 29 ++--- sound/core/seq/oss/seq_oss_writeq.c |6 -- 2 files changed, 22 insertions(+), 13 del

Re: [2.6 patch] drivers/video/geode/lxfb_core.c: cleanups

2007-08-04 Thread Eugene Teo
> This pacth contains the following cleanups: > - make the needlessly global geode_modedb[] static > - lxfb_setup(): remove an unused variable I have submitted a patch for the 2nd cleanup: http://marc.info/?l=linux-mm-commits&m=118616305111463&w=2 Thanks, Eugene - To unsubscribe from this list:

Re: [PATCH] drivers/char/sonypi.c: fix ids member of struct acpi_driver

2007-08-02 Thread Eugene Teo
Hi Mattia, > On Thu, Aug 02, 2007 at 09:50:18AM +0200, Thomas Renninger wrote: > > On Thu, 2007-08-02 at 15:40 +0900, Mattia Dongili wrote: > > > On Wed, Aug 01, 2007 at 05:15:34PM +0800, Eugene Teo wrote: > > > > ids member of struct acpi_driver is of typ

[PATCH] drivers/scsi/advansys.c: fix advansys_board_found compile error

2007-08-01 Thread Eugene Teo
/scsi/advansys.c:17781: error: implicit declaration of function 'to_pci_dev' Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- drivers/scsi/advansys.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 79

[PATCH] drivers/video/geode/lxfb_core.c: fix lxfb_setup warning

2007-08-01 Thread Eugene Teo
This patch fixes the following warning: drivers/video/geode/lxfb_core.c: In function 'lxfb_setup': drivers/video/geode/lxfb_core.c:564: warning: unused variable 'opt' Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- drivers/video/geode/lxfb_core.c |7 +-- 1 f

[PATCH] drivers/char/sonypi.c: fix ids member of struct acpi_driver

2007-08-01 Thread Eugene Teo
ids member of struct acpi_driver is of type struct acpi_device_id, not a character array. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- drivers/char/sonypi.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c

Re: [PATCH] - Remove current defines and uses of pr_err, add pr_emerg, pr_alert, pr_crit, pr_err, pr_warn, pr_notice to include/linux/kernel.h

2007-08-01 Thread Eugene Teo
Hi Joe, Joe Perches wrote: > Remove current #define and uses of pr_err > Add pr_emerg, pr_alert, pr_crit, pr_err, pr_warn, pr_notice > to include/linux/kernel.h > > Signed-off-by: Joe Perches <[EMAIL PROTECTED]> > > diff --git a/drivers/i2c/chips/menelaus.c b/drivers/i2c/chips/menelaus.c

Re: [PATCH 1/3] coredump: cleanup documentation for suid_dumpable

2007-07-31 Thread Eugene Teo
Hi Alan, Alan Cox wrote: > On Tue, 31 Jul 2007 15:03:40 +0800 > Eugene Teo <[EMAIL PROTECTED]> wrote: > >> This patch removes documentation that is related to suidsafe core dump >> mode. >> >> Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> > >

[PATCH 3/3] coredump: re-implement suid_dumpable using a flag

2007-07-31 Thread Eugene Teo
Hidehiro-san re-implemented suid_dumpable using a pair of bit flags. But since we no longer permitting users to call prctl(PR_SET_DUMPABLE, 2), there is no need to waste a bit of mm_struct.flags for something that will never be used. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- fs/

[PATCH 2/3] coredump: remove suidsafe mode related dead code

2007-07-31 Thread Eugene Teo
This patch removes suidsafe core dump mode related dead code. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- fs/exec.c | 16 +--- include/linux/binfmts.h |3 --- 2 files changed, 1 insertions(+), 18 deletions(-) diff --git a/fs/exec.c b/fs/exec.c index 7

[PATCH 1/3] coredump: cleanup documentation for suid_dumpable

2007-07-31 Thread Eugene Teo
This patch removes documentation that is related to suidsafe core dump mode. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- Documentation/sysctl/fs.txt |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt

[PATCH 0/3] coredump: setuid core dump cleanups

2007-07-31 Thread Eugene Teo
Hi, A year ago, commit abf75a5033d4da7b8a7e92321d74021d1fcfb502 was included to fix a security vulnerability that is related to prctl privilege escalation, and suid_dumpable (CVE-2006-2451). But the commit was just a quick fix to prevent users from calling prctl(PR_SET_DUMPABLE, 2). This patch se

[PATCH] fs/partitions/check.c: add_partition() warning fixes (take 4)

2007-07-30 Thread Eugene Teo
ring return value of 'sysfs_create_link', declared with attribute warn_unused_result fs/partitions/check.c:401: warning: ignoring return value of 'sysfs_create_file', declared with attribute warn_unused_result Got it right this time. Thanks Cornelia for help. Signed-off-by: Eugene Te

[PATCH] fs/partitions/check.c: add_partition() warning fixes (take 3)

2007-07-30 Thread Eugene Teo
ring return value of 'sysfs_create_link', declared with attribute warn_unused_result fs/partitions/check.c:401: warning: ignoring return value of 'sysfs_create_file', declared with attribute warn_unused_result Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- fs/partitions/

Re: [PATCH] fs/partitions/check.c: add_partition() warning fixes (take 2)

2007-07-30 Thread Eugene Teo
Cornelia Huck wrote: > On Mon, 30 Jul 2007 17:47:55 +0800, > Eugene Teo <[EMAIL PROTECTED]> wrote: > >> +err_out_del_link: >> +sysfs_remove_link(&p->kobj, "subsystem"); >> +err_out_del_kobj: >> +if (!disk->part_uevent_sup

[PATCH] fs/partitions/check.c: add_partition() warning fixes (take 2)

2007-07-30 Thread Eugene Teo
ring return value of 'sysfs_create_link', declared with attribute warn_unused_result fs/partitions/check.c:401: warning: ignoring return value of 'sysfs_create_file', declared with attribute warn_unused_result Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- fs/partitions/c

Re: [PATCH] fs/partitions/check.c: add_partition() warning fixes

2007-07-30 Thread Eugene Teo
Hi Cornelia, Cornelia Huck wrote: > On Sun, 29 Jul 2007 10:53:39 +0800, > Eugene Teo <[EMAIL PROTECTED]> wrote: [...] >> +return; >> + >> +err_out_del_link: >> +sysfs_remove_link(&p->kobj, "subsystem"); > > You need a remove uev

Re: [PATCH] drivers/bluetooth/hci_ldisc.c: fix possible NULL dereferences

2007-07-29 Thread Eugene Teo
Hi Marcel, Marcel Holtmann wrote: Commit 22ad42033b7d2b3d7928fba9f89d1c7f8a3c9581 did not completely fix all the possible NULL dereferences. Besides hci_uart_close(), we also need to make sure that hdev is valid before calling hci_{unregister,free}_dev(). >>> I don't see any issue

Re: [PATCH 0/3] core_pattern: cleaned up repost/continuing post of core_pattern enhancements

2007-07-29 Thread Eugene Teo
Hi Martin, Martin Pitt wrote: > Eugene Teo [2007-07-29 21:03 +0800]: >>>> Also, it is probably good to think how we can "drop privileges" while >>>> piping >>>> the core dump output to an external program. A malicious user can >>>>

Re: [PATCH] drivers/bluetooth/hci_ldisc.c: fix possible NULL dereferences

2007-07-29 Thread Eugene Teo
Hi Marcel, Marcel Holtmann wrote: >> Commit 22ad42033b7d2b3d7928fba9f89d1c7f8a3c9581 did not completely fix all >> the possible NULL dereferences. Besides hci_uart_close(), we also need to >> make sure that hdev is valid before calling hci_{unregister,free}_dev(). > > I don't see any issue. Wit

[PATCH] drivers/bluetooth/hci_ldisc.c: fix possible NULL dereferences

2007-07-29 Thread Eugene Teo
Commit 22ad42033b7d2b3d7928fba9f89d1c7f8a3c9581 did not completely fix all the possible NULL dereferences. Besides hci_uart_close(), we also need to make sure that hdev is valid before calling hci_{unregister,free}_dev(). Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- drivers/blu

Re: [PATCH 3/3] core_pattern: fix up a few miscelaneous bugs

2007-07-29 Thread Eugene Teo
Neil Horman wrote: [...] > + delimit = strrchr(helper_argv[0], '/'); > + if (delimit) Trailing space. > + delimit++; > + else > + delimit = helper_argv[0]; > + if (!strcmp(delimit, current->comm)) > +

Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe

2007-07-29 Thread Eugene Teo
Neil Horman wrote: [...] > + /* core limit size */ > + case 'c': > + rc = snprintf(out_ptr, out_end - out_ptr, > + "%lu", > current->signal->rlim[RLIMIT_CORE].rlim_cur); Trailing space.

Re: [PATCH 1/3] core_pattern: ignore RLIMIT_CORE if core_pattern is a pipe

2007-07-29 Thread Eugene Teo
Neil Horman wrote: [...] > + * Don't bother to check the RLIMIT_CORE value if core_pattern points > + * to a pipe. Since we're not writing directly to the filesystem > + * RLIMIT_CORE doesn't really apply, as no actual core file will be > + * created unless the pipe reader chos

Re: [PATCH 0/3] core_pattern: cleaned up repost/continuing post of core_pattern enhancements

2007-07-29 Thread Eugene Teo
Neil Horman wrote: > On Sun, Jul 29, 2007 at 06:40:43PM +0800, Eugene Teo wrote: >> Neil Horman wrote: [...] >> You may want to improve your patches with style-related changes, including >> removing trailing spaces, using tabs instead of spaces, and defining pointers >>

Re: [PATCH 0/3] core_pattern: cleaned up repost/continuing post of core_pattern enhancements

2007-07-29 Thread Eugene Teo
Neil Horman wrote: > Ok, here we go > > As promised, I'm reposting the core_pattern enhancements I've done over the > past > few days. These three patches replace and conintue the work contained in the > following patches, and can replace them: > update-coredump-path-in-kernel-to-not-check-cored

[PATCH] fs/partitions/check.c: add_partition() warning fixes

2007-07-28 Thread Eugene Teo
‘sysfs_create_link’, declared with attribute warn_unused_result fs/partitions/check.c:401: warning: ignoring return value of ‘sysfs_create_file’, declared with attribute warn_unused_result Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- fs/partitions/check.c | 21 ++--- 1 files c

[PATCH] arch/i386/kernel/apm.c: apm_init() warning fix

2007-07-28 Thread Eugene Teo
arch/i386/kernel/apm.c: In function 'apm_init': arch/i386/kernel/apm.c:2240: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'u32' apm_info.bios.offset is of type 'u32'. Signed-off-by: Eugene Teo <[EMAIL

[PATCH] fs/afs/flock.c: posix_test_lock() returns void

2007-07-19 Thread Eugene Teo
posix_test_lock() returns void, so there is no need to test the return value. Checking fl->fl_type for F_UNLCK instead. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> --- fs/afs/flock.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/fs/afs/flock.c b/fs/af

Re: [PATCH] Chinese translation of Documentation/HOWTO

2007-06-21 Thread Eugene Teo
> This is a Chinese translated version of Documentation/HOWTO. Currently > Chinese involvement in Linux kernel is very low, especially comparing to > its largest population base. Language could be the main obstacle. Hope > this document will help more Chinese to contribute to Linux kernel. > >

Re: [2.6 patch] drivers/net/wireless/libertas/rx.c: fix use-after-free

2007-05-21 Thread Eugene Teo
> On Sat, May 19, 2007 at 11:14:10AM +0800, Eugene Teo wrote: > > John W. Linville wrote: > > > >> done: > > >> LEAVE(); > > >> > > >> - skb->protocol = __constant_htons(0x0019); /* > > >> ETH_P_80

Re: [2.6 patch] net/llc/llc_conn.c: fix possible NULL dereference

2007-05-18 Thread Eugene Teo
Hi Randy, Randy Dunlap wrote: > On Sat, 19 May 2007 13:13:07 +0800 Eugene Teo wrote: > >> skb_peek() might return an empty list. skb should be checked before calling >> llc_pdu_sn_hdr() with it. >> >> Spotted by the Coverity checker. >> >> S

[2.6 patch] net/llc/llc_conn.c: fix possible NULL dereference

2007-05-18 Thread Eugene Teo
skb_peek() might return an empty list. skb should be checked before calling llc_pdu_sn_hdr() with it. Spotted by the Coverity checker. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> diff --git a/net/llc/llc_conn.c b/net/llc/llc_conn.c index 3b8cfbe..28a3994 100644 --- a/net/llc/llc_conn.c

Re: [2.6 patch] drivers/net/wireless/libertas/rx.c: fix use-after-free

2007-05-18 Thread Eugene Teo
John W. Linville wrote: > First, please send all wireless patches to > [EMAIL PROTECTED], and be sure to CC me as well...thanks! > > On Sat, May 19, 2007 at 12:50:31AM +0800, Eugene Teo wrote: >> libertas_upload_rx_packet() calls netif_rx() before returning, and it always &g

Re: [2.6 patch] drivers/net/wireless/libertas/fw.c: fix use-before-check

2007-05-18 Thread Eugene Teo
Hi John, John W. Linville wrote: > On Sat, May 19, 2007 at 01:06:49AM +0800, Eugene Teo wrote: >> NULL checks should be performed before the dereference. >> >> Spotted by the Coverity checker. >> >> Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> > > Th

[2.6 patch] drivers/net/wireless/libertas/fw.c: fix use-before-check

2007-05-18 Thread Eugene Teo
NULL checks should be performed before the dereference. Spotted by the Coverity checker. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> diff --git a/drivers/net/wireless/libertas/fw.c b/drivers/net/wireless/libertas/fw.c index 441123c..5c63c9b 100644 --- a/drivers/net/wireless/liberta

[2.6 patch] drivers/net/wireless/libertas/rx.c: fix use-after-free

2007-05-18 Thread Eugene Teo
libertas_upload_rx_packet() calls netif_rx() before returning, and it always return 0. Also within libertas_upload_rx_packet(), it will initialize skb->protocol anyways. Spotted by the Coverity checker. Signed-off-by: Eugene Teo <[EMAIL PROTECTED]> diff --git a/drivers/net/wireless

Re: [2.6 patch] net/sctp/socket.c: add missing sctp_spin_unlock_irqrestore

2006-11-26 Thread Eugene Teo
Al Viro wrote: On Sun, Nov 26, 2006 at 06:00:53PM +0800, Eugene Teo wrote: This patch adds a missing sctp_spin_unlock_irqrestore when returning from "if(space_left + sctp_spin_unlock_irqrestore(&sctp_local_addr_lock, flags); + return err; } You do realize that it&#x

[2.6 patch] net/sctp/socket.c: add missing sctp_spin_unlock_irqrestore

2006-11-26 Thread Eugene Teo
This patch adds a missing sctp_spin_unlock_irqrestore when returning from "if(space_left net/sctp/socket.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 935bc91..a5d4d75 100644 --- a/net/sctp/socket.c +++ b/