Skip to content

Instantly share code, notes, and snippets.

View kiryl's full-sized avatar

Kirill A. Shutemov kiryl

View GitHub Profile
typedef struct git_repository git_repository;
typedef struct git_reference git_reference;
extern int git__rethrow(int error, const char *, ...);
void git_path_join(char *buffer_out, const char *path_a, const char *path_b);
int git_reference_lookup(git_reference **reference_out, git_repository *repo, const char *name);
int git_reference_delete(git_reference *ref);
static int retrieve_tag_reference(git_reference **tag_reference_out, char *ref_name_out, git_repository *repo, const char *tag_name)
int error(void);
int baz(char **, const char *);
int quux(char *);
static int bar(char **out, const char *in)
{
char *t;
int err;
err = baz(&t, in);
diff -uNr tzdata2011j/europe tzdata/europe
--- tzdata2011j/europe 2011-08-17 19:52:01.000000000 +0300
+++ tzdata/europe 2011-09-17 02:22:20.675954688 +0300
@@ -689,6 +689,20 @@
1:00 EU CE%sT
# Belarus
+# From Kirill A. Shutemov (2011-09-17):
+# According to BelTA News Agency, Council of Ministers of the Republic of
+# Belarus signed decision #1229 on September 15, 2011
@kiryl
kiryl / gist:1308065
Created October 23, 2011 23:25
netdev
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
James Morris <jmorris@namei.org>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Patrick McHardy <kaber@trash.net>,
Greg Kroah-Hartman <gregkh@suse.de>,
Kay Sievers <kay.sievers@vrfy.org>,
Alexey Gladkov <gladkov.alexey@gmail.com>
(gdb) bt
#0 0x00007ffff423daa3 in st_lookup () from /usr/lib/libruby1.8.so.1.8
#1 0x00007fffed41ab82 in rb_intern3 () from /usr/lib/libruby-1.9.1.so.1.9
#2 0x00007fffed78c609 in Init_notmuch () at init.c:50
#3 0x00007ffff41cd815 in dln_load () from /usr/lib/libruby1.8.so.1.8
#4 0x00007ffff41edf5b in rb_require_safe () from /usr/lib/libruby1.8.so.1.8
#5 0x00007ffff41df842 in ?? () from /usr/lib/libruby1.8.so.1.8
#6 0x00007ffff41dfaef in ?? () from /usr/lib/libruby1.8.so.1.8
#7 0x00007ffff41e740b in ?? () from /usr/lib/libruby1.8.so.1.8
#8 0x00007ffff41eac03 in ?? () from /usr/lib/libruby1.8.so.1.8
[ 70.658592] WARNING: at /home/kas/git/public/linux/kernel/watchdog.c:241 watchdog_overflow_callback+0x9a/0xc0()
[ 70.658596] Hardware name: QSSC-S4R
[ 70.658597] Watchdog detected hard LOCKUP on cpu 15
[ 70.658599] Modules linked in: ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables sunrpc ioatdma coretemp tpm_tis igb asix i7core_edac crc32c_intel microcode i2c_i801 tpm usbnet edac_core iTCO_wdt mii dca pcspkr tpm_bios i2c_core iTCO_vendor_support uinput joydev megaraid_sas [last unloaded: scsi_wait_scan]
[ 70.658626] Pid: 523, comm: plymouthd Not tainted 3.4.0+ #49
[ 70.658629] Call Trace:
[ 70.658631] <NMI> [<ffffffff81056bff>] warn_slowpath_common+0x7f/0xc0
[ 70.658651] [<ffffffff81056cf6>] warn_slowpath_fmt+0x46/0x50
[ 70.658656] [<ffffffff810e9bba>] watchdog_overflow_callback+0x9a/0xc0
[ 70.658665] [<ffffffff81121ffc>] __perf_event_overflow+0x9c/0x260
#0 evaluate_server (cmdline=0x0) at ./nsupdate.c:1363
#1 do_next_command (cmdline=0x6c0477 "corpdns.intel.com") at ./nsupdate.c:1924
#2 get_next_command () at ./nsupdate.c:2021
#3 0x0000000000408c48 in user_interaction () at ./nsupdate.c:2035
#4 getinput (task=<optimized out>, event=<optimized out>) at ./nsupdate.c:2970
#5 0x00007ffff6f07d08 in dispatch (manager=<optimized out>) at task.c:1109
#6 isc__taskmgr_dispatch (manager0=<optimized out>) at task.c:1602
#7 0x00007ffff6f0a7c6 in isc__app_ctxrun (ctx0=ctx0@entry=0x7ffff712c2c0) at app.c:694
#8 0x00007ffff6f0abb8 in isc__app_run () at app.c:707
#9 0x000000000040af3f in main (argc=3, argv=0x7fffffffe478) at ./nsupdate.c:3002
static atomic_t huge_zero_refcount;
static unsigned long huge_zero_pfn __read_mostly;
struct page *huge_zero_page __read_mostly;
static void free_huge_zero_page(unsigned long dummy);
static DEFINE_TIMER(huge_zero_timer, free_huge_zero_page, 0, 0);
#define HUGE_ZERO_PAGE_FREE_DELAY (120 * HZ)
static inline bool is_huge_zero_pfn(unsigned long pfn)
{
unsigned long zero_pfn = ACCESS_ONCE(huge_zero_pfn);
#include <stdio.h>
#include <stdlib.h>
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
int main(int argc, char **argv)
{
int arr[20];
int i, r, max;
#include <fcntl.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#define NR 1000