lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <47AC87CE.2060200@gmail.com>
Date:	Fri, 08 Feb 2008 17:48:14 +0100
From:	Jiri Olsa <olsajiri@...il.com>
To:	rubini@...vis.unipv.it
CC:	linux-kernel@...r.kernel.org
Subject: [PATCH] misc: ifdef KMOD, saving some bytes probably

found some code in misc.c that could be ifdef'ed for KMOD

Signed-off-by: Jiri Olsa <olsajiri@...il.com>
---
 drivers/char/misc.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index a39101f..3455b09 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -126,7 +126,8 @@ static int misc_open(struct inode * inode, struct file * file)
 			break;
 		}
 	}
-		
+
+#if defined(CONFIG_KMOD)
 	if (!new_fops) {
 		mutex_unlock(&misc_mtx);
 		request_module("char-major-%d-%d", MISC_MAJOR, minor);
@@ -141,6 +142,10 @@ static int misc_open(struct inode * inode, struct file * file)
 		if (!new_fops)
 			goto fail;
 	}
+#else
+	if (!new_fops)
+		goto fail;
+#endif
 
 	err = 0;
 	old_fops = file->f_op;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ