Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
e909925e
Commit
e909925e
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 2.3.48pre4
parent
29462279
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
11 deletions
+52
-11
arch/i386/kernel/mpparse.c
arch/i386/kernel/mpparse.c
+1
-1
fs/partitions/check.c
fs/partitions/check.c
+1
-0
fs/smbfs/sock.c
fs/smbfs/sock.c
+50
-10
No files found.
arch/i386/kernel/mpparse.c
View file @
e909925e
...
...
@@ -436,7 +436,7 @@ static int __init smp_scan_config (unsigned long base, unsigned long length)
smp_found_config
=
1
;
printk
(
"found SMP MP-table at %08lx
\n
"
,
virt_to_phys
(
mpf
));
reserve_bootmem
(
(
unsigned
long
)
mpf
,
PAGE_SIZE
);
reserve_bootmem
(
virt_to_phys
(
mpf
)
,
PAGE_SIZE
);
if
(
mpf
->
mpf_physptr
)
reserve_bootmem
(
mpf
->
mpf_physptr
,
PAGE_SIZE
);
mpf_found
=
mpf
;
...
...
fs/partitions/check.c
View file @
e909925e
...
...
@@ -404,6 +404,7 @@ void grok_partitions(struct gendisk *dev, int drive, unsigned minors, long size)
if
(
!
size
||
minors
==
1
)
return
;
blk_size
[
dev
->
major
]
=
NULL
;
check_partition
(
dev
,
MKDEV
(
dev
->
major
,
first_minor
),
1
+
first_minor
);
/*
...
...
fs/smbfs/sock.c
View file @
e909925e
...
...
@@ -15,6 +15,7 @@
#include <linux/net.h>
#include <linux/mm.h>
#include <linux/netdevice.h>
#include <linux/smp_lock.h>
#include <net/scm.h>
#include <net/ip.h>
...
...
@@ -79,13 +80,33 @@ _send(struct socket *socket, const void *buff, int len)
return
err
;
}
struct
data_callback
{
struct
tq_struct
cb
;
struct
sock
*
sk
;
};
/*
* N.B. What happens if we're in here when the socket closes??
*/
static
void
smb_data_callback
(
struct
sock
*
sk
,
int
len
)
found_data
(
struct
sock
*
sk
)
{
struct
socket
*
socket
=
sk
->
socket
;
/*
* FIXME: copied from sock_def_readable, it should be a call to
* server->data_ready() -- manfreds@colorfullife.com
*/
read_lock
(
&
sk
->
callback_lock
);
if
(
!
sk
->
dead
)
{
wake_up_interruptible
(
sk
->
sleep
);
sock_wake_async
(
sk
->
socket
,
1
,
POLL_IN
);
}
read_unlock
(
&
sk
->
callback_lock
);
}
static
void
smb_data_callback
(
void
*
ptr
)
{
struct
data_callback
*
job
=
ptr
;
struct
socket
*
socket
=
job
->
sk
->
socket
;
unsigned
char
peek_buf
[
4
];
int
result
;
mm_segment_t
fs
;
...
...
@@ -93,10 +114,11 @@ smb_data_callback(struct sock *sk, int len)
fs
=
get_fs
();
set_fs
(
get_ds
());
lock_kernel
();
while
(
1
)
{
result
=
-
EIO
;
if
(
sk
->
dead
)
if
(
job
->
sk
->
dead
)
{
#ifdef SMBFS_PARANOIA
printk
(
"smb_data_callback: sock dead!
\n
"
);
...
...
@@ -120,12 +142,30 @@ smb_data_callback(struct sock *sk, int len)
if
(
result
==
-
EAGAIN
)
break
;
}
unlock_kernel
();
set_fs
(
fs
);
if
(
result
!=
-
EAGAIN
)
{
wake_up_interruptible
(
sk
->
sleep
);
found_data
(
job
->
sk
);
kfree
(
ptr
);
}
static
void
smb_data_ready
(
struct
sock
*
sk
,
int
len
)
{
struct
data_callback
*
job
;
job
=
kmalloc
(
sizeof
(
struct
data_callback
),
GFP_ATOMIC
);
if
(
job
==
0
)
{
printk
(
"smb_data_ready(): lost SESSION KEEPALIVE due to OOM.
\n
"
);
found_data
(
sk
);
return
;
}
job
->
cb
.
next
=
NULL
;
job
->
cb
.
sync
=
0
;
job
->
cb
.
routine
=
smb_data_callback
;
job
->
cb
.
data
=
job
;
job
->
sk
=
sk
;
queue_task
(
&
job
->
cb
,
&
tq_scheduler
);
}
int
...
...
@@ -182,8 +222,8 @@ smb_catch_keepalive(struct smb_sb_info *server)
/*
* Install the callback atomically to avoid races ...
*/
data_ready
=
xchg
(
&
sk
->
data_ready
,
smb_data_
callback
);
if
(
data_ready
!=
smb_data_
callback
)
data_ready
=
xchg
(
&
sk
->
data_ready
,
smb_data_
ready
);
if
(
data_ready
!=
smb_data_
ready
)
{
server
->
data_ready
=
data_ready
;
error
=
0
;
...
...
@@ -232,10 +272,10 @@ smb_dont_catch_keepalive(struct smb_sb_info *server)
*/
data_ready
=
xchg
(
&
sk
->
data_ready
,
server
->
data_ready
);
server
->
data_ready
=
NULL
;
if
(
data_ready
!=
smb_data_
callback
)
if
(
data_ready
!=
smb_data_
ready
)
{
printk
(
"smb_dont_catch_keepalive: "
"sk->data_
callback != smb_data_callback
\n
"
);
"sk->data_
ready != smb_data_ready
\n
"
);
}
error
=
0
;
out:
...
...
@@ -256,7 +296,7 @@ smb_close_socket(struct smb_sb_info *server)
printk
(
"smb_close_socket: closing socket %p
\n
"
,
server_sock
(
server
));
#endif
#ifdef SMBFS_PARANOIA
if
(
server_sock
(
server
)
->
sk
->
data_ready
==
smb_data_
callback
)
if
(
server_sock
(
server
)
->
sk
->
data_ready
==
smb_data_
ready
)
printk
(
"smb_close_socket: still catching keepalives!
\n
"
);
#endif
server
->
sock_file
=
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment