linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: alan@redhat.com, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-next@vger.kernel.org
Subject: Re: [PATCH] serial167: Read buffer overflow
Date: Tue, 4 Aug 2009 15:18:38 -0700	[thread overview]
Message-ID: <20090804151838.c5cb362b.akpm@linux-foundation.org> (raw)
In-Reply-To: <4A76D4DA.8090905@gmail.com>

On Mon, 03 Aug 2009 14:15:22 +0200
Roel Kluin <roel.kluin@gmail.com> wrote:

> @@ -222,7 +222,7 @@ static inline int serial_paranoia_check(struct cyclades_port *info, char *name,
>  	}
>  
>  	if ((long)info < (long)(&cy_port[0])
> -	    || (long)(&cy_port[NR_PORTS]) < (long)info) {
> +	    || (long)(&cy_port[NR_PORTS-1]) < (long)info) {
>  		printk("Warning: cyclades_port out of range for (%s) in %s\n",
>  				name, routine);

OK, that hurts my brain.  And all those casts are pointless.  How about this?

	if (info < &cy_port[0] || info >= &cy_port[NR_PORTS]) {
		printk("Warning: cyclades_port out of range for (%s) in %s\n",
				name, routine);
		return 1;
	}



btw, m68k allmodconfig in current mainline is sick:

In file included from /usr/src/devel/arch/m68k/include/asm/pgtable.h:4,
                 from include/linux/mm.h:40,
                 from drivers/char/serial167.c:62:
/usr/src/devel/arch/m68k/include/asm/pgtable_mm.h:148:1: warning: "pgprot_noncached" redefined
In file included from /usr/src/devel/arch/m68k/include/asm/pgtable_mm.h:138,
                 from /usr/src/devel/arch/m68k/include/asm/pgtable.h:4,
                 from include/linux/mm.h:40,
                 from drivers/char/serial167.c:62:
include/asm-generic/pgtable.h:133:1: warning: this is the location of the previous definition


And in linux-next m68k allmodconfig is dead as a doornail:

drivers/staging/vme/Kconfig:5:warning: type of 'VME' redefined from 'boolean' to 'tristate'
In file included from include/linux/irq.h:12,
                 from include/asm-generic/hardirq.h:6,
                 from /usr/src/devel/arch/m68k/include/asm/hardirq.h:4,
                 from include/linux/hardirq.h:10,
                 from /usr/src/devel/arch/m68k/include/asm/system_mm.h:69,
                 from /usr/src/devel/arch/m68k/include/asm/system.h:4,
                 from include/linux/list.h:7,
                 from include/linux/preempt.h:11,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:56,
                 from arch/m68k/kernel/asm-offsets.c:12:
include/linux/smp.h:17: error: field 'list' has incomplete type
In file included from include/linux/mmzone.h:9,
                 from include/linux/gfp.h:4,
                 from include/linux/irq.h:20,
                 from include/asm-generic/hardirq.h:6,
                 from /usr/src/devel/arch/m68k/include/asm/hardirq.h:4,
                 from include/linux/hardirq.h:10,
                 from /usr/src/devel/arch/m68k/include/asm/system_mm.h:69,
                 from /usr/src/devel/arch/m68k/include/asm/system.h:4,
                 from include/linux/list.h:7,
                 from include/linux/preempt.h:11,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:56,
                 from arch/m68k/kernel/asm-offsets.c:12:
include/linux/wait.h:37: error: field 'task_list' has incomplete type
include/linux/wait.h:51: error: expected specifier-qualifier-list before 'spinlock_t'
include/linux/wait.h: In function 'waitqueue_active':
include/linux/wait.h:108: error: implicit declaration of function 'list_empty'
include/linux/wait.h:108: error: 'wait_queue_head_t' has no member named 'task_list'
include/linux/wait.h: In function '__add_wait_queue':
include/linux/wait.h:117: error: implicit declaration of function 'list_add'
include/linux/wait.h:117: error: 'wait_queue_head_t' has no member named 'task_list'
include/linux/wait.h: In function '__add_wait_queue_tail':
include/linux/wait.h:126: error: implicit declaration of function 'list_add_tail'
include/linux/wait.h:126: error: 'wait_queue_head_t' has no member named 'task_list'
include/linux/wait.h: In function '__remove_wait_queue':
include/linux/wait.h:132: error: implicit declaration of function 'list_del'

       reply	other threads:[~2009-08-04 22:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4A76D4DA.8090905@gmail.com>
2009-08-04 22:18 ` Andrew Morton [this message]
2009-08-05  9:17   ` [PATCH] serial167: Read buffer overflow Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090804151838.c5cb362b.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=alan@redhat.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=roel.kluin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).