Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: dev-libs/opencryptoki/files/opencryptoki-2.2.8-steal_shmem.patch

Issue 2471003: Make pkcsslotd grab the shared memory it needs, even if it wasnt freed by a previous instance (Closed) Base URL: ssh://git@chromiumos-git//chromiumos-overlay.git
Patch Set: Move logging a bit Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | dev-libs/opencryptoki/opencryptoki-2.2.8.ebuild » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 diff -Naur opencryptoki-2.2.8.orig/usr/sbin/pkcsslotd/shmem.c opencryptoki-2.2.8 /usr/sbin/pkcsslotd/shmem.c
2 --- opencryptoki-2.2.8.orig/usr/sbin/pkcsslotd/shmem.c 2010-06-02 09:18:27.0000 00000 -0700
3 +++ opencryptoki-2.2.8/usr/sbin/pkcsslotd/shmem.c 2010-06-02 10:56:42.0000 00000 -0700
4 @@ -374,10 +374,20 @@
5
6
7 if ( shmid < 0 ) {
8 - ErrLog(SLOTD_MSG(SHMEMCR,
9 - "Shared memory creation failed (0x%X)\n"), errno);
10 - ErrLog(SLOTD_MSG(IPCRM, "perform ipcrm -M 0x%X\n"), tok);
11 - return FALSE;
12 + ErrLog(SLOTD_MSG(SHMEMCR,
13 + "Shared memory creation failed (0x%X)\n"), errno);
14 + ErrLog(SLOTD_MSG(SHMEMCR, "Reclaiming 0x%X\n"), tok);
15 + shmid = shmget( tok, sizeof( Slot_Mgr_Shr_t ), 0 );
16 + DestroySharedMemory();
17 + shmid = shmget( tok, sizeof( Slot_Mgr_Shr_t ),
18 + IPC_CREAT | IPC_EXCL | S_IRUSR |
19 + S_IRGRP | S_IWUSR | S_IWGRP );
20 + if ( shmid < 0 ) {
21 + ErrLog(SLOTD_MSG(SHMEMCR,
22 + "Shared memory reclamation failed (0x%X)\n"), errno) ;
23 + ErrLog(SLOTD_MSG(IPCRM, "perform ipcrm -M 0x%X\n"), tok);
24 + return FALSE;
25 + }
26 }
27
28 // SAB Set the group ownership of the shared mem segment..
29 @@ -704,4 +714,3 @@
30
31
32 }
33 -
Will Drewry 2010/06/02 18:37:06 looks like you dropped an empty line down here.
OLDNEW
« no previous file with comments | « no previous file | dev-libs/opencryptoki/opencryptoki-2.2.8.ebuild » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698