* [PATCH] Random number driver: make random_ioctl as an unlocked_ioctl function
@ 2008-01-11 11:39 Nikanth Karthikesan
2008-01-11 14:01 ` Matthew Wilcox
2008-01-11 17:17 ` Matt Mackall
0 siblings, 2 replies; 3+ messages in thread
From: Nikanth Karthikesan @ 2008-01-11 11:39 UTC (permalink / raw)
To: mpm, linux-kernel, kernel-janitors
The random_ioctl is registered as an ioctl function but it does not
require BKL to be held when called. Changing it as an unlocked_ioctl
function.
Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
---
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 5fee056..2446e14 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1065,9 +1065,8 @@ random_write(struct file * file, const char __user * buffer,
return (ssize_t)count;
}
-static int
-random_ioctl(struct inode * inode, struct file * file,
- unsigned int cmd, unsigned long arg)
+static long
+random_ioctl(struct file * file, unsigned int cmd, unsigned long arg)
{
int size, ent_count;
int __user *p = (int __user *)arg;
@@ -1131,13 +1130,13 @@ const struct file_operations random_fops = {
.read = random_read,
.write = random_write,
.poll = random_poll,
- .ioctl = random_ioctl,
+ .unlocked_ioctl = random_ioctl,
};
const struct file_operations urandom_fops = {
.read = urandom_read,
.write = random_write,
- .ioctl = random_ioctl,
+ .unlocked_ioctl = random_ioctl,
};
/***************************************************************
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Random number driver: make random_ioctl as an unlocked_ioctl function
2008-01-11 11:39 [PATCH] Random number driver: make random_ioctl as an unlocked_ioctl function Nikanth Karthikesan
@ 2008-01-11 14:01 ` Matthew Wilcox
2008-01-11 17:17 ` Matt Mackall
1 sibling, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2008-01-11 14:01 UTC (permalink / raw)
To: Nikanth Karthikesan; +Cc: mpm, linux-kernel, kernel-janitors
On Fri, Jan 11, 2008 at 05:09:52PM +0530, Nikanth Karthikesan wrote:
> The random_ioctl is registered as an ioctl function but it does not
> require BKL to be held when called. Changing it as an unlocked_ioctl
> function.
>
> Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Acked-by: Matthew Wilcox <willy@linux.intel.com>
--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Random number driver: make random_ioctl as an unlocked_ioctl function
2008-01-11 11:39 [PATCH] Random number driver: make random_ioctl as an unlocked_ioctl function Nikanth Karthikesan
2008-01-11 14:01 ` Matthew Wilcox
@ 2008-01-11 17:17 ` Matt Mackall
1 sibling, 0 replies; 3+ messages in thread
From: Matt Mackall @ 2008-01-11 17:17 UTC (permalink / raw)
To: Nikanth Karthikesan; +Cc: linux-kernel, kernel-janitors
On Fri, 2008-01-11 at 17:09 +0530, Nikanth Karthikesan wrote:
> The random_ioctl is registered as an ioctl function but it does not
> require BKL to be held when called. Changing it as an unlocked_ioctl
> function.
>
> Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Looks good, but I've already got this queued.
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-01-11 17:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-11 11:39 [PATCH] Random number driver: make random_ioctl as an unlocked_ioctl function Nikanth Karthikesan
2008-01-11 14:01 ` Matthew Wilcox
2008-01-11 17:17 ` Matt Mackall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox