* [-mm patch] DVB: fix compile error
2006-12-28 10:42 2.6.20-rc2-mm1 Andrew Morton
@ 2006-12-28 15:26 ` Adrian Bunk
2006-12-28 21:25 ` 2.6.20-rc2-mm1: INFO: possible recursive locking detected in con_close Laurent Riffard
` (5 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Adrian Bunk @ 2006-12-28 15:26 UTC (permalink / raw)
To: Andrew Morton, mchehab; +Cc: linux-kernel, v4l-dvb-maintainer
On Thu, Dec 28, 2006 at 02:42:37AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.20-rc1-mm1:
>...
> git-dvb.patch
>...
> git trees
>...
This patch fixes the following compile error:
<-- snip -->
...
LD drivers/media/video/built-in.o
drivers/media/video/saa7134/built-in.o:(.data+0x85ec): multiple definition of `ir_rc5_remote_gap'
drivers/media/video/bt8xx/built-in.o:(.data+0x734c): first defined here
drivers/media/video/saa7134/built-in.o:(.data+0x85f0): multiple definition of `ir_rc5_key_timeout'
drivers/media/video/bt8xx/built-in.o:(.data+0x7350): first defined here
make[4]: *** [drivers/media/video/built-in.o] Error 1
<-- snip -->
Since this variables were needlessly global, this patch implements the
trivial fix of making them static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/media/video/bt8xx/bttv-input.c | 4 ++--
drivers/media/video/saa7134/saa7134-input.c | 4 ++--
include/media/ir-common.h | 3 ---
3 files changed, 4 insertions(+), 7 deletions(-)
--- linux-2.6.20-rc2-mm1/include/media/ir-common.h.old 2006-12-28 12:54:05.000000000 +0100
+++ linux-2.6.20-rc2-mm1/include/media/ir-common.h 2006-12-28 12:54:39.000000000 +0100
@@ -36,9 +36,6 @@
#define IR_KEYCODE(tab,code) (((unsigned)code < IR_KEYTAB_SIZE) \
? tab[code] : KEY_RESERVED)
-extern int ir_rc5_remote_gap;
-extern int ir_rc5_key_timeout;
-
#define RC5_START(x) (((x)>>12)&3)
#define RC5_TOGGLE(x) (((x)>>11)&1)
#define RC5_ADDR(x) (((x)>>6)&31)
--- linux-2.6.20-rc2-mm1/drivers/media/video/saa7134/saa7134-input.c.old 2006-12-28 12:54:48.000000000 +0100
+++ linux-2.6.20-rc2-mm1/drivers/media/video/saa7134/saa7134-input.c 2006-12-28 12:55:00.000000000 +0100
@@ -41,9 +41,9 @@
module_param(pinnacle_remote, int, 0644); /* Choose Pinnacle PCTV remote */
MODULE_PARM_DESC(pinnacle_remote, "Specify Pinnacle PCTV remote: 0=coloured, 1=grey (defaults to 0)");
-int ir_rc5_remote_gap = 885;
+static int ir_rc5_remote_gap = 885;
module_param(ir_rc5_remote_gap, int, 0644);
-int ir_rc5_key_timeout = 115;
+static int ir_rc5_key_timeout = 115;
module_param(ir_rc5_key_timeout, int, 0644);
#define dprintk(fmt, arg...) if (ir_debug) \
--- linux-2.6.20-rc2-mm1/drivers/media/video/bt8xx/bttv-input.c.old 2006-12-28 12:55:08.000000000 +0100
+++ linux-2.6.20-rc2-mm1/drivers/media/video/bt8xx/bttv-input.c 2006-12-28 12:55:17.000000000 +0100
@@ -36,9 +36,9 @@
static int repeat_period = 33;
module_param(repeat_period, int, 0644);
-int ir_rc5_remote_gap = 885;
+static int ir_rc5_remote_gap = 885;
module_param(ir_rc5_remote_gap, int, 0644);
-int ir_rc5_key_timeout = 200;
+static int ir_rc5_key_timeout = 200;
module_param(ir_rc5_key_timeout, int, 0644);
#define DEVNAME "bttv-input"
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: 2.6.20-rc2-mm1: INFO: possible recursive locking detected in con_close
2006-12-28 10:42 2.6.20-rc2-mm1 Andrew Morton
2006-12-28 15:26 ` [-mm patch] DVB: fix compile error Adrian Bunk
@ 2006-12-28 21:25 ` Laurent Riffard
2006-12-29 11:00 ` Frederik Deweerdt
2006-12-29 0:36 ` 2.6.20-rc2-mm1: i386-idle-notifier again Adrian Bunk
` (4 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Laurent Riffard @ 2006-12-28 21:25 UTC (permalink / raw)
To: Kernel development list, Oliver Neukum, Greg KH, Maneesh Soni
Cc: Andrew Morton
Le 28.12.2006 11:42, Andrew Morton a écrit :
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.20-rc2/2.6.20-rc2-mm1/
Hello,
got this with 2.6.20-rc2-mm1, reverting
gregkh-driver-driver-core-fix-race-in-sysfs-between-sysfs_remove_file-and-read-write.patch
made it disappear.
=============================================
[ INFO: possible recursive locking detected ]
2.6.20-rc2-mm1 #51
---------------------------------------------
init/324 is trying to acquire lock:
(&sysfs_inode_imutex_key){--..}, at: [<c02b2c79>] mutex_lock+0x1c/0x1f
but task is already holding lock:
(&sysfs_inode_imutex_key){--..}, at: [<c02b2c79>] mutex_lock+0x1c/0x1f
other info that might help us debug this:
2 locks held by init/324:
#0: (tty_mutex){--..}, at: [<c02b2c79>] mutex_lock+0x1c/0x1f
#1: (&sysfs_inode_imutex_key){--..}, at: [<c02b2c79>] mutex_lock+0x1c/0x1f
stack backtrace:
[<c0104ea7>] show_trace_log_lvl+0x1a/0x2f
[<c010557a>] show_trace+0x12/0x14
[<c010562c>] dump_stack+0x16/0x18
[<c01314ad>] __lock_acquire+0x116/0xb33
[<c0132283>] lock_acquire+0x56/0x6f
[<c02b2ad3>] __mutex_lock_slowpath+0xdc/0x266
[<c02b2c79>] mutex_lock+0x1c/0x1f
[<c018b293>] sysfs_drop_dentry+0xb7/0x12b
[<c018b3d6>] sysfs_hash_and_remove+0x90/0x14a
[<c018b985>] sysfs_remove_file+0xd/0xf
[<c0235944>] device_remove_file+0x1f/0x2a
[<c02359bb>] device_del+0x31/0x1c4
[<c0235b59>] device_unregister+0xb/0x15
[<c0235bee>] device_destroy+0x8b/0x91
[<c022d7fc>] vcs_remove_sysfs+0x1a/0x36
[<c023254f>] con_close+0x4c/0x60
[<c0226b79>] release_dev+0x221/0x62a
[<c0226f94>] tty_release+0x12/0x1c
[<c015baf1>] __fput+0xb9/0x177
[<c015bc83>] fput+0x31/0x35
[<c015951c>] filp_close+0x54/0x5c
[<c011ac05>] put_files_struct+0x7c/0xb9
[<c011bcef>] do_exit+0x219/0x72f
[<c011c275>] sys_exit_group+0x0/0x11
[<c011c284>] sys_exit_group+0xf/0x11
[<c0103ed2>] sysenter_past_esp+0x5f/0x99
=======================
--
laurent
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: 2.6.20-rc2-mm1: INFO: possible recursive locking detected in con_close
2006-12-28 21:25 ` 2.6.20-rc2-mm1: INFO: possible recursive locking detected in con_close Laurent Riffard
@ 2006-12-29 11:00 ` Frederik Deweerdt
2006-12-29 13:06 ` Laurent Riffard
2007-01-05 1:10 ` Greg KH
0 siblings, 2 replies; 13+ messages in thread
From: Frederik Deweerdt @ 2006-12-29 11:00 UTC (permalink / raw)
To: Laurent Riffard
Cc: Kernel development list, Oliver Neukum, Greg KH, Maneesh Soni,
Andrew Morton
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 3143 bytes --]
On Thu, Dec 28, 2006 at 10:25:12PM +0100, Laurent Riffard wrote:
> Le 28.12.2006 11:42, Andrew Morton a écrit :
> >ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.20-rc2/2.6.20-rc2-mm1/
>
> Hello,
>
> got this with 2.6.20-rc2-mm1, reverting
> gregkh-driver-driver-core-fix-race-in-sysfs-between-sysfs_remove_file-and-read-write.patch made it disappear.
>
Hi,
This is due to sysfs_hash_and_remove() holding dir->d_inode->i_mutex
before calling sysfs_drop_dentry() which calls orphan_all_buffers()
which in turn takes node->i_mutex.
The following patch solves the problem by defering the buffers orphaning
after the dir->d_inode->imutex is released. Not sure it's the best
solution though, Greg?
Regards,
Frederik
Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index 8c533cb..7cac0b6 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -230,10 +230,10 @@ static inline void orphan_all_buffers(struct inode *node)
* Unhashes the dentry corresponding to given sysfs_dirent
* Called with parent inode's i_mutex held.
*/
-void sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent)
+struct inode *sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent)
{
struct dentry * dentry = sd->s_dentry;
- struct inode *inode;
+ struct inode *inode = NULL;
if (dentry) {
spin_lock(&dcache_lock);
@@ -248,19 +248,19 @@ void sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent)
spin_unlock(&dentry->d_lock);
spin_unlock(&dcache_lock);
simple_unlink(parent->d_inode, dentry);
- orphan_all_buffers(inode);
- iput(inode);
} else {
spin_unlock(&dentry->d_lock);
spin_unlock(&dcache_lock);
}
}
+ return inode;
}
int sysfs_hash_and_remove(struct dentry * dir, const char * name)
{
struct sysfs_dirent * sd;
struct sysfs_dirent * parent_sd;
+ struct inode *inode;
int found = 0;
if (!dir)
@@ -277,7 +277,7 @@ int sysfs_hash_and_remove(struct dentry * dir, const char * name)
continue;
if (!strcmp(sysfs_get_name(sd), name)) {
list_del_init(&sd->s_sibling);
- sysfs_drop_dentry(sd, dir);
+ inode = sysfs_drop_dentry(sd, dir);
sysfs_put(sd);
found = 1;
break;
@@ -285,5 +285,10 @@ int sysfs_hash_and_remove(struct dentry * dir, const char * name)
}
mutex_unlock(&dir->d_inode->i_mutex);
+ if (found == 1 && inode) {
+ orphan_all_buffers(inode);
+ iput(inode);
+ }
+
return found ? 0 : -ENOENT;
}
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index 5100a12..ef9d217 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -17,7 +17,7 @@ extern int sysfs_create_subdir(struct kobject *, const char *, struct dentry **)
extern void sysfs_remove_subdir(struct dentry *);
extern const unsigned char * sysfs_get_name(struct sysfs_dirent *sd);
-extern void sysfs_drop_dentry(struct sysfs_dirent *sd, struct dentry *parent);
+extern struct inode * sysfs_drop_dentry(struct sysfs_dirent *sd, struct dentry *parent);
extern int sysfs_setattr(struct dentry *dentry, struct iattr *iattr);
extern struct rw_semaphore sysfs_rename_sem;
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: 2.6.20-rc2-mm1: INFO: possible recursive locking detected in con_close
2006-12-29 11:00 ` Frederik Deweerdt
@ 2006-12-29 13:06 ` Laurent Riffard
2007-01-05 1:10 ` Greg KH
1 sibling, 0 replies; 13+ messages in thread
From: Laurent Riffard @ 2006-12-29 13:06 UTC (permalink / raw)
To: Frederik Deweerdt
Cc: Kernel development list, Oliver Neukum, Greg KH, Maneesh Soni,
Andrew Morton
Le 29.12.2006 12:00, Frederik Deweerdt a ecrit :
> On Thu, Dec 28, 2006 at 10:25:12PM +0100, Laurent Riffard wrote:
>> Le 28.12.2006 11:42, Andrew Morton a ecrit :
>>> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.20-rc2/2.6.20-rc2-mm1/
>> Hello,
>>
>> got this with 2.6.20-rc2-mm1, reverting
>> gregkh-driver-driver-core-fix-race-in-sysfs-between-sysfs_remove_file-and-read-write.patch made it disappear.
>>
> Hi,
>
> This is due to sysfs_hash_and_remove() holding dir->d_inode->i_mutex
> before calling sysfs_drop_dentry() which calls orphan_all_buffers()
> which in turn takes node->i_mutex.
> The following patch solves the problem by defering the buffers orphaning
> after the dir->d_inode->imutex is released. Not sure it's the best
> solution though, Greg?
>
> Regards,
> Frederik
Tested, it does work: the INFO about "possible recursive locking" went away.
Thanks
~~
laurent
>
> Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
>
> diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
> index 8c533cb..7cac0b6 100644
> --- a/fs/sysfs/inode.c
> +++ b/fs/sysfs/inode.c
> @@ -230,10 +230,10 @@ static inline void orphan_all_buffers(struct inode *node)
> * Unhashes the dentry corresponding to given sysfs_dirent
> * Called with parent inode's i_mutex held.
> */
> -void sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent)
> +struct inode *sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent)
> {
> struct dentry * dentry = sd->s_dentry;
> - struct inode *inode;
> + struct inode *inode = NULL;
>
> if (dentry) {
> spin_lock(&dcache_lock);
> @@ -248,19 +248,19 @@ void sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent)
> spin_unlock(&dentry->d_lock);
> spin_unlock(&dcache_lock);
> simple_unlink(parent->d_inode, dentry);
> - orphan_all_buffers(inode);
> - iput(inode);
> } else {
> spin_unlock(&dentry->d_lock);
> spin_unlock(&dcache_lock);
> }
> }
> + return inode;
> }
>
> int sysfs_hash_and_remove(struct dentry * dir, const char * name)
> {
> struct sysfs_dirent * sd;
> struct sysfs_dirent * parent_sd;
> + struct inode *inode;
> int found = 0;
>
> if (!dir)
> @@ -277,7 +277,7 @@ int sysfs_hash_and_remove(struct dentry * dir, const char * name)
> continue;
> if (!strcmp(sysfs_get_name(sd), name)) {
> list_del_init(&sd->s_sibling);
> - sysfs_drop_dentry(sd, dir);
> + inode = sysfs_drop_dentry(sd, dir);
> sysfs_put(sd);
> found = 1;
> break;
> @@ -285,5 +285,10 @@ int sysfs_hash_and_remove(struct dentry * dir, const char * name)
> }
> mutex_unlock(&dir->d_inode->i_mutex);
>
> + if (found == 1 && inode) {
> + orphan_all_buffers(inode);
> + iput(inode);
> + }
> +
> return found ? 0 : -ENOENT;
> }
> diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
> index 5100a12..ef9d217 100644
> --- a/fs/sysfs/sysfs.h
> +++ b/fs/sysfs/sysfs.h
> @@ -17,7 +17,7 @@ extern int sysfs_create_subdir(struct kobject *, const char *, struct dentry **)
> extern void sysfs_remove_subdir(struct dentry *);
>
> extern const unsigned char * sysfs_get_name(struct sysfs_dirent *sd);
> -extern void sysfs_drop_dentry(struct sysfs_dirent *sd, struct dentry *parent);
> +extern struct inode * sysfs_drop_dentry(struct sysfs_dirent *sd, struct dentry *parent);
> extern int sysfs_setattr(struct dentry *dentry, struct iattr *iattr);
>
> extern struct rw_semaphore sysfs_rename_sem;
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: 2.6.20-rc2-mm1: INFO: possible recursive locking detected in con_close
2006-12-29 11:00 ` Frederik Deweerdt
2006-12-29 13:06 ` Laurent Riffard
@ 2007-01-05 1:10 ` Greg KH
2007-01-05 10:57 ` Frederik Deweerdt
1 sibling, 1 reply; 13+ messages in thread
From: Greg KH @ 2007-01-05 1:10 UTC (permalink / raw)
To: Frederik Deweerdt
Cc: Laurent Riffard, Kernel development list, Oliver Neukum,
Maneesh Soni, Andrew Morton
On Fri, Dec 29, 2006 at 11:00:41AM +0000, Frederik Deweerdt wrote:
> On Thu, Dec 28, 2006 at 10:25:12PM +0100, Laurent Riffard wrote:
> > Le 28.12.2006 11:42, Andrew Morton a ?crit :
> > >ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.20-rc2/2.6.20-rc2-mm1/
> >
> > Hello,
> >
> > got this with 2.6.20-rc2-mm1, reverting
> > gregkh-driver-driver-core-fix-race-in-sysfs-between-sysfs_remove_file-and-read-write.patch made it disappear.
> >
> Hi,
>
> This is due to sysfs_hash_and_remove() holding dir->d_inode->i_mutex
> before calling sysfs_drop_dentry() which calls orphan_all_buffers()
> which in turn takes node->i_mutex.
> The following patch solves the problem by defering the buffers orphaning
> after the dir->d_inode->imutex is released. Not sure it's the best
> solution though, Greg?
>
> Regards,
> Frederik
>
> Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Maneesh and Oliver, any objections to this patch?
thanks,
greg k-h
>
> diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
> index 8c533cb..7cac0b6 100644
> --- a/fs/sysfs/inode.c
> +++ b/fs/sysfs/inode.c
> @@ -230,10 +230,10 @@ static inline void orphan_all_buffers(struct inode *node)
> * Unhashes the dentry corresponding to given sysfs_dirent
> * Called with parent inode's i_mutex held.
> */
> -void sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent)
> +struct inode *sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent)
> {
> struct dentry * dentry = sd->s_dentry;
> - struct inode *inode;
> + struct inode *inode = NULL;
>
> if (dentry) {
> spin_lock(&dcache_lock);
> @@ -248,19 +248,19 @@ void sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent)
> spin_unlock(&dentry->d_lock);
> spin_unlock(&dcache_lock);
> simple_unlink(parent->d_inode, dentry);
> - orphan_all_buffers(inode);
> - iput(inode);
> } else {
> spin_unlock(&dentry->d_lock);
> spin_unlock(&dcache_lock);
> }
> }
> + return inode;
> }
>
> int sysfs_hash_and_remove(struct dentry * dir, const char * name)
> {
> struct sysfs_dirent * sd;
> struct sysfs_dirent * parent_sd;
> + struct inode *inode;
> int found = 0;
>
> if (!dir)
> @@ -277,7 +277,7 @@ int sysfs_hash_and_remove(struct dentry * dir, const char * name)
> continue;
> if (!strcmp(sysfs_get_name(sd), name)) {
> list_del_init(&sd->s_sibling);
> - sysfs_drop_dentry(sd, dir);
> + inode = sysfs_drop_dentry(sd, dir);
> sysfs_put(sd);
> found = 1;
> break;
> @@ -285,5 +285,10 @@ int sysfs_hash_and_remove(struct dentry * dir, const char * name)
> }
> mutex_unlock(&dir->d_inode->i_mutex);
>
> + if (found == 1 && inode) {
> + orphan_all_buffers(inode);
> + iput(inode);
> + }
> +
> return found ? 0 : -ENOENT;
> }
> diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
> index 5100a12..ef9d217 100644
> --- a/fs/sysfs/sysfs.h
> +++ b/fs/sysfs/sysfs.h
> @@ -17,7 +17,7 @@ extern int sysfs_create_subdir(struct kobject *, const char *, struct dentry **)
> extern void sysfs_remove_subdir(struct dentry *);
>
> extern const unsigned char * sysfs_get_name(struct sysfs_dirent *sd);
> -extern void sysfs_drop_dentry(struct sysfs_dirent *sd, struct dentry *parent);
> +extern struct inode * sysfs_drop_dentry(struct sysfs_dirent *sd, struct dentry *parent);
> extern int sysfs_setattr(struct dentry *dentry, struct iattr *iattr);
>
> extern struct rw_semaphore sysfs_rename_sem;
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: 2.6.20-rc2-mm1: INFO: possible recursive locking detected in con_close
2007-01-05 1:10 ` Greg KH
@ 2007-01-05 10:57 ` Frederik Deweerdt
0 siblings, 0 replies; 13+ messages in thread
From: Frederik Deweerdt @ 2007-01-05 10:57 UTC (permalink / raw)
To: Greg KH
Cc: Laurent Riffard, Kernel development list, Oliver Neukum,
Maneesh Soni, Andrew Morton
On Thu, Jan 04, 2007 at 05:10:05PM -0800, Greg KH wrote:
> On Fri, Dec 29, 2006 at 11:00:41AM +0000, Frederik Deweerdt wrote:
> > On Thu, Dec 28, 2006 at 10:25:12PM +0100, Laurent Riffard wrote:
> > > Le 28.12.2006 11:42, Andrew Morton a ?crit :
> > > >ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.20-rc2/2.6.20-rc2-mm1/
> > >
> > > Hello,
> > >
> > > got this with 2.6.20-rc2-mm1, reverting
> > > gregkh-driver-driver-core-fix-race-in-sysfs-between-sysfs_remove_file-and-read-write.patch made it disappear.
> > >
> > Hi,
> >
> > This is due to sysfs_hash_and_remove() holding dir->d_inode->i_mutex
> > before calling sysfs_drop_dentry() which calls orphan_all_buffers()
> > which in turn takes node->i_mutex.
> > The following patch solves the problem by defering the buffers orphaning
> > after the dir->d_inode->imutex is released. Not sure it's the best
> > solution though, Greg?
> >
> > Regards,
> > Frederik
> >
> > Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
>
> Maneesh and Oliver, any objections to this patch?
>
Actually, there's a problem with the patch: inode is not initialized in
sysfs_hash_and_remove, I'll repost a patch against 2.6.20-rc3-mm1.
Regards,
Frederik
^ permalink raw reply [flat|nested] 13+ messages in thread
* 2.6.20-rc2-mm1: i386-idle-notifier again
2006-12-28 10:42 2.6.20-rc2-mm1 Andrew Morton
2006-12-28 15:26 ` [-mm patch] DVB: fix compile error Adrian Bunk
2006-12-28 21:25 ` 2.6.20-rc2-mm1: INFO: possible recursive locking detected in con_close Laurent Riffard
@ 2006-12-29 0:36 ` Adrian Bunk
2006-12-29 2:10 ` [-mm patch] infiniband/ulp/ipoib/ipoib_cm.c: make functions static Adrian Bunk
` (3 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Adrian Bunk @ 2006-12-29 0:36 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Stephane Eranian
On Thu, Dec 28, 2006 at 02:42:37AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.20-rc1-mm1:
>...
> +add-i386-idle-notifier-take-3.patch
>...
> x86/x86_64 updates
>...
As already said:
- merges infrastructure without any users (the corresponding x86_64 code
is now merged and bloating the kernel unused for nearly one year)
- the planned user (perfmon) doesn't use the EXPORT_SYMBOL's that will
bloat the kernel even if the code using this infrastructure will ever
be merged
Let's either get the user into -mm, too, or drop the
infrastructure on all architectures until it's actually used.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 13+ messages in thread* [-mm patch] infiniband/ulp/ipoib/ipoib_cm.c: make functions static
2006-12-28 10:42 2.6.20-rc2-mm1 Andrew Morton
` (2 preceding siblings ...)
2006-12-29 0:36 ` 2.6.20-rc2-mm1: i386-idle-notifier again Adrian Bunk
@ 2006-12-29 2:10 ` Adrian Bunk
2006-12-29 5:39 ` Michael S. Tsirkin
2006-12-29 2:10 ` [-mm patch] make usbvision_rvfree() static Adrian Bunk
` (2 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Adrian Bunk @ 2006-12-29 2:10 UTC (permalink / raw)
To: Andrew Morton, rolandd; +Cc: linux-kernel, openib-general
On Thu, Dec 28, 2006 at 02:42:37AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.20-rc1-mm1:
>...
> git-infiniband.patch
>...
> git trees
>...
This patch makes some needlessly global functions static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/infiniband/ulp/ipoib/ipoib_cm.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
--- linux-2.6.20-rc2-mm1/drivers/infiniband/ulp/ipoib/ipoib_cm.c.old 2006-12-29 01:40:17.000000000 +0100
+++ linux-2.6.20-rc2-mm1/drivers/infiniband/ulp/ipoib/ipoib_cm.c 2006-12-29 01:43:22.000000000 +0100
@@ -56,7 +56,8 @@
u32 remote_mtu;
};
-int ipoib_cm_tx_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event);
+static int ipoib_cm_tx_handler(struct ib_cm_id *cm_id,
+ struct ib_cm_event *event);
static void ipoib_cm_dma_unmap_rx(struct ipoib_dev_priv *priv,
dma_addr_t mapping[IPOIB_CM_RX_SG])
@@ -265,7 +266,8 @@
return ret;
}
-int ipoib_cm_rx_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event)
+static int ipoib_cm_rx_handler(struct ib_cm_id *cm_id,
+ struct ib_cm_event *event)
{
struct ipoib_cm_rx *p;
struct ipoib_dev_priv *priv;
@@ -396,7 +398,7 @@
"for buf %d\n", wr_id);
}
-void ipoib_cm_rx_completion(struct ib_cq *cq, void *dev_ptr)
+static void ipoib_cm_rx_completion(struct ib_cq *cq, void *dev_ptr)
{
struct net_device *dev = (struct net_device *) dev_ptr;
struct ipoib_dev_priv *priv = netdev_priv(dev);
@@ -550,7 +552,7 @@
spin_unlock_irqrestore(&priv->tx_lock, flags);
}
-void ipoib_cm_tx_completion(struct ib_cq *cq, void *tx_ptr)
+static void ipoib_cm_tx_completion(struct ib_cq *cq, void *tx_ptr)
{
struct ipoib_cm_tx *tx = tx_ptr;
int n, i;
@@ -768,7 +770,8 @@
return 0;
}
-int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn, struct ib_sa_path_rec *pathrec)
+static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn,
+ struct ib_sa_path_rec *pathrec)
{
struct ipoib_dev_priv *priv = netdev_priv(p->dev);
int ret;
@@ -841,7 +844,7 @@
return ret;
}
-void ipoib_cm_tx_destroy(struct ipoib_cm_tx *p)
+static void ipoib_cm_tx_destroy(struct ipoib_cm_tx *p)
{
struct ipoib_dev_priv *priv = netdev_priv(p->dev);
struct ipoib_tx_buf *tx_req;
@@ -875,7 +878,8 @@
kfree(p);
}
-int ipoib_cm_tx_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event)
+static int ipoib_cm_tx_handler(struct ib_cm_id *cm_id,
+ struct ib_cm_event *event)
{
struct ipoib_cm_tx *tx = cm_id->context;
struct ipoib_dev_priv *priv = netdev_priv(tx->dev);
@@ -960,7 +964,7 @@
}
}
-void ipoib_cm_tx_start(struct work_struct *work)
+static void ipoib_cm_tx_start(struct work_struct *work)
{
struct ipoib_dev_priv *priv =
container_of(work, struct ipoib_dev_priv, cm.start_task);
@@ -1003,7 +1007,7 @@
spin_unlock_irqrestore(&priv->tx_lock, flags);
}
-void ipoib_cm_tx_reap(struct work_struct *work)
+static void ipoib_cm_tx_reap(struct work_struct *work)
{
struct ipoib_dev_priv *priv =
container_of(work, struct ipoib_dev_priv, cm.reap_task);
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [-mm patch] infiniband/ulp/ipoib/ipoib_cm.c: make functions static
2006-12-29 2:10 ` [-mm patch] infiniband/ulp/ipoib/ipoib_cm.c: make functions static Adrian Bunk
@ 2006-12-29 5:39 ` Michael S. Tsirkin
0 siblings, 0 replies; 13+ messages in thread
From: Michael S. Tsirkin @ 2006-12-29 5:39 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Andrew Morton, rolandd, linux-kernel, openib-general
> Quoting Adrian Bunk <bunk@stusta.de>:
> Subject: [-mm patch] infiniband/ulp/ipoib/ipoib_cm.c: make functions static
>
> On Thu, Dec 28, 2006 at 02:42:37AM -0800, Andrew Morton wrote:
> >...
> > Changes since 2.6.20-rc1-mm1:
> >...
> > git-infiniband.patch
> >...
> > git trees
> >...
>
>
> This patch makes some needlessly global functions static.
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Thanks, I'll put this in my tree.
--
MST
^ permalink raw reply [flat|nested] 13+ messages in thread
* [-mm patch] make usbvision_rvfree() static
2006-12-28 10:42 2.6.20-rc2-mm1 Andrew Morton
` (3 preceding siblings ...)
2006-12-29 2:10 ` [-mm patch] infiniband/ulp/ipoib/ipoib_cm.c: make functions static Adrian Bunk
@ 2006-12-29 2:10 ` Adrian Bunk
2006-12-29 2:10 ` [-mm patch] drivers/mtd/ubi/vtbl.c: make 2 functions static Adrian Bunk
2006-12-29 11:05 ` [-mm patch] add KM_SKB_DATA_SOFTIRQ to kmap_atomic debugging Frederik Deweerdt
6 siblings, 0 replies; 13+ messages in thread
From: Adrian Bunk @ 2006-12-29 2:10 UTC (permalink / raw)
To: Andrew Morton, mchehab; +Cc: linux-kernel, v4l-dvb-maintainer
On Thu, Dec 28, 2006 at 02:42:37AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.20-rc1-mm1:
>...
> git-dvb.patch
>...
> git trees
>...
usbvision_rvfree() can now become static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.20-rc2-mm1/drivers/media/video/usbvision/usbvision.h.old 2006-12-29 01:44:37.000000000 +0100
+++ linux-2.6.20-rc2-mm1/drivers/media/video/usbvision/usbvision.h 2006-12-29 01:44:43.000000000 +0100
@@ -486,7 +486,6 @@
void call_i2c_clients(struct usb_usbvision *usbvision, unsigned int cmd,void *arg);
/* defined in usbvision-core.c */
-void usbvision_rvfree(void *mem, unsigned long size);
int usbvision_read_reg(struct usb_usbvision *usbvision, unsigned char reg);
int usbvision_write_reg(struct usb_usbvision *usbvision, unsigned char reg,
unsigned char value);
--- linux-2.6.20-rc2-mm1/drivers/media/video/usbvision/usbvision-core.c.old 2006-12-29 01:44:50.000000000 +0100
+++ linux-2.6.20-rc2-mm1/drivers/media/video/usbvision/usbvision-core.c 2006-12-29 01:44:59.000000000 +0100
@@ -139,7 +139,7 @@
return mem;
}
-void usbvision_rvfree(void *mem, unsigned long size)
+static void usbvision_rvfree(void *mem, unsigned long size)
{
unsigned long adr;
^ permalink raw reply [flat|nested] 13+ messages in thread* [-mm patch] drivers/mtd/ubi/vtbl.c: make 2 functions static
2006-12-28 10:42 2.6.20-rc2-mm1 Andrew Morton
` (4 preceding siblings ...)
2006-12-29 2:10 ` [-mm patch] make usbvision_rvfree() static Adrian Bunk
@ 2006-12-29 2:10 ` Adrian Bunk
2006-12-29 11:05 ` [-mm patch] add KM_SKB_DATA_SOFTIRQ to kmap_atomic debugging Frederik Deweerdt
6 siblings, 0 replies; 13+ messages in thread
From: Adrian Bunk @ 2006-12-29 2:10 UTC (permalink / raw)
To: Andrew Morton, Artem Bityutskiy, dwmw2; +Cc: linux-kernel, linux-mtd
On Thu, Dec 28, 2006 at 02:42:37AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.20-rc1-mm1:
>...
> git-ubi.patch
>...
> git trees
>...
This patch makes two needlessly global functions static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/mtd/ubi/vtbl.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- linux-2.6.20-rc2-mm1/drivers/mtd/ubi/vtbl.c.old 2006-12-29 01:52:47.000000000 +0100
+++ linux-2.6.20-rc2-mm1/drivers/mtd/ubi/vtbl.c 2006-12-29 01:53:30.000000000 +0100
@@ -178,8 +178,8 @@
return 0;
}
-const struct ubi_vtbl_vtr *get_ivol_vtr(const struct ubi_info *ubi,
- int vol_id);
+static const struct ubi_vtbl_vtr *get_ivol_vtr(const struct ubi_info *ubi,
+ int vol_id);
const struct ubi_vtbl_vtr *ubi_vtbl_get_vtr(const struct ubi_info *ubi,
int vol_id)
@@ -237,7 +237,7 @@
static void __exit free_volume_info(const struct ubi_info *ubi);
-void __init init_ivols(struct ubi_info *ubi);
+static void __init init_ivols(struct ubi_info *ubi);
int __init ubi_vtbl_init_scan(struct ubi_info *ubi, struct ubi_scan_info *si)
{
@@ -778,7 +778,7 @@
* This function initializes information about internal UBI volumes. This
* information is not stored on flash but instead, is kept only in RAM.
*/
-void __init init_ivols(struct ubi_info *ubi)
+static void __init init_ivols(struct ubi_info *ubi)
{
struct ubi_vtbl_vtr *vtr;
struct ubi_vtbl_info *vtbl = ubi->vtbl;
@@ -818,8 +818,8 @@
* This function returns a pointer to the volume tabe record. The @vol_id must
* be correct.
*/
-const struct ubi_vtbl_vtr *get_ivol_vtr(const struct ubi_info *ubi,
- int vol_id)
+static const struct ubi_vtbl_vtr *get_ivol_vtr(const struct ubi_info *ubi,
+ int vol_id)
{
ubi_assert(ubi_is_ivol(vol_id));
return &ubi->vtbl->ivol_vtrs[vol_id - UBI_INTERNAL_VOL_START];
^ permalink raw reply [flat|nested] 13+ messages in thread* [-mm patch] add KM_SKB_DATA_SOFTIRQ to kmap_atomic debugging
2006-12-28 10:42 2.6.20-rc2-mm1 Andrew Morton
` (5 preceding siblings ...)
2006-12-29 2:10 ` [-mm patch] drivers/mtd/ubi/vtbl.c: make 2 functions static Adrian Bunk
@ 2006-12-29 11:05 ` Frederik Deweerdt
6 siblings, 0 replies; 13+ messages in thread
From: Frederik Deweerdt @ 2006-12-29 11:05 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
On Thu, Dec 28, 2006 at 02:42:37AM -0800, Andrew Morton wrote:
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.20-rc2/2.6.20-rc2-mm1/
>
Andrew,
The kmap_atomic-debugging patch checks twice for (type !=
KM_SKB_SUNRPC_DATA). The right check would be to look for
KM_SKB_DATA_SOFTIRQ, as added by the following patch. I've read the
mail, in which you mentioned that you spotted a copy-n-paste error in
kmap_atomic, I suppose that you refered to this, but just in case...
Regards,
Frederik
Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
diff --git a/arch/i386/mm/highmem.c b/arch/i386/mm/highmem.c
index 1344c98..51e4205 100644
--- a/arch/i386/mm/highmem.c
+++ b/arch/i386/mm/highmem.c
@@ -46,7 +46,7 @@ void *kmap_atomic(struct page *page, enum km_type type)
if (type != KM_IRQ0 && type != KM_IRQ1 &&
type != KM_SOFTIRQ0 && type != KM_SOFTIRQ1 &&
type != KM_SKB_SUNRPC_DATA &&
- type != KM_SKB_SUNRPC_DATA) {
+ type != KM_SKB_DATA_SOFTIRQ) {
WARN_ON(1);
warn_count--;
}
^ permalink raw reply related [flat|nested] 13+ messages in thread