Re: sys_semget()
Ratna Manoj Bolla <[email protected]>
| Newsgroups | gmane.linux.cluster.openmosix.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Iam getting runtime error because of the following extra code in
mm/mmap.c in 2.4.30.
line no:1320: ( And this part of code is not there in 2.4.26 )
-------------------------------------------------------------------
/*
* mm->mmap_sem is required to protect against another thread
* changing the mappings while we sleep (on kmalloc for one).
*/
verify_mmap_write_lock_held(mm);
--------------------------------------------------------------------
The error occured when it got called by set_brk() in hpc/alternate.c (It
supposed to take mm semaphore before calling do_brk() but it is not ! )
What i shoud do ? (I did the remaining things .. transferred my changes to
2.4.30 !)
Please check it by configuaring for Intel(I386) with support for a.out
binaries.
-Ratna
On Thu, 1 Jun 2006, William Rizzo wrote:
> OK Ratna,
>
> Great!
>
> 2006/6/1, Ratna Manoj Bolla <[email protected]>:
>>
>>
>> Sorry for the late ! I will send the patch by tommarrow
>> evening(2.6.06,5:00 pm)
>>
>> -Ratna
>>
>> On Thu, 1 Jun 2006, William Rizzo wrote:
>>
>> > yes it is
>> >
>> > 2006/6/1, Ratna Manoj Bolla <[email protected]>:
>> >>
>> >>
>> >> ya , after mrproper ... configure with "make menuconging" .. go to
>> >> "Generel setup" and see "kernel support for a.out binaries" option.
>> >>
>> >> is it("kernel support for a.out binaries") included in your
>> configuaration
>> >> ?
>> >>
>> >> -Ratna.
>> >>
>> >> On Thu, 1 Jun 2006, William Rizzo wrote:
>> >>
>> >> > i don't think so.
>> >> > Before the diff process, generally i run a "make mrproper".
>> >> >
>> >> > 2006/6/1, Ratna Manoj Bolla <[email protected]>:
>> >> >>
>> >> >>
>> >> >>
>> >> >> while configuaring the kernel (make menuconfig) the following
>> option.
>> >> >>
>> >> >> -Generl setup
>> >> >> -Kernel support for a.out binaries (this option)
>> >> >>
>> >> >> -Ratna
>> >> >>
>> >> >> On Thu, 1 Jun 2006, William Rizzo wrote:
>> >> >>
>> >> >> > What you mean?
>> >> >> >
>> >> >> > 2006/5/31, Ratna Manoj Bolla <[email protected]>:
>> >> >> >>
>> >> >> >>
>> >> >> >> I think you disabled CONFIG_BINFMT_AOUT in kernel configuaration
>> ?
>> >> >> >>
>> >> >> >> -Ratna
>> >> >> >>
>> >> >> >> On Wed, 31 May 2006, William Rizzo wrote:
>> >> >> >>
>> >> >> >> > Yes!...
>> >> >> >> > I missed that part of code during the 2.4.29->2.4.30 porting
>> >> process.
>> >> >> >> >
>> >> >> >> > 2006/5/31, William Rizzo <[email protected]>:
>> >> >> >> >>
>> >> >> >> >> Ugh!....sorry again.
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> 2006/5/31, Ratna Manoj Bolla <[email protected]>:
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > No.. No .. its all part of it.
>> >> >> >> >> >
>> >> >> >> >> > hpc/alternate.c is an automatically generated file(see the 1
>> st
>> >> >> line
>> >> >> >> in
>> >> >> >> >> > the file).
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > It is missing the following peace of code!
>> >> >> >> >> >
>> >> >> >> >> > static void set_brk(unsigned long start, unsigned long end)
>> >> >> >> >> > {
>> >> >> >> >> > start = PAGE_ALIGN(start);
>> >> >> >> >> > end = PAGE_ALIGN(end);
>> >> >> >> >> > if (end <= start)
>> >> >> >> >> > return;
>> >> >> >> >> > do_brk(start, end - start);
>> >> >> >> >> > }
>> >> >> >> >> >
>> >> >> >> >> > and i added it manually !
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > -Ratna
>> >> >> >> >> >
>> >> >> >> >> > On Wed, 31 May 2006, William Rizzo wrote:
>> >> >> >> >> >
>> >> >> >> >> > > you're right....alternate.c is not in the
>> 2.4.26....i'mgoing
>> >> to
>> >> >> >> see
>> >> >> >> >> > what
>> >> >> >> >> > > happened....
>> >> >> >> >> > > sorry for your loss of time
>> >> >> >> >> > >
>> >> >> >> >> > > 2006/5/31, William Rizzo < [email protected]>:
>> >> >> >> >> > >>
>> >> >> >> >> > >> it should be....i didn't made that....
>> >> >> >> >> > >>
>> >> >> >> >> > >>
>> >> >> >> >> > >> 2006/5/31, Ratna Manoj Bolla < [email protected]>:
>> >> >> >> >> > >> >
>> >> >> >> >> > >> >
>> >> >> >> >> > >> > I686 (intel)
>> >> >> >> >> > >> >
>> >> >> >> >> > >> > -Ratna
>> >> >> >> >> > >> >
>> >> >> >> >> > >> >
>> >> >> >> >> > >> > On Wed, 31 May 2006, William Rizzo wrote:
>> >> >> >> >> > >> >
>> >> >> >> >> > >> > > ok.
>> >> >> >> >> > >> > > i'll work on it...i'll test it on different
>> >> >> systems...what's
>> >> >> >> your
>> >> >> >> >> > >> > > environment?
>> >> >> >> >> > >> > >
>> >> >> >> >> > >> > > 2006/5/31, Ratna Manoj Bolla < [email protected]>:
>> >> >> >> >> > >> > >>
>> >> >> >> >> > >> > >>
>> >> >> >> >> > >> > >> yes it is giving linker error !
>> >> >> >> >> > >> > >>
>> >> >> >> >> > >> > >> /root/2.4.30/linux- 2.4.30/hpc/hpc.o(.text+0x6e7):
>> In
>> >> >> >> function
>> >> >> >> >> > >> > >> `aout_remote_init_mm':
>> >> >> >> >> > >> > >> : undefined reference to `set_brk'
>> >> >> >> >> > >> > >> make: *** [vmlinux] Error 1
>> >> >> >> >> > >> > >>
>> >> >> >> >> > >> > >> -Ratna
>> >> >> >> >> > >> > >>
>> >> >> >> >> > >> > >> On Wed, 31 May 2006, William Rizzo wrote:
>> >> >> >> >> > >> > >>
>> >> >> >> >> > >> > >> > Yes, it works.
>> >> >> >> >> > >> > >> > Did you experienced some problem?
>> >> >> >> >> > >> > >> >
>> >> >> >> >> > >> > >> > 2006/5/31, Ratna Manoj Bolla <[email protected]
>> >:
>> >> >> >> >> > >> > >> >>
>> >> >> >> >> > >> > >> >>
>> >> >> >> >> > >> > >> >> Did you compile it(2.4.30) ? did it run fine ?
>> >> >> >> >> > >> > >> >>
>> >> >> >> >> > >> > >> >> -Ratna
>> >> >> >> >> > >> > >> >>
>> >> >> >> >> > >> > >> >> On Wed, 31 May 2006, William Rizzo wrote:
>> >> >> >> >> > >> > >> >>
>> >> >> >> >> > >> > >> >> > OK Ratna...
>> >> >> >> >> > >> > >> >> > I don't want to stress you...just ask :)
>> >> >> >> >> > >> > >> >> >
>> >> >> >> >> > >> > >> >> > William
>> >> >> >> >> > >> > >> >> >
>> >> >> >> >> > >> > >> >> > 2006/5/31, Ratna Manoj Bolla <
>> [email protected]
>> >> >:
>> >> >> >> >> > >> > >> >> >>
>> >> >> >> >> > >> > >> >> >>
>> >> >> >> >> > >> > >> >> >> I am trying hard for that and iam little busy
>> >> with
>> >> >> my
>> >> >> >> >> > >> m.techreport.
>> >> >> >> >> > >> > >> >> >> I am trying to complete it by 12:00 pm
>> tommarrow.
>> >> >> >> >> > >> > >> >> >> -Ratna.
>> >> >> >> >> > >> > >> >> >>
>> >> >> >> >> > >> > >> >> >> On Wed, 31 May 2006, William Rizzo wrote:
>> >> >> >> >> > >> > >> >> >>
>> >> >> >> >> > >> > >> >> >> > Hi Ratna,
>> >> >> >> >> > >> > >> >> >> >
>> >> >> >> >> > >> > >> >> >> > Are you planning to send me something within
>> >> >> >> tomorrow?
>> >> >> >> >> > >> > >> >> >> >
>> >> >> >> >> > >> > >> >> >> > I'm just asking 'cause within tomorrow and
>> >> sunday
>> >> >> i'm
>> >> >> >> >> > going
>> >> >> >> >> > >> > to
>> >> >> >> >> > >> > >> work
>> >> >> >> >> > >> > >> >> on
>> >> >> >> >> > >> > >> >> >> the
>> >> >> >> >> > >> > >> >> >> > patch....but of course i can wait if you
>> need.
>> >> >> >> >> > >> > >> >> >> > let me know.
>> >> >> >> >> > >> > >> >> >> >
>> >> >> >> >> > >> > >> >> >> > William
>> >> >> >> >> > >> > >> >> >> >
>> >> >> >> >> > >> > >> >> >> > 2006/5/30, Ratna Manoj Bolla <
>> >> [email protected]
>> >> >> >:
>> >> >> >> >> > >> > >> >> >> >>
>> >> >> >> >> > >> > >> >> >> >>
>> >> >> >> >> > >> > >> >> >> >> ya, i will and i started working !
>> >> >> >> >> > >> > >> >> >> >>
>> >> >> >> >> > >> > >> >> >> >>
>> >> >> >> >> > >> > >> >> >> >> -Ratna
>> >> >> >> >> > >> > >> >> >> >>
>> >> >> >> >> > >> > >> >> >> >> On Tue, 30 May 2006, William Rizzo wrote:
>> >> >> >> >> > >> > >> >> >> >>
>> >> >> >> >> > >> > >> >> >> >> > ops!...the patch
>> >> >> >> >> > >> > >> >> >> >> >
>> >> >> >> >> > >> > >> >> >> >> > william
>> >> >> >> >> > >> > >> >> >> >> >
>> >> >> >> >> > >> > >> >> >> >> > 2006/5/30, William Rizzo <
>> >> >> [email protected]
>> >> >> >> >:
>> >> >> >> >> > >> > >> >> >> >> >>
>> >> >> >> >> > >> > >> >> >> >> >> Hi Ratna,
>> >> >> >> >> > >> > >> >> >> >> >>
>> >> >> >> >> > >> > >> >> >> >> >> Yesterday eavening i ported OM and your
>> >> patch
>> >> >> to
>> >> >> >> the
>> >> >> >> >> >
>> >> >> >> >> > >> > 2.4.30...
>> >> >> >> >> > >> > >> .
>> >> >> >> >> > >> > >> >> >> >> >> At attachment you'll find a working
>> >> >> >> 2.4.30patch...
>> >> >> >> >> > >> > >> >> >> >> >>
>> >> >> >> >> > >> > >> >> >> >> >> Can you work on that?
>> >> >> >> >> > >> > >> >> >> >> >>
>> >> >> >> >> > >> > >> >> >> >> >> If you insert all the code for
>> >> select/deselect
>> >> >> >> the
>> >> >> >> >> > Migshm
>> >> >> >> >> > >> >
>> >> >> >> >> > >> > >> patch,
>> >> >> >> >> > >> > >> >> i
>> >> >> >> >> > >> > >> >> >> can
>> >> >> >> >> > >> > >> >> >> >> >> port all to the 2.4.32 for tomorrow or
>> Max
>> >> for
>> >> >> >> Thue.
>> >> >> >> >> >
>> >> >> >> >> > >> > >> >> >> >> >>
>> >> >> >> >> > >> > >> >> >> >> >> Cheers,
>> >> >> >> >> > >> > >> >> >> >> >> William
>> >> >> >> >> > >> > >> >> >> >> >>
>> >> >> >> >> > >> > >> >> >> >> >> 2006/5/30, Ratna Manoj Bolla <
>> >> >> >> [email protected]>:
>> >> >> >> >> > >> > >> >> >> >> >>
>> >> >> >> >> > >> > >> >> >> >> >> >
>> >> >> >> >> > >> > >> >> >> >> >> > Hi,
>> >> >> >> >> > >> > >> >> >> >> >> > I got a doubt while debugging for my
>> >> patch.
>> >> >> >> >> > >> > >> >> >> >> >> >
>> >> >> >> >> > >> > >> >> >> >> >> > please see at line no 1257 below !.
>> (this
>> >> >> from
>> >> >> >> >> > >> > fs/inode.c)
>> >> >> >> >> > >> > >> >> >> >> >> >
>> >> >> >> >> > >> > >> >> >> >> >> > void iput(struct inode *inode)
>> >> >> >> >> > >> > >> >> >> >> >> > 1209 {
>> >> >> >> >> > >> > >> >> >> >> >> > 1210 if (inode) {
>> >> >> >> >> > >> > >> >> >> >> >> > 1211 struct
>> super_block
>> >> *sb
>> >> >> =
>> >> >> >> >> > >> > inode->i_sb;
>> >> >> >> >> > >> > >> >> >> >> >> > 1212 struct
>> >> super_operations
>> >> >> >> *op =
>> >> >> >> >> >
>> >> >> >> >> > >> > NULL;
>> >> >> >> >> > >> > >> >> >> >> >> > 1213
>> >> >> >> >> > >> > >> >> >> >> >> > 1214 if
>> (inode->i_state
>> >> ==
>> >> >> >> >> > I_CLEAR)
>> >> >> >> >> > >> > >> >> >> >> >> > 1215 BUG();
>> >> >> >> >> > >> > >> >> >> >> >> > 1216
>> >> >> >> >> > >> > >> >> >> >> >> > 1217 if (sb &&
>> sb->s_op)
>> >> >> >> >> > >> > >> >> >> >> >> > 1218 op =
>> >> sb->s_op;
>> >> >> >> >> > >> > >> >> >> >> >> > 1219 if (op &&
>> >> >> op->put_inode)
>> >> >> >> >> > >> > >> >> >> >> >> > 1220
>> >> >> >> op->put_inode(inode);
>> >> >> >> >> > >> > >> >> >> >> >> > 1221
>> >> >> >> >> > >> > >> >> >> >> >> > 1222 if
>> >> >> >> >> > >> > >> (!atomic_dec_and_lock(&inode->i_count,
>> >> >> >> >> > >> > >> >> >> >> >> > &inode_lock))
>> >> >> >> >> > >> > >> >> >> >> >> > 1223 return;
>> >> >> >> >> > >> > >> >> >> >> >> > 1224
>> >> >> >> >> > >> > >> >> >> >> >> > 1225 if
>> (!inode->i_nlink)
>> >> {
>> >> >> >> >> > >> > >> >> >> >> >> > 1226
>> >> >> >> >> > list_del(&inode->i_list);
>> >> >> >> >> > >> > >> >> >> >> >> > 1227
>> >> >> >> >> > >> > INIT_LIST_HEAD(&inode->i_list);
>> >> >> >> >> > >> > >> >> >> >> >> > 1228
>> >> >> >> >> > inode->i_state|=I_FREEING;
>> >> >> >> >> > >> > >> >> >> >> >> > 1229
>> >> >> >> >> > inodes_stat.nr_inodes--;
>> >> >> >> >> > >> > >> >> >> >> >> > 1230
>> >> >> >> >> > spin_unlock(&inode_lock);
>> >> >> >> >> > >> > >> >> >> >> >> > 1231
>> >> >> >> >> > >> > >> >> >> >> >> > 1232 if
>> >> >> >> >> > (inode->i_data.nrpages)
>> >> >> >> >> > >> >
>> >> >> >> >> > >> > >> >> >> >> >> > 1233
>> >> >> >> >> > >> > >> >> >> >> >> > truncate_inode_pages(&inode->i_data,
>> 0);
>> >> >> >> >> > >> > >> >> >> >> >> > 1234
>> >> >> >> >> > >> > >> >> >> >> >> > 1235 if (op &&
>> >> >> >> >> > >> > op->delete_inode) {
>> >> >> >> >> > >> > >> >> >> >> >> > 1236
>> void
>> >> >> >> >> > >> > (*delete)(struct
>> >> >> >> >> > >> > >> >> inode
>> >> >> >> >> > >> > >> >> >> *) =
>> >> >> >> >> > >> > >> >> >> >> >> > op->delete_inode;
>> >> >> >> >> > >> > >> >> >> >> >> > 1237
>> if
>> >> >> >> >> > >> > >> (!is_bad_inode(inode))
>> >> >> >> >> > >> > >> >> >> >> >> > 1238
>> >> >> >> >> > >> > >> DQUOT_INIT(inode);
>> >> >> >> >> > >> > >> >> >> >> >> > 1239
>> /*
>> >> >> >> >> > >> > s_op->delete_inode
>> >> >> >> >> > >> > >> >> >> internally
>> >> >> >> >> > >> > >> >> >> >> >> > recalls clear_inode() */
>> >> >> >> >> > >> > >> >> >> >> >> > 1240
>> >> >> >> >> > delete(inode);
>> >> >> >> >> > >> > >> >> >> >> >> > 1241 } else
>> >> >> >> >> > >> > >> >> >> >> >> > 1242
>> >> >> >> >> > >> > clear_inode(inode);
>> >> >> >> >> > >> > >> >> >> >> >> > 1243
>> >> >> >> >> > spin_lock(&inode_lock);
>> >> >> >> >> > >> > >> >> >> >> >> > 1244
>> >> >> >> >> > list_del(&inode->i_hash);
>> >> >> >> >> > >> > >> >> >> >> >> > 1245
>> >> >> >> >> > >> > INIT_LIST_HEAD(&inode->i_hash);
>> >> >> >> >> > >> > >> >> >> >> >> > 1246
>> >> >> >> >> > spin_unlock(&inode_lock);
>> >> >> >> >> > >> > >> >> >> >> >> > 1247
>> >> >> >> >> > wake_up(&inode->i_wait);
>> >> >> >> >> > >> > >> >> >> >> >> > 1248 if
>> >> >> (inode->i_state
>> >> >> >> !=
>> >> >> >> >> > >> > I_CLEAR)
>> >> >> >> >> > >> > >> >> >> >> >> > 1249
>> >> BUG();
>> >> >> >> >> > >> > >> >> >> >> >> > 1250 } else {
>> >> >> >> >> > >> > >> >> >> >> >> > 1251 if
>> >> >> >> >> > >> > >> (!list_empty(&inode->i_hash)) {
>> >> >> >> >> > >> > >> >> >> >> >> > 1252
>> if
>> >> >> >> >> > >> > (!(inode->i_state
>> >> >> >> >> > >> > >> >> >> >> >> > & (I_DIRTY|I_LOCK)))
>> >> >> >> >> > >> > >> >> >> >> >> > 1253
>> >> >> >> >> > >> > >> >> >> __refile_inode(inode);
>> >> >> >> >> > >> > >> >> >> >> >> > 1254
>> >> >> >> >> > >> > >> inodes_stat.nr_unused++;
>> >> >> >> >> > >> > >> >> >> >> >> > 1255
>> >> >> >> >> > >> > >> spin_unlock(&inode_lock);
>> >> >> >> >> > >> > >> >> >> >> >> > 1256
>> if
>> >> (!sb
>> >> >> ||
>> >> >> >> >> > >> > (sb->s_flags
>> >> >> >> >> > >> > >> &
>> >> >> >> >> > >> > >> >> >> >> >> > MS_ACTIVE))
>> >> >> >> >> > >> > >> >> >> >> >> > 1257
>> >> >> >> >> > return;
>> >> >> >> >> > >> > >> >> >> >> >> >
>> >> >> >> >> > >> > >> >> >> >> >> >
>> >> >> >> >> > >> > >> >> >> >> >> > Can any body tell what happens if
>> >> somebody
>> >> >> >> takes a
>> >> >> >> >> >
>> >> >> >> >> > >> > reference
>> >> >> >> >> > >> > >> to
>> >> >> >> >> > >> > >> >> >> this
>> >> >> >> >> > >> > >> >> >> >> >> > inode
>> >> >> >> >> > >> > >> >> >> >> >> > with iget() ? [inode has not been
>> deleted
>> >> >> from
>> >> >> >> >> > hash
>> >> >> >> >> > >> > list
>> >> >> >> >> > >> > >> ....
>> >> >> >> >> > >> > >> >> even
>> >> >> >> >> > >> > >> >> >> if
>> >> >> >> >> > >> > >> >> >> >> >> > some
>> >> >> >> >> > >> > >> >> >> >> >> > body took reference here the inode
>> will
>> >> be
>> >> >> >> cleared
>> >> >> >> >> > for
>> >> >> >> >> > >> > sure
>> >> >> >> >> > >> > >> ..
>> >> >> >> >> > >> > >> >> >> >> who(lock
>> >> >> >> >> > >> > >> >> >> >> >> > or
>> >> >> >> >> > >> > >> >> >> >> >> > semaphore) ensure that this will not
>> >> heppen
>> >> >> ?]
>> >> >> >> >> > >> > >> >> >> >> >> >
>> >> >> >> >> > >> > >> >> >> >> >> >
>> >> >> >> >> > >> > >> >> >> >> >> > 1258
>> >> >> >> >> > >> > write_inode_now(inode,
>> >> >> >> >> > >> > >> 1);
>> >> >> >> >> > >> > >> >> >> >> >> > 1259
>> >> >> >> >> > >> > spin_lock(&inode_lock);
>> >> >> >> >> > >> > >> >> >> >> >> > 1260
>> >> >> >> >> > >> > >> inodes_stat.nr_unused--;
>> >> >> >> >> > >> > >> >> >> >> >> > 1261
>> >> >> >> >> > >> > >> >> >> list_del_init(&inode->i_hash);
>> >> >> >> >> > >> > >> >> >> >> >> > 1262 }
>> >> >> >> >> > >> > >> >> >> >> >> > 1263
>> >> >> >> >> > >> > list_del_init(&inode->i_list);
>> >> >> >> >> > >> > >> >> >> >> >> > 1264
>> >> >> >> >> > inode->i_state|=I_FREEING;
>> >> >> >> >> > >> >
>> >> >> >> >> > >> > >> >> >> >> >> > 1265
>> >> >> >> >> > inodes_stat.nr_inodes--;
>> >> >> >> >> > >> > >> >> >> >> >> > 1266
>> >> >> >> >> > spin_unlock(&inode_lock);
>> >> >> >> >> > >> > >> >> >> >> >> > 1267 if
>> >> >> >> >> > (inode->i_data.nrpages)
>> >> >> >> >> > >> > >> >> >> >> >> > 1268
>> >> >> >> >> > >> > >> >> >> >> >> > truncate_inode_pages(&inode->i_data,
>> 0);
>> >> >> >> >> > >> > >> >> >> >> >> > 1269
>> >> >> >> clear_inode(inode);
>> >> >> >> >> > >> > >> >> >> >> >> > 1270 }
>> >> >> >> >> > >> > >> >> >> >> >> > 1271
>> >> destroy_inode(inode);
>> >> >> >> >> > >> > >> >> >> >> >> > 1272 }
>> >> >> >> >> > >> > >> >> >> >> >> > 1273 }
>> >> >> >> >> > >> > >> >> >> >> >> >
>> >> >> >> >> > >> > >> >> >> >> >> >
>> >> >> >> >> > >> > >> >> >> >> >>
>> >> >> >> >> > >> > >> >> >> >> >
>> >> >> >> >> > >> > >> >> >> >>
>> >> >> >> >> > >> > >> >> >> >
>> >> >> >> >> > >> > >> >> >>
>> >> >> >> >> > >> > >> >> >
>> >> >> >> >> > >> > >> >>
>> >> >> >> >> > >> > >> >
>> >> >> >> >> > >> > >>
>> >> >> >> >> > >> > >
>> >> >> >> >> > >> >
>> >> >> >> >> > >>
>> >> >> >> >> > >>
>> >> >> >> >> > >
>> >> >> >> >> >
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >
>> >> >> >>
>> >> >> >
>> >> >>
>> >> >
>> >>
>> >
>>
>