linux/drivers
Julia Lawall 5dc474d6b3 pppol2tp: Remove null pointer dereference.
If session is NULL, it is not possible to access its name field.  So I
have split apart the printing of the error message to drop the
printing of the name field in this case.

The macro PRINTK actually only evaluates its arguments starting with
the third one if the bitwise conjunction of the first two is non-zero.
Normally, this conjunction would only be non-zero if debugging mode
were turned on, but when session is NULL, the first argument in both
the old and new code is -1, and thus the bitwise conjunction is true.
Perhaps a different strategy is desired, such as using tunnel->debug,
which session->debug is initialized to, but tunnel can also be NULL,
so this does not completely solve the problem.


This problem was found using the following semantic match
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression E, E1;
identifier f;
statement S1,S2,S3;
@@

* if (E == NULL)
{
  ... when != if (E == NULL) S1 else S2
      when != E = E1
* E->f
  ... when any
  return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-05-12 15:43:46 -07:00
..
accessibility Basic braille screen reader support 2008-04-30 08:29:52 -07:00
acorn/char
acpi Fix ACPI vs proc_create_data() mismerge 2008-04-30 16:26:27 -07:00
amba
ata ahci: SB600 ahci can't do MSI, blacklist that capability 2008-04-29 17:42:04 -04:00
atm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-30 08:45:48 -07:00
auxdisplay
base driver core: remove no longer used "struct class_device" 2008-04-30 16:52:49 -07:00
block brd: modify ramdisk device to be able to manage partitions 2008-04-30 08:29:53 -07:00
bluetooth hci_usb.h: fix hard-to-trigger race 2008-05-02 16:45:10 -07:00
cdrom Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2008-04-29 08:18:03 -07:00
char toshiba: use ioremap_cached 2008-04-30 23:15:34 +02:00
clocksource
connector
cpufreq [CPUFREQ] state info wrong after resume 2008-04-28 16:27:08 -04:00
cpuidle
crypto
dca
dio
dma
edac pasemi_edac needs to include linux/edac.h 2008-04-29 19:06:57 -07:00
eisa
firewire
firmware edd: add default mode CONFIG_EDD_OFF=n, override with edd={on,off} 2008-04-29 08:06:23 -07:00
gpio drivers: replace remaining __FUNCTION__ occurrences 2008-04-30 08:29:53 -07:00
hid hid-core: use get_unaligned_* helpers 2008-04-29 08:06:27 -07:00
hwmon drivers: replace remaining __FUNCTION__ occurrences 2008-04-30 08:29:53 -07:00
i2c i2c: Convert most new-style drivers to use module aliasing 2008-04-29 23:11:40 +02:00
ide alim15x3: disable init_hwif_ali15x3 for PowerPC 2008-04-29 22:57:38 +02:00
ieee1394 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2008-04-25 12:24:06 -07:00
infiniband RDMA/nes: Formatting cleanup 2008-04-29 13:46:54 -07:00
input tty: The big operations rework 2008-04-30 08:29:47 -07:00
isdn tty: The big operations rework 2008-04-30 08:29:47 -07:00
leds Remove duplicated unlikely() in IS_ERR() 2008-04-29 08:06:25 -07:00
lguest
macintosh [POWERPC] windfarm: Add PowerMac 12,1 support 2008-04-29 15:57:35 +10:00
mca proc: remove proc_root from drivers 2008-04-29 08:06:18 -07:00
md md: support blocking writes to an array on device failure 2008-04-30 08:29:33 -07:00
media fix drivers/media/common/tuners/ build bug 2008-04-30 08:36:04 -07:00
memstick
message Remove duplicated unlikely() in IS_ERR() 2008-04-29 08:06:25 -07:00
mfd drivers: replace remaining __FUNCTION__ occurrences 2008-04-30 08:29:53 -07:00
misc Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2008-04-30 11:52:52 -07:00
mmc Merge master.kernel.org:/home/rmk/linux-2.6-arm 2008-04-29 15:18:06 -07:00
mtd drivers: fix integer as NULL pointer warnings 2008-04-28 17:31:13 -07:00
net pppol2tp: Remove null pointer dereference. 2008-05-12 15:43:46 -07:00
nubus proc: convert /proc/bus/nubus to seq_file interface 2008-04-29 08:06:19 -07:00
of [POWERPC] drivers/of/of_i2c.c: Add MODULE_LICENSE 2008-04-24 20:58:01 +10:00
oprofile oprofile: change cpu_buffer from array to per_cpu variable 2008-04-28 08:58:31 -07:00
parisc parisc: use non-racy method for proc entries creation 2008-04-29 08:06:22 -07:00
parport debugobjects: add timer specific object debugging code 2008-04-30 08:29:53 -07:00
pci Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-04-29 10:17:59 -07:00
pcmcia pcmcia: remove pccard_sysfs_interface warnings 2008-04-30 16:52:48 -07:00
pnp Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2008-04-30 11:52:52 -07:00
power x86: olpc: add One Laptop Per Child architecture support 2008-04-29 08:06:07 -07:00
ps3
rapidio [RAPIDIO] Auto-probe the RapidIO system size 2008-04-29 19:40:28 +10:00
rtc Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2008-04-30 11:52:52 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-30 08:45:48 -07:00
sbus drivers: replace remaining __FUNCTION__ occurrences 2008-04-30 08:29:53 -07:00
scsi Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2008-04-29 08:18:03 -07:00
serial Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2008-04-30 08:37:40 -07:00
sh
sn
spi atmel_spi: clean up baud rate divisor calculation 2008-04-30 08:29:31 -07:00
ssb ssb: Fix all-ones boardflags 2008-04-23 21:25:35 -04:00
tc
telephony
thermal thermal: re-name thermal.c to thermal_sys.c 2008-04-29 03:12:17 -04:00
uio
usb tty: The big operations rework 2008-04-30 08:29:47 -07:00
video pxafb: preliminary smart panel interface support (update) 2008-04-30 08:29:32 -07:00
virtio
w1 drivers: replace remaining __FUNCTION__ occurrences 2008-04-30 08:29:53 -07:00
watchdog
xen xen: add balloon driver 2008-04-24 23:57:33 +02:00
zorro zorro: use non-racy method for proc entries creation 2008-04-29 08:06:21 -07:00
Kconfig Basic braille screen reader support 2008-04-30 08:29:52 -07:00
Makefile Basic braille screen reader support 2008-04-30 08:29:52 -07:00