tmp_suning_uos_patched/drivers
Julia Lawall 3942453948 drivers/net/smsc911x.c: Fix resource size off by 1 error
The call resource_size(res) returns res->end - res->start + 1 and thus the
second change is semantics-preserving.  res_size is then used as the second
argument of a call to request_mem_region, and the memory allocated by this
call appears to be the same as what is released in the two calls to
release_mem_region.  So the size argument for those calls should be
resource_size(size) as well.  Alternatively, in the second call to
release_mem_region, the second argument could be res_size, as that variable
has already been initialized at the point of this call.

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

// <smpl>
@@
struct resource *res;
@@

- (res->end - res->start) + 1
+ resource_size(res)

@@
struct resource *res;
@@

- res->end - res->start
+ BAD(resource_size(res))
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-05 18:03:30 -07:00
..
accessibility
acpi
amba
ata
atm
auxdisplay
base
block
bluetooth
cdrom
char Remove low_latency flag setting from nozomi and mxser drivers 2009-06-24 09:55:50 -07:00
clocksource
connector
cpufreq
cpuidle
crypto
dca
dio
dma DMA: txx9dmac: use dma_unmap_single if DMA_COMPL_{SRC,DEST}_UNMAP_SINGLE set 2009-06-24 18:34:40 +01:00
edac
eisa
firewire
firmware
gpio
gpu
hid
hwmon
i2c
ide
idle
ieee1394
ieee802154
infiniband
input
isdn gigaset: drop pointless check 2009-07-02 13:16:46 -07:00
leds
lguest
macintosh
mca
md
media
memstick
message
mfd
misc
mmc
mtd
net drivers/net/smsc911x.c: Fix resource size off by 1 error 2009-07-05 18:03:30 -07:00
nubus
of
oprofile
parisc
parport
pci Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2009-06-24 10:17:07 -07:00
pcmcia
platform asus-laptop: remove EXPERIMENTAL dependency 2009-06-24 01:34:00 -04:00
pnp
power
pps
ps3
rapidio
regulator
rtc
s390
sbus
scsi
serial pci: use pci_ioremap_bar() in drivers/serial 2009-06-24 09:55:50 -07:00
sh
sn
spi
ssb
staging Staging: octeon-ethernet: Fix race freeing transmit buffers. 2009-06-24 18:34:41 +01:00
tc
telephony
thermal
uio
usb
uwb
video
virtio
vlynq
w1 Merge git://git.infradead.org/battery-2.6 2009-06-24 14:35:57 -07:00
watchdog
xen
zorro
Kconfig
Makefile